7 $(addprefix pg
/,$(notdir $(wildcard $(SRC_DIR
)/pg
/*.c
))) \
8 $(addprefix common
/,$(notdir $(wildcard $(SRC_DIR
)/common
/*.c
))) \
9 $(addprefix config
/,$(notdir $(wildcard $(SRC_DIR
)/config
/*.c
))) \
14 drivers
/dshot_dpwm.c \
15 drivers
/dshot_command.c \
16 drivers
/buf_writer.c \
18 drivers
/bus_i2c_config.c \
19 drivers
/bus_i2c_busdev.c \
20 drivers
/bus_i2c_soft.c \
21 drivers
/bus_quadspi.c \
23 drivers
/bus_spi_config.c \
24 drivers
/bus_spi_pinconfig.c \
27 drivers
/dma_reqmap.c \
34 drivers
/pin_pull_up_down.c \
38 drivers
/serial_pinconfig.c \
39 drivers
/serial_uart.c \
40 drivers
/serial_uart_pinconfig.c \
41 drivers
/sound_beeper.c \
42 drivers
/stack_check.c \
44 drivers
/timer_common.c \
46 drivers
/transponder_ir_arcitimer.c \
47 drivers
/transponder_ir_ilap.c \
48 drivers
/transponder_ir_erlt.c \
59 io
/smartaudio_protocol.c \
60 io
/statusindicator.c \
68 scheduler
/scheduler.c \
69 sensors
/adcinternal.c \
73 target
/config_helper.c \
75 fc/controlrate_profile.c \
76 drivers
/camera_control.c \
77 drivers
/accgyro
/gyro_sync.c \
78 drivers
/pwm_esc_detect.c \
79 drivers
/pwm_output.c \
81 drivers
/rx
/rx_xn297.c \
83 drivers
/serial_softserial.c \
92 flight
/gyroanalyse.c \
94 flight
/interpolated_setpoint.c \
96 flight
/mixer_tricopter.c \
100 flight
/servos_tricopter.c \
102 io
/serial_4way_avrootloader.c \
103 io
/serial_4way_stk500v2.c \
116 io
/spektrum_vtx_control.c \
122 sensors
/acceleration.c \
123 sensors
/boardalignment.c \
126 sensors
/initialisation.c \
127 blackbox
/blackbox.c \
128 blackbox
/blackbox_encoding.c \
129 blackbox
/blackbox_io.c \
131 cms
/cms_menu_blackbox.c \
132 cms
/cms_menu_builtin.c \
133 cms
/cms_menu_failsafe.c \
134 cms
/cms_menu_gps_rescue.c\
136 cms
/cms_menu_ledstrip.c \
137 cms
/cms_menu_misc.c \
139 cms
/cms_menu_power.c \
140 cms
/cms_menu_saveexit.c \
141 cms
/cms_menu_vtx_rtc6705.c \
142 cms
/cms_menu_vtx_smartaudio.c \
143 cms
/cms_menu_vtx_tramp.c \
144 drivers
/display_ug2864hsweg01.c \
145 drivers
/light_ws2811strip.c \
146 drivers
/rangefinder
/rangefinder_hcsr04.c \
147 drivers
/rangefinder
/rangefinder_lidartf.c \
148 drivers
/serial_escserial.c \
149 drivers
/vtx_common.c \
150 drivers
/vtx_table.c \
152 io
/displayport_max7456.c \
153 io
/displayport_msp.c \
154 io
/displayport_oled.c \
155 io
/displayport_srxl.c \
156 io
/displayport_crsf.c \
157 io
/displayport_hott.c \
165 sensors
/barometer.c \
166 sensors
/rangefinder.c \
167 telemetry
/telemetry.c \
170 telemetry
/frsky_hub.c \
172 telemetry
/jetiexbus.c \
173 telemetry
/smartport.c \
175 telemetry
/mavlink.c \
176 telemetry
/msp_shared.c \
178 telemetry
/ibus_shared.c \
179 sensors
/esc_sensor.c \
182 io
/vtx_smartaudio.c \
186 COMMON_DEVICE_SRC
= \
188 $(DEVICE_STDPERIPH_SRC
)
190 COMMON_SRC
:= $(COMMON_SRC
) $(COMMON_DEVICE_SRC
)
193 TARGET_FLAGS
:= -DUSE_EXST
$(TARGET_FLAGS
)
196 ifeq ($(RAM_BASED
),yes
)
197 TARGET_FLAGS
:= -DUSE_EXST
-DCONFIG_IN_RAM
-DRAMBASED
$(TARGET_FLAGS
)
200 ifeq ($(SIMULATOR_BUILD
),yes
)
201 TARGET_FLAGS
:= -DSIMULATOR_BUILD
$(TARGET_FLAGS
)
204 SPEED_OPTIMISED_SRC
:= ""
205 SIZE_OPTIMISED_SRC
:= ""
207 ifneq ($(TARGET
),$(filter $(TARGET
),$(F1_TARGETS
)))
208 SPEED_OPTIMISED_SRC
:= $(SPEED_OPTIMISED_SRC
) \
212 common
/typeconversion.c \
213 drivers
/accgyro
/accgyro_fake.c \
214 drivers
/accgyro
/accgyro_mpu.c \
215 drivers
/accgyro
/accgyro_mpu3050.c \
216 drivers
/accgyro
/accgyro_mpu6050.c \
217 drivers
/accgyro
/accgyro_mpu6500.c \
218 drivers
/accgyro
/accgyro_spi_bmi160.c \
219 drivers
/accgyro
/accgyro_spi_icm20689.c \
220 drivers
/accgyro
/accgyro_spi_mpu6000.c \
221 drivers
/accgyro
/accgyro_spi_mpu6500.c \
222 drivers
/accgyro
/accgyro_spi_mpu9250.c \
223 drivers
/accgyro_legacy
/accgyro_adxl345.c \
224 drivers
/accgyro_legacy
/accgyro_bma280.c \
225 drivers
/accgyro_legacy
/accgyro_l3g4200d.c \
226 drivers
/accgyro_legacy
/accgyro_l3gd20.c \
227 drivers
/accgyro_legacy
/accgyro_lsm303dlhc.c \
228 drivers
/accgyro_legacy
/accgyro_mma845x.c \
230 drivers
/buf_writer.c \
232 drivers
/bus_quadspi.c \
236 drivers
/pwm_output.c \
239 drivers
/serial_uart.c \
246 fc/runtime_config.c \
247 flight
/gyroanalyse.c \
251 flight
/rpm_filter.c \
263 scheduler
/scheduler.c \
264 sensors
/acceleration.c \
265 sensors
/boardalignment.c \
268 $(DEVICE_STDPERIPH_SRC
) \
270 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
271 bus_bst_stm32f30x.c \
274 drivers
/barometer
/barometer_bmp085.c \
275 drivers
/barometer
/barometer_bmp280.c \
276 drivers
/barometer
/barometer_fake.c \
277 drivers
/barometer
/barometer_ms5611.c \
278 drivers
/barometer
/barometer_lps.c \
279 drivers
/barometer
/barometer_qmp6988.c \
280 drivers
/bus_i2c_config.c \
281 drivers
/bus_spi_config.c \
282 drivers
/bus_spi_pinconfig.c \
283 drivers
/compass
/compass_ak8963.c \
284 drivers
/compass
/compass_ak8975.c \
285 drivers
/compass
/compass_fake.c \
286 drivers
/compass
/compass_hmc5883l.c \
287 drivers
/compass
/compass_qmc5883l.c \
288 drivers
/compass
/compass_lis3mdl.c \
289 drivers
/display_ug2864hsweg01.c \
291 drivers
/light_ws2811strip.c \
292 drivers
/light_ws2811strip_hal.c \
293 drivers
/light_ws2811strip_stdperiph.c \
294 drivers
/serial_escserial.c \
295 drivers
/serial_pinconfig.c \
296 drivers
/serial_tcp.c \
297 drivers
/serial_uart_init.c \
298 drivers
/serial_uart_pinconfig.c \
299 drivers
/serial_usb_vcp.c \
300 drivers
/transponder_ir_io_hal.c \
301 drivers
/transponder_ir_io_stdperiph.c \
302 drivers
/vtx_rtc6705_soft_spi.c \
303 drivers
/vtx_rtc6705.c \
304 drivers
/vtx_common.c \
307 config
/config_eeprom.c \
309 config
/config_streamer.c \
314 io
/serial_4way_avrootloader.c \
315 io
/serial_4way_stk500v2.c \
316 io
/transponder_ir.c \
320 cms
/cms_menu_blackbox.c \
321 cms
/cms_menu_builtin.c \
322 cms
/cms_menu_failsafe.c \
323 cms
/cms_menu_gps_rescue.c\
325 cms
/cms_menu_ledstrip.c \
326 cms
/cms_menu_misc.c \
328 cms
/cms_menu_power.c \
329 cms
/cms_menu_saveexit.c \
330 cms
/cms_menu_vtx_rtc6705.c \
331 cms
/cms_menu_vtx_smartaudio.c \
332 cms
/cms_menu_vtx_tramp.c \
335 io
/vtx_smartaudio.c \
338 io
/spektrum_vtx_control.c \
343 # F4 and F7 optimizations
344 ifneq ($(TARGET
),$(filter $(TARGET
),$(F3_TARGETS
)))
345 SPEED_OPTIMISED_SRC
:= $(SPEED_OPTIMISED_SRC
) \
346 drivers
/bus_i2c_hal.c \
347 drivers
/bus_spi_ll.c \
349 drivers
/pwm_output_dshot.c \
350 drivers
/pwm_output_dshot_shared.c \
351 drivers
/pwm_output_dshot_hal.c
355 # check if target.mk supplied
356 SRC
:= $(STARTUP_SRC
) $(MCU_COMMON_SRC
) $(TARGET_SRC
) $(VARIANT_SRC
)
358 # Files that should not be optimized, useful for debugging IMPRECISE cpu faults.
359 # Specify FULL PATH, e.g. "./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_ll_sdmmc.c"
360 NOT_OPTIMISED_SRC
:= $(NOT_OPTIMISED_SRC
) \
364 INCLUDE_DIRS
+= $(DSP_LIB
)/Include
366 SRC
+= $(DSP_LIB
)/Source
/BasicMathFunctions
/arm_mult_f32.c
367 SRC
+= $(DSP_LIB
)/Source
/TransformFunctions
/arm_rfft_fast_f32.c
368 SRC
+= $(DSP_LIB
)/Source
/TransformFunctions
/arm_cfft_f32.c
369 SRC
+= $(DSP_LIB
)/Source
/TransformFunctions
/arm_rfft_fast_init_f32.c
370 SRC
+= $(DSP_LIB
)/Source
/TransformFunctions
/arm_cfft_radix8_f32.c
371 SRC
+= $(DSP_LIB
)/Source
/CommonTables
/arm_common_tables.c
373 SRC
+= $(DSP_LIB
)/Source
/ComplexMathFunctions
/arm_cmplx_mag_f32.c
374 SRC
+= $(DSP_LIB
)/Source
/StatisticsFunctions
/arm_max_f32.c
376 SRC
+= $(wildcard $(DSP_LIB
)/Source
/*/*.S
)
379 ifneq ($(filter ONBOARDFLASH
,$(FEATURES
)),)
382 drivers
/flash_m25p16.c \
383 drivers
/flash_w25n01g.c \
384 drivers
/flash_w25m.c \
393 SRC
:= $(filter-out $(MCU_EXCLUDES
), $(SRC
))
395 ifneq ($(filter SDCARD_SPI
,$(FEATURES
)),)
398 drivers
/sdcard_spi.c \
399 drivers
/sdcard_standard.c \
400 io
/asyncfatfs
/asyncfatfs.c \
401 io
/asyncfatfs
/fat_standard.c \
405 ifneq ($(filter SDCARD_SDIO
,$(FEATURES
)),)
408 drivers
/sdcard_sdio_baremetal.c \
409 drivers
/sdcard_standard.c \
410 io
/asyncfatfs
/asyncfatfs.c \
411 io
/asyncfatfs
/fat_standard.c \
416 ifneq ($(filter VCP
,$(FEATURES
)),)
420 ifneq ($(filter MSC
,$(FEATURES
)),)
423 # end target specific make file checks
425 # Search path and source files for the ST stdperiph library
426 VPATH
:= $(VPATH
):$(STDPERIPH_DIR
)/src