update all stm32 to use new enhance make

This commit is contained in:
hathach
2023-06-24 18:09:05 +07:00
parent edbf06aaab
commit dbf7534cd4
18 changed files with 75 additions and 134 deletions

View File

@@ -5,6 +5,7 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver
include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m0plus
# --------------
# Compiler Flags
@@ -15,19 +16,11 @@ CFLAGS += \
# GCC Flags
GCC_CFLAGS += \
-flto \
-mthumb \
-mabi=aapcs \
-mcpu=cortex-m0plus \
-mfloat-abi=soft \
-nostdlib -nostartfiles
# suppress warning caused by vendor mcu driver
GCC_CFLAGS += -Wno-error=cast-align
# IAR Flags
IAR_CFLAGS += --cpu cortex-m0
IAR_ASFLAGS += --cpu cortex-m0
# -----------------
# Sources & Include
# -----------------
@@ -50,8 +43,5 @@ INC += \
$(TOP)/$(ST_CMSIS)/Include \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# For freeRTOS port source
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
# flash target using on-board stlink
flash: flash-stlink