Commit 7ae9bee7 authored by Damien George's avatar Damien George
Browse files

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.
parent aa34c553
......@@ -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 \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment