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>
pull/840/head
e14002270 3 years ago committed by GitHub
parent 55d0ab4bfe
commit cee9d5c560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save