added LED code. Further Code restructure

This commit is contained in:
2024-11-09 19:53:07 +01:00
parent 22712aaeda
commit d424d3a7d3
14 changed files with 145 additions and 36 deletions

View File

@ -1,5 +1,5 @@
##########################################################################################################################
# File automatically-generated by tool: [projectgenerator] version: [4.3.0-B58] date: [Sun Nov 03 12:56:00 CET 2024]
# File automatically-generated by tool: [projectgenerator] version: [4.3.0-B58] date: [Sat Nov 09 19:46:36 CET 2024]
##########################################################################################################################
# ------------------------------------------------
@ -59,7 +59,8 @@ Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c \
Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c \
Core/Src/system_stm32f0xx.c \
Core/Src/sysmem.c \
Core/Src/syscalls.c
Core/Src/syscalls.c \
Core/Lib/can-halal.c
# ASM sources
ASM_SOURCES = \
@ -85,7 +86,7 @@ SZ = $(PREFIX)size
endif
HEX = $(CP) -O ihex
BIN = $(CP) -O binary -S
#######################################
# CFLAGS
#######################################
@ -103,7 +104,7 @@ MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
# macros for gcc
# AS defines
AS_DEFS =
AS_DEFS =
# C defines
C_DEFS = \
@ -112,11 +113,12 @@ C_DEFS = \
# AS includes
AS_INCLUDES =
AS_INCLUDES =
# C includes
C_INCLUDES = \
-ICore/Inc \
-ICore/Lib/can-halal \
-IDrivers/STM32F0xx_HAL_Driver/Inc \
-IDrivers/STM32F0xx_HAL_Driver/Inc/Legacy \
-IDrivers/CMSIS/Device/ST/STM32F0xx/Include \
@ -144,8 +146,8 @@ CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)"
LDSCRIPT = STM32F042K6Tx_FLASH.ld
# libraries
LIBS = -lc -lm -lnosys
LIBDIR =
LIBS = -lc -lm -lnosys
LIBDIR =
LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
# default action: build all
@ -162,7 +164,7 @@ vpath %.c $(sort $(dir $(C_SOURCES)))
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
vpath %.s $(sort $(dir $(ASM_SOURCES)))
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
$(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)
@ -174,19 +176,19 @@ $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
$(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
$(HEX) $< $@
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
$(BIN) $< $@
$(BIN) $< $@
$(BUILD_DIR):
mkdir $@
mkdir $@
#######################################
# clean up
#######################################
clean:
-rm -fR $(BUILD_DIR)
#######################################
# dependencies
#######################################