regenerate makefile in cubemx
This commit is contained in:
parent
0d6f3955ef
commit
faa1abb1e7
87
Makefile
87
Makefile
|
@ -1,5 +1,5 @@
|
|||
##########################################################################################################################
|
||||
# File automatically-generated by tool: [projectgenerator] version: [4.2.0-B44] date: [Tue Apr 23 17:43:11 CEST 2024]
|
||||
# File automatically-generated by tool: [projectgenerator] version: [4.2.0-B44] date: [Thu May 02 19:45:04 CEST 2024]
|
||||
##########################################################################################################################
|
||||
|
||||
# ------------------------------------------------
|
||||
|
@ -35,36 +35,39 @@ BUILD_DIR = build
|
|||
# source
|
||||
######################################
|
||||
# C sources
|
||||
C_SOURCES = \
|
||||
Core/Src/main.c \
|
||||
Core/Src/stm32h7xx_it.c \
|
||||
Core/Src/stm32h7xx_hal_msp.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fdcan.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c \
|
||||
Core/Src/system_stm32h7xx.c
|
||||
C_SOURCES = \
|
||||
Core/Src/main.c \
|
||||
Core/Src/stm32h7xx_it.c \
|
||||
Core/Src/stm32h7xx_hal_msp.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fdcan.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c \
|
||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c \
|
||||
Core/Src/system_stm32h7xx.c
|
||||
|
||||
# ASM sources
|
||||
ASM_SOURCES = \
|
||||
startup_stm32f302xc.s
|
||||
ASM_SOURCES = \
|
||||
startup_stm32h7a3xx.s
|
||||
|
||||
# ASM sources
|
||||
ASMM_SOURCES =
|
||||
|
||||
|
||||
#######################################
|
||||
|
@ -91,10 +94,10 @@ BIN = $(CP) -O binary -S
|
|||
# CFLAGS
|
||||
#######################################
|
||||
# cpu
|
||||
CPU = -mcpu=cortex-m4
|
||||
CPU = -mcpu=cortex-m7
|
||||
|
||||
# fpu
|
||||
FPU = -mfpu=fpv4-sp-d16
|
||||
FPU = -mfpu=fpv5-d16
|
||||
|
||||
# float-abi
|
||||
FLOAT-ABI = -mfloat-abi=hard
|
||||
|
@ -107,8 +110,8 @@ MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
|
|||
AS_DEFS =
|
||||
|
||||
# C defines
|
||||
C_DEFS = \
|
||||
-DUSE_HAL_DRIVER \
|
||||
C_DEFS = \
|
||||
-DUSE_HAL_DRIVER \
|
||||
-DSTM32H7A3xx
|
||||
|
||||
|
||||
|
@ -116,12 +119,12 @@ C_DEFS = \
|
|||
AS_INCLUDES =
|
||||
|
||||
# C includes
|
||||
C_INCLUDES = \
|
||||
-ICore/Inc \
|
||||
-IDrivers/CMSIS/Include \
|
||||
-IDrivers/STM32H7xx_HAL_Driver/Inc \
|
||||
-IDrivers/STM32H7xx_HAL_Driver/Inc/Legacy \
|
||||
-IDrivers/CMSIS/Device/ST/STM32H7xx/Include
|
||||
C_INCLUDES = \
|
||||
-ICore/Inc \
|
||||
-IDrivers/STM32H7xx_HAL_Driver/Inc \
|
||||
-IDrivers/STM32H7xx_HAL_Driver/Inc/Legacy \
|
||||
-IDrivers/CMSIS/Device/ST/STM32H7xx/Include \
|
||||
-IDrivers/CMSIS/Include
|
||||
|
||||
|
||||
# compile gcc flags
|
||||
|
@ -162,12 +165,16 @@ vpath %.c $(sort $(dir $(C_SOURCES)))
|
|||
# list of ASM program objects
|
||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
|
||||
vpath %.s $(sort $(dir $(ASM_SOURCES)))
|
||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASMM_SOURCES:.S=.o)))
|
||||
vpath %.S $(sort $(dir $(ASMM_SOURCES)))
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
|
||||
$(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
|
||||
$(AS) -c $(CFLAGS) $< -o $@
|
||||
$(BUILD_DIR)/%.o: %.S Makefile | $(BUILD_DIR)
|
||||
$(AS) -c $(CFLAGS) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
|
||||
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
|
||||
|
@ -193,4 +200,4 @@ clean:
|
|||
#######################################
|
||||
-include $(wildcard $(BUILD_DIR)/*.d)
|
||||
|
||||
# *** EOF ***
|
||||
# *** EOF ***
|
Loading…
Reference in New Issue