mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 09:17:44 -04:00
Demo/CORTEX_M3_MPS2_QEMU_GCC: Add option to build with picolibc
When built with PICOLIBC=1, selects picolibc as the C library by removing the newlib-nano linker flags and adding --specs=picolibc.specs to the compiler flags. This also selects the integer-only printf variant provided within picolibc to reduce flash use by adding -DPICOLIBC_INTEGER_PRINTF_SCANF. Signed-off-by: Keith Packard <keithpac@amazon.com>
This commit is contained in:
parent
15826fe5cc
commit
82e8d335b8
1 changed files with 7 additions and 1 deletions
|
@ -66,7 +66,10 @@ endif
|
|||
|
||||
DEFINES := -DQEMU_SOC_MPS2 -DHEAP3
|
||||
|
||||
LDFLAGS = -T ./scripts/mps2_m3.ld -specs=nano.specs --specs=rdimon.specs -lc -lrdimon
|
||||
LDFLAGS = -T ./scripts/mps2_m3.ld
|
||||
ifneq ($(PICOLIBC), 1)
|
||||
LDFLAGS += -specs=nano.specs --specs=rdimon.specs -lc -lrdimon
|
||||
endif
|
||||
LDFLAGS += -Xlinker -Map=${BUILD_DIR}/output.map
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
|
@ -74,6 +77,9 @@ CFLAGS += -nostartfiles -mthumb -mcpu=cortex-m3 -Wno-error=implicit-function-dec
|
|||
CFLAGS += -Wno-builtin-declaration-mismatch -Werror
|
||||
CFLAGS += -Wall -Wextra
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
ifeq ($(PICOLIBC), 1)
|
||||
CFLAGS += -specs=picolibc.specs -DPICOLIBC_INTEGER_PRINTF_SCANF
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -ggdb3 -Og
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue