mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-08-18 18:18:54 +08:00
Fix qemu riscv build error and miss debug info in assembly code (#838)
1. add INCLUDE_xTaskGetCurrentTaskHandle for stream_buffer use
2. LDFLAGS add arch and abi info for linker
for riscv64-unknown-elf multilib, if there is no arch and abi
info, will link to default lib and have below error
target emulation `elf32-littleriscv' does not match `elf64-littleriscv'
3. use CFLAGS to replace ASFLAGS when compile assembly code
because DEBUG flag is added in CFLAGS, if we use ASFLAGS to compile
assembly code, there is no debug info in assembly code objfile
Signed-off-by: Eric Chan <e14002270@gmail.com>
This commit is contained in:
@@ -102,6 +102,7 @@ to exclude the API function. */
|
||||
#define INCLUDE_eTaskGetState 1
|
||||
#define INCLUDE_xTimerPendFunctionCall 1
|
||||
#define INCLUDE_xTaskAbortDelay 1
|
||||
#define INCLUDE_xTaskGetCurrentTaskHandle 1
|
||||
#define INCLUDE_xTaskGetHandle 1
|
||||
#define INCLUDE_xSemaphoreGetMutexHolder 1
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ CFLAGS = -march=rv32ima -mabi=ilp32 -mcmodel=medany \
|
||||
-ffunction-sections \
|
||||
-fdata-sections \
|
||||
-fno-builtin-printf
|
||||
ASFLAGS = -march=rv32ima -mabi=ilp32 -mcmodel=medany
|
||||
LDFLAGS = -nostartfiles -Tfake_rom.lds \
|
||||
-march=rv32ima -mabi=ilp32 -mcmodel=medany \
|
||||
-Xlinker --gc-sections \
|
||||
-Xlinker --defsym=__stack_size=300
|
||||
|
||||
@@ -62,7 +62,7 @@ $(BUILD_DIR)/%.o: %.c Makefile
|
||||
|
||||
$(BUILD_DIR)/%.o: %.S Makefile
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(CPPFLAGS) $(ASFLAGS) -MMD -MP -c $< -o $@
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR)
|
||||
|
||||
@@ -98,6 +98,7 @@ to exclude the API function. */
|
||||
#define INCLUDE_eTaskGetState 1
|
||||
#define INCLUDE_xTimerPendFunctionCall 1
|
||||
#define INCLUDE_xTaskAbortDelay 1
|
||||
#define INCLUDE_xTaskGetCurrentTaskHandle 1
|
||||
#define INCLUDE_xTaskGetHandle 1
|
||||
|
||||
/* This demo makes use of one or more example stats formatting functions. These
|
||||
|
||||
Reference in New Issue
Block a user