Rev 4 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4 | Rev 5 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | ########################################################################################################################## |
1 | ########################################################################################################################## |
| 2 | # File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Sat Aug 15 20:06:14 BST 2020] |
2 | # File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Mon Oct 11 20:06:42 BST 2021] |
| 3 | ########################################################################################################################## |
3 | ########################################################################################################################## |
| 4 | 4 | ||
| 5 | # ------------------------------------------------ |
5 | # ------------------------------------------------ |
| 6 | # Generic Makefile (based on gcc) |
6 | # Generic Makefile (based on gcc) |
| 7 | # |
7 | # |
| Line 29... | Line 29... | ||
| 29 | # paths |
29 | # paths |
| 30 | ####################################### |
30 | ####################################### |
| 31 | # Build path |
31 | # Build path |
| 32 | BUILD_DIR = build |
32 | BUILD_DIR = build |
| 33 | 33 | ||
| - | 34 | LIBLOG = ../libLog |
|
| - | 35 | include $(LIBLOG)/liblog.mk |
|
| - | 36 | ||
| - | 37 | HAL=stm32_hal |
|
| - | 38 | ||
| - | 39 | ||
| - | 40 | LIBWS2812 = ../libWS2812 |
|
| - | 41 | include $(LIBWS2812)/libws2812.mk |
|
| - | 42 | ||
| 34 | ###################################### |
43 | ###################################### |
| 35 | # source |
44 | # source |
| 36 | ###################################### |
45 | ###################################### |
| 37 | # C sources |
46 | # C sources |
| 38 | C_SOURCES = \ |
47 | C_SOURCES += \ |
| 39 | Src/main.c \ |
48 | Src/main.c \ |
| 40 | Src/leds.c \ |
- | |
| 41 | Src/sendLeds.c \ |
49 | Src/sendLeds.c \ |
| 42 | Src/stm32f0xx_it.c \ |
50 | Src/stm32f0xx_it.c \ |
| 43 | Src/stm32f0xx_hal_msp.c \ |
51 | Src/stm32f0xx_hal_msp.c \ |
| 44 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.c \ |
52 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.c \ |
| 45 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c \ |
53 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.c \ |
| Line 62... | Line 70... | ||
| 62 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_uart_ex.c \ |
70 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_uart_ex.c \ |
| 63 | Src/system_stm32f0xx.c \ |
71 | Src/system_stm32f0xx.c \ |
| 64 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c \ |
72 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c \ |
| 65 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.c |
73 | Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.c |
| 66 | 74 | ||
| - | 75 | ||
| - | 76 | ||
| - | 77 | ||
| 67 | # ASM sources |
78 | # ASM sources |
| 68 | ASM_SOURCES = \ |
79 | ASM_SOURCES = \ |
| 69 | startup_stm32f030x6.s |
80 | startup_stm32f030x6.s |
| 70 | 81 | ||
| 71 | 82 | ||
| 72 | ####################################### |
83 | ####################################### |
| 73 | # binaries |
84 | # binaries |
| 74 | ####################################### |
85 | ####################################### |
| 75 | PREFIX = arm-none-eabi- |
86 | PREFIX = arm-none-eabi- |
| 76 | # The gcc compiler bin path can be either defined in make command via GCC_PATH variable (> make GCC_PATH=xxx) |
87 | # The gcc compiler bin path can be either defined in make command via GCC_PATH variable (> make GCC_PATH=xxx) |
| 77 | # either it can be added to the PATH environment variable. |
88 | # either it can be added to the PATH environment variable. |
| 78 | ifdef GCC_PATH |
89 | ifdef GCC_PATH |
| Line 95... | Line 106... | ||
| 95 | # cpu |
106 | # cpu |
| 96 | CPU = -mcpu=cortex-m0 |
107 | CPU = -mcpu=cortex-m0 |
| 97 | 108 | ||
| 98 | # fpu |
109 | # fpu |
| 99 | # NONE for Cortex-M0/M0+/M3 |
110 | # NONE for Cortex-M0/M0+/M3 |
| - | 111 | FPU = |
|
| 100 | 112 | ||
| 101 | # float-abi |
113 | # float-abi |
| 102 | - | ||
| - | 114 | FLOAT-ABI = -mfloat-abi=soft |
|
| 103 | 115 | ||
| 104 | # mcu |
116 | # mcu |
| 105 | MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI) |
117 | MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI) |
| 106 | 118 | ||
| 107 | # macros for gcc |
119 | # macros for gcc |
| Line 116... | Line 128... | ||
| 116 | 128 | ||
| 117 | # AS includes |
129 | # AS includes |
| 118 | AS_INCLUDES = |
130 | AS_INCLUDES = |
| 119 | 131 | ||
| 120 | # C includes |
132 | # C includes |
| 121 | C_INCLUDES = \ |
133 | C_INCLUDES += \ |
| 122 | -IInc \ |
134 | -IInc \ |
| 123 | -IDrivers/STM32F0xx_HAL_Driver/Inc \ |
135 | -IDrivers/STM32F0xx_HAL_Driver/Inc \ |
| 124 | -IDrivers/STM32F0xx_HAL_Driver/Inc/Legacy \ |
136 | -IDrivers/STM32F0xx_HAL_Driver/Inc/Legacy \ |
| 125 | -IDrivers/CMSIS/Device/ST/STM32F0xx/Include \ |
137 | -IDrivers/CMSIS/Device/ST/STM32F0xx/Include \ |
| 126 | -IDrivers/CMSIS/Include |
138 | -IDrivers/CMSIS/Include |
| 127 | 139 | ||
| 128 | - | ||
| - | 140 | ################################# |
|
| - | 141 | ## include extra libraries here |
|
| 129 | 142 | ||
| 130 | # compile gcc flags |
143 | # compile gcc flags |
| 131 | ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections |
144 | ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections |
| 132 | 145 | ||
| 133 | CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections |
146 | CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections |
| 134 | 147 | ||
| 135 | ifeq ($(DEBUG), 1) |
148 | ifeq ($(DEBUG), 1) |
| 136 | CFLAGS += -g -gdwarf-2 |
149 | CFLAGS += -g -gdwarf-2 |
| 137 | endif |
150 | endif |
| 138 | 151 | ||
| 139 | 152 | ||
| 140 | # Generate dependency information |
153 | # Generate dependency information |
| 141 | CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" |
154 | CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" |
| 142 | 155 | ||
| - | 156 | CFLAGS += -flto |
|
| - | 157 | ||
| - | 158 | ||
| 143 | 159 | ||
| 144 | ####################################### |
160 | ####################################### |
| 145 | # LDFLAGS |
161 | # LDFLAGS |
| 146 | ####################################### |
162 | ####################################### |
| 147 | # link script |
163 | # link script |