diff options
author | Damien George <damien.p.george@gmail.com> | 2017-02-08 11:50:22 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-02-08 11:50:22 +1100 |
commit | 7ae9bee7905601a827f3d216300f917afbacf07e (patch) | |
tree | 023c2ce50c9d4157adda3fe0e59c3efae9e00677 /stmhal | |
parent | aa34c553ec75535f46f5d6ff28c0c943701e569b (diff) | |
download | micropython-7ae9bee7905601a827f3d216300f917afbacf07e.tar.gz micropython-7ae9bee7905601a827f3d216300f917afbacf07e.zip |
stmhal/Makefile: Drop use of -mabi=aapcs-linux; link libgcc by default.
The aapcs-linux ABI is not required, instead the default aapcs ABI is
enough. And using the default ABI means that the provided libgcc will now
link with the firmware without warnings about variable vs fixed enums.
Although the binary size increases by about 1k, RAM usage is slightly
decreased. And libgcc may prove useful in the future for things like
long-long division.
Diffstat (limited to 'stmhal')
-rw-r--r-- | stmhal/Makefile | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile index a83f2c4957..edd5e06193 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -51,7 +51,7 @@ INC += -I../lib/mp-readline INC += -I../lib/netutils INC += -I../lib/timeutils -CFLAGS_CORTEX_M = -mthumb -mabi=aapcs-linux -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion +CFLAGS_CORTEX_M = -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion CFLAGS_MCU_f4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_F4 CFLAGS_MCU_f7 = $(CFLAGS_CORTEX_M) -mtune=cortex-m7 -mcpu=cortex-m7 -DMCU_SERIES_F7 CFLAGS_MCU_l4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_L4 @@ -64,7 +64,7 @@ CFLAGS += -Iboards/$(BOARD) CFLAGS += -DSTM32_HAL_H='<stm32$(MCU_SERIES)xx_hal.h>' LDFLAGS = -nostdlib -L $(LD_DIR) -T $(LD_FILE) -Map=$(@:.elf=.map) --cref -LIBS = +LIBS = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) # Remove uncalled code from the final image. CFLAGS += -fdata-sections -ffunction-sections @@ -78,9 +78,6 @@ else COPT += -Os -DNDEBUG endif -# uncomment this if you want libgcc -#LIBS += $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) - SRC_LIB = $(addprefix lib/,\ libc/string0.c \ libm/math.c \ |