Rev 2 | Rev 4 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 3 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | ########################################################################################################################## |
1 | ########################################################################################################################## |
| 2 | # File automatically-generated by tool: [projectgenerator] version: [3.16.0] date: [Tue Feb 07 20:58:29 GMT 2023] |
2 | # File automatically-generated by tool: [projectgenerator] version: [3.16.0] date: [Wed Feb 08 20:10:15 GMT 2023] |
| 3 | ########################################################################################################################## |
3 | ########################################################################################################################## |
| 4 | 4 | ||
| 5 | # ------------------------------------------------ |
5 | # ------------------------------------------------ |
| 6 | # Generic Makefile (based on gcc) |
6 | # Generic Makefile (based on gcc) |
| 7 | # |
7 | # |
| Line 20... | Line 20... | ||
| 20 | # building variables |
20 | # building variables |
| 21 | ###################################### |
21 | ###################################### |
| 22 | # debug build? |
22 | # debug build? |
| 23 | DEBUG = 1 |
23 | DEBUG = 1 |
| 24 | # optimization |
24 | # optimization |
| 25 | OPT = -Og -flto |
25 | OPT = -Og |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | ####################################### |
28 | ####################################### |
| 29 | # paths |
29 | # paths |
| 30 | ####################################### |
30 | ####################################### |
| Line 50... | Line 50... | ||
| 50 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \ |
50 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \ |
| 51 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c \ |
51 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c \ |
| 52 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c \ |
52 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c \ |
| 53 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c \ |
53 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c \ |
| 54 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c \ |
54 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c \ |
| - | 55 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.c \ |
|
| 55 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c \ |
56 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c \ |
| 56 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \ |
57 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \ |
| 57 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \ |
58 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \ |
| 58 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c \ |
59 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c \ |
| 59 | Core/Src/system_stm32f1xx.c \ |
60 | Core/Src/system_stm32f1xx.c \ |
| 60 | User/Src/bmp280driver.c \ |
61 | User/Src/bmp280driver.c |
| 61 | Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.c |
- | |
| 62 | - | ||
| 63 | 62 | ||
| 64 | # ASM sources |
63 | # ASM sources |
| 65 | ASM_SOURCES = \ |
64 | ASM_SOURCES = \ |
| 66 | startup_stm32f103x6.s |
65 | startup_stm32f103xb.s |
| 67 | 66 | ||
| 68 | 67 | ||
| 69 | ####################################### |
68 | ####################################### |
| 70 | # binaries |
69 | # binaries |
| 71 | ####################################### |
70 | ####################################### |
| Line 110... | Line 109... | ||
| 110 | AS_DEFS = |
109 | AS_DEFS = |
| 111 | 110 | ||
| 112 | # C defines |
111 | # C defines |
| 113 | C_DEFS = \ |
112 | C_DEFS = \ |
| 114 | -DUSE_HAL_DRIVER \ |
113 | -DUSE_HAL_DRIVER \ |
| 115 | -DSTM32F103x6 |
114 | -DSTM32F103xB |
| 116 | 115 | ||
| 117 | 116 | ||
| 118 | # AS includes |
117 | # AS includes |
| 119 | AS_INCLUDES = |
118 | AS_INCLUDES = |
| 120 | 119 | ||
| Line 160... | Line 159... | ||
| 160 | include $(LIBSERIAL)/libSerial.mk |
159 | include $(LIBSERIAL)/libSerial.mk |
| 161 | 160 | ||
| 162 | # compile gcc flags |
161 | # compile gcc flags |
| 163 | ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections |
162 | ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections |
| 164 | 163 | ||
| 165 | CFLAGS += $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections -flto |
164 | CFLAGS += $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections |
| 166 | 165 | ||
| 167 | ifeq ($(DEBUG), 1) |
166 | ifeq ($(DEBUG), 1) |
| 168 | CFLAGS += -g -gdwarf-2 |
167 | CFLAGS += -g -gdwarf-2 |
| 169 | endif |
168 | endif |
| 170 | 169 | ||
| Line 178... | Line 177... | ||
| 178 | 177 | ||
| 179 | ####################################### |
178 | ####################################### |
| 180 | # LDFLAGS |
179 | # LDFLAGS |
| 181 | ####################################### |
180 | ####################################### |
| 182 | # link script |
181 | # link script |
| 183 | LDSCRIPT = STM32F103C6Tx_FLASH.ld |
182 | LDSCRIPT = STM32F103C8Tx_FLASH.ld |
| 184 | 183 | ||
| 185 | # libraries |
184 | # libraries |
| 186 | LIBS = -lc -lm -lnosys |
185 | LIBS = -lc -lm -lnosys |
| 187 | LIBDIR = |
186 | LIBDIR = |
| 188 | LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections |
187 | LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections |
| Line 191... | Line 190... | ||
| 191 | all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin |
190 | all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin |
| 192 | 191 | ||
| 193 | 192 | ||
| 194 | ####################################### |
193 | ####################################### |
| 195 | # build the application |
194 | # build the application |
| - | 195 | ####################################### |
|
| 196 | # list of objects |
196 | # list of objects |
| 197 | OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) |
197 | OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) |
| 198 | vpath %.c $(sort $(dir $(C_SOURCES))) |
198 | vpath %.c $(sort $(dir $(C_SOURCES))) |
| 199 | # list of ASM program objects |
199 | # list of ASM program objects |
| 200 | OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) |
200 | OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) |