separate iar and gcc build for clean make, also add cpu specific make

This commit is contained in:
hathach
2023-06-24 17:35:37 +07:00
parent 50e61e0e16
commit edbf06aaab
10 changed files with 275 additions and 221 deletions

View File

@@ -6,6 +6,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-m7
# --------------
# Compiler Flags
@@ -29,20 +30,11 @@ endif
# GCC Flags
GCC_CFLAGS += \
-flto \
-mthumb \
-mabi=aapcs \
-mcpu=cortex-m7 \
-mfloat-abi=hard \
-mfpu=fpv5-d16 \
-nostdlib -nostartfiles
# suppress warning caused by vendor mcu driver
GCC_CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align -Wno-error=unused-parameter
# IAR Flags
IAR_CFLAGS += --cpu cortex-m7 --fpu VFPv5_D16
IAR_ASFLAGS += --cpu cortex-m7 --fpu VFPv5_D16
# -----------------
# Sources & Include
# -----------------
@@ -66,6 +58,3 @@ INC += \
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
$(TOP)/$(ST_CMSIS)/Include \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# For freeRTOS port source
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM7/r0p1