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-m3
# --------------
# Compiler Flags
@@ -15,16 +16,8 @@ CFLAGS += \
# GCC Flags
GCC_CFLAGS += \
-flto \
-mthumb \
-mabi=aapcs \
-mcpu=cortex-m3 \
-mfloat-abi=soft \
-nostdlib -nostartfiles \
# IAR Flags
IAR_CFLAGS += --cpu cortex-m3
IAR_ASFLAGS += --cpu cortex-m3
# ------------------------
# All source paths should be relative to the top level.
# ------------------------
@@ -43,12 +36,6 @@ INC += \
$(TOP)/$(ST_CMSIS)/Include \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# For freeRTOS port source
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM3
# For flash-jlink target
JLINK_DEVICE = stm32f103c8
# flash target ROM bootloader
flash-dfu-util: $(BUILD)/$(PROJECT).bin
dfu-util -R -a 0 --dfuse-address 0x08000000 -D $<