8 $(addprefix pg
/, $(notdir $(wildcard $(SRC_DIR
)/pg
/*.c
))) \
9 $(addprefix common
/,$(notdir $(wildcard $(SRC_DIR
)/common
/*.c
))) \
10 $(addprefix config
/,$(notdir $(wildcard $(SRC_DIR
)/config
/*.c
))) \
16 drivers
/dshot_dpwm.c \
17 drivers
/dshot_command.c \
18 drivers
/buf_writer.c \
20 drivers
/bus_i2c_config.c \
21 drivers
/bus_i2c_busdev.c \
22 drivers
/bus_i2c_soft.c \
23 drivers
/bus_quadspi.c \
25 drivers
/bus_spi_config.c \
26 drivers
/bus_spi_pinconfig.c \
29 drivers
/display_canvas.c \
30 drivers
/dma_common.c \
31 drivers
/dma_reqmap.c \
38 drivers
/pin_pull_up_down.c \
42 drivers
/serial_pinconfig.c \
43 drivers
/serial_uart.c \
44 drivers
/serial_uart_pinconfig.c \
45 drivers
/sound_beeper.c \
46 drivers
/stack_check.c \
48 drivers
/timer_common.c \
50 drivers
/transponder_ir_arcitimer.c \
51 drivers
/transponder_ir_ilap.c \
52 drivers
/transponder_ir_erlt.c \
62 io
/smartaudio_protocol.c \
63 io
/statusindicator.c \
71 scheduler
/scheduler.c \
72 sensors
/adcinternal.c \
76 target
/config_helper.c \
78 fc/controlrate_profile.c \
79 drivers
/camera_control.c \
80 drivers
/accgyro
/gyro_sync.c \
81 drivers
/pwm_esc_detect.c \
82 drivers
/pwm_output.c \
84 drivers
/rx
/rx_xn297.c \
86 drivers
/serial_softserial.c \
95 flight
/dyn_notch_filter.c \
97 flight
/feedforward.c \
100 flight
/mixer_tricopter.c \
103 flight
/rpm_filter.c \
105 flight
/servos_tricopter.c \
107 io
/serial_4way_avrootloader.c \
108 io
/serial_4way_stk500v2.c \
124 io
/spektrum_vtx_control.c \
131 sensors
/acceleration.c \
132 sensors
/acceleration_init.c \
133 sensors
/boardalignment.c \
136 sensors
/gyro_init.c \
137 sensors
/initialisation.c \
138 blackbox
/blackbox.c \
139 blackbox
/blackbox_encoding.c \
140 blackbox
/blackbox_io.c \
142 cms
/cms_menu_blackbox.c \
143 cms
/cms_menu_failsafe.c \
144 cms
/cms_menu_firmware.c \
145 cms
/cms_menu_gps_rescue.c\
147 cms
/cms_menu_ledstrip.c \
148 cms
/cms_menu_main.c \
149 cms
/cms_menu_misc.c \
151 cms
/cms_menu_power.c \
152 cms
/cms_menu_saveexit.c \
153 cms
/cms_menu_vtx_common.c \
154 cms
/cms_menu_vtx_rtc6705.c \
155 cms
/cms_menu_vtx_smartaudio.c \
156 cms
/cms_menu_vtx_tramp.c \
157 cms
/cms_menu_persistent_stats.c \
158 drivers
/display_ug2864hsweg01.c \
159 drivers
/light_ws2811strip.c \
160 drivers
/rangefinder
/rangefinder_hcsr04.c \
161 drivers
/rangefinder
/rangefinder_lidartf.c \
162 drivers
/serial_escserial.c \
163 drivers
/vtx_common.c \
164 drivers
/vtx_table.c \
166 io
/displayport_frsky_osd.c \
167 io
/displayport_max7456.c \
168 io
/displayport_msp.c \
169 io
/displayport_oled.c \
170 io
/displayport_srxl.c \
171 io
/displayport_crsf.c \
172 io
/displayport_hott.c \
182 sensors
/barometer.c \
183 sensors
/rangefinder.c \
184 telemetry
/telemetry.c \
188 telemetry
/frsky_hub.c \
190 telemetry
/jetiexbus.c \
191 telemetry
/smartport.c \
193 telemetry
/mavlink.c \
194 telemetry
/msp_shared.c \
196 telemetry
/ibus_shared.c \
197 sensors
/esc_sensor.c \
200 io
/vtx_smartaudio.c \
204 COMMON_DEVICE_SRC
= \
206 $(DEVICE_STDPERIPH_SRC
)
208 COMMON_SRC
:= $(COMMON_SRC
) $(COMMON_DEVICE_SRC
)
211 TARGET_FLAGS
:= -DUSE_EXST
$(TARGET_FLAGS
)
214 ifeq ($(RAM_BASED
),yes
)
215 TARGET_FLAGS
:= -DUSE_EXST
-DCONFIG_IN_RAM
-DRAMBASED
$(TARGET_FLAGS
)
218 ifeq ($(SIMULATOR_BUILD
),yes
)
219 TARGET_FLAGS
:= -DSIMULATOR_BUILD
$(TARGET_FLAGS
)
222 SPEED_OPTIMISED_SRC
:= ""
223 SIZE_OPTIMISED_SRC
:= ""
225 ifneq ($(TARGET
),$(filter $(TARGET
),$(F1_TARGETS
)))
226 SPEED_OPTIMISED_SRC
:= $(SPEED_OPTIMISED_SRC
) \
231 common
/typeconversion.c \
232 drivers
/accgyro
/accgyro_mpu.c \
233 drivers
/accgyro
/accgyro_mpu3050.c \
234 drivers
/accgyro
/accgyro_spi_bmi160.c \
235 drivers
/accgyro
/accgyro_spi_bmi270.c \
236 drivers
/accgyro
/accgyro_spi_lsm6dso.c \
237 drivers
/accgyro_legacy
/accgyro_adxl345.c \
238 drivers
/accgyro_legacy
/accgyro_bma280.c \
239 drivers
/accgyro_legacy
/accgyro_l3g4200d.c \
240 drivers
/accgyro_legacy
/accgyro_l3gd20.c \
241 drivers
/accgyro_legacy
/accgyro_lsm303dlhc.c \
242 drivers
/accgyro_legacy
/accgyro_mma845x.c \
244 drivers
/buf_writer.c \
246 drivers
/bus_quadspi.c \
250 drivers
/pwm_output.c \
253 drivers
/serial_uart.c \
260 fc/runtime_config.c \
261 flight
/dyn_notch_filter.c \
265 flight
/rpm_filter.c \
278 scheduler
/scheduler.c \
279 sensors
/acceleration.c \
280 sensors
/boardalignment.c \
283 $(DEVICE_STDPERIPH_SRC
) \
285 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
286 $(shell find
$(SRC_DIR
) -name
'*_init.c') \
287 bus_bst_stm32f30x.c \
290 drivers
/accgyro
/accgyro_fake.c \
291 drivers
/barometer
/barometer_bmp085.c \
292 drivers
/barometer
/barometer_bmp280.c \
293 drivers
/barometer
/barometer_fake.c \
294 drivers
/barometer
/barometer_ms5611.c \
295 drivers
/barometer
/barometer_lps.c \
296 drivers
/barometer
/barometer_qmp6988.c \
297 drivers
/bus_i2c_config.c \
298 drivers
/bus_i2c_timing.c \
299 drivers
/bus_spi_config.c \
300 drivers
/bus_spi_pinconfig.c \
301 drivers
/compass
/compass_ak8963.c \
302 drivers
/compass
/compass_ak8975.c \
303 drivers
/compass
/compass_fake.c \
304 drivers
/compass
/compass_hmc5883l.c \
305 drivers
/compass
/compass_qmc5883l.c \
306 drivers
/compass
/compass_lis3mdl.c \
307 drivers
/display_ug2864hsweg01.c \
309 drivers
/light_ws2811strip.c \
310 drivers
/light_ws2811strip_hal.c \
311 drivers
/light_ws2811strip_stdperiph.c \
312 drivers
/serial_escserial.c \
313 drivers
/serial_pinconfig.c \
314 drivers
/serial_tcp.c \
315 drivers
/serial_uart_pinconfig.c \
316 drivers
/serial_usb_vcp.c \
317 drivers
/transponder_ir_io_hal.c \
318 drivers
/transponder_ir_io_stdperiph.c \
319 drivers
/vtx_rtc6705_soft_spi.c \
320 drivers
/vtx_rtc6705.c \
321 drivers
/vtx_common.c \
324 config
/config_eeprom.c \
326 config
/config_streamer.c \
327 config
/simplified_tuning.c \
332 io
/serial_4way_avrootloader.c \
333 io
/serial_4way_stk500v2.c \
334 io
/transponder_ir.c \
338 cms
/cms_menu_blackbox.c \
339 cms
/cms_menu_failsafe.c \
340 cms
/cms_menu_firmware.c \
341 cms
/cms_menu_gps_rescue.c\
343 cms
/cms_menu_ledstrip.c \
344 cms
/cms_menu_main.c \
345 cms
/cms_menu_misc.c \
347 cms
/cms_menu_power.c \
348 cms
/cms_menu_saveexit.c \
349 cms
/cms_menu_vtx_common.c \
350 cms
/cms_menu_vtx_rtc6705.c \
351 cms
/cms_menu_vtx_smartaudio.c \
352 cms
/cms_menu_vtx_tramp.c \
353 cms
/cms_menu_persistent_stats.c \
356 io
/vtx_smartaudio.c \
359 io
/spektrum_vtx_control.c \
365 # Gyro driver files that only contain initialization and configuration code - not runtime code
366 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
367 drivers
/accgyro
/accgyro_mpu6050.c \
368 drivers
/accgyro
/accgyro_mpu6500.c \
369 drivers
/accgyro
/accgyro_spi_mpu6000.c \
370 drivers
/accgyro
/accgyro_spi_mpu6500.c \
371 drivers
/accgyro
/accgyro_spi_mpu9250.c \
372 drivers
/accgyro
/accgyro_spi_icm20689.c \
373 drivers
/accgyro
/accgyro_spi_lsm6dso_init.c
376 # F4 and F7 optimizations
377 ifneq ($(TARGET
),$(filter $(TARGET
),$(F3_TARGETS
)))
378 SPEED_OPTIMISED_SRC
:= $(SPEED_OPTIMISED_SRC
) \
379 drivers
/bus_i2c_hal.c \
380 drivers
/bus_spi_ll.c \
383 drivers
/pwm_output_dshot.c \
384 drivers
/pwm_output_dshot_shared.c \
385 drivers
/pwm_output_dshot_hal.c
387 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
388 drivers
/bus_i2c_hal_init.c
392 # check if target.mk supplied
393 SRC
:= $(STARTUP_SRC
) $(MCU_COMMON_SRC
) $(TARGET_SRC
) $(VARIANT_SRC
)
395 # Files that should not be optimized, useful for debugging IMPRECISE cpu faults.
396 # Specify FULL PATH, e.g. "./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_ll_sdmmc.c"
397 NOT_OPTIMISED_SRC
:= $(NOT_OPTIMISED_SRC
) \
401 INCLUDE_DIRS
+= $(DSP_LIB
)/Include
403 SRC
+= $(wildcard $(DSP_LIB
)/Source
/*/*.S
)
406 ifneq ($(filter ONBOARDFLASH
,$(FEATURES
)),)
409 drivers
/flash_m25p16.c \
410 drivers
/flash_w25n01g.c \
411 drivers
/flash_w25q128fv.c \
412 drivers
/flash_w25m.c \
420 SRC
:= $(filter-out $(MCU_EXCLUDES
), $(SRC
))
422 ifneq ($(filter SDCARD_SPI
,$(FEATURES
)),)
425 drivers
/sdcard_spi.c \
426 drivers
/sdcard_standard.c \
427 io
/asyncfatfs
/asyncfatfs.c \
428 io
/asyncfatfs
/fat_standard.c \
432 ifneq ($(filter SDCARD_SDIO
,$(FEATURES
)),)
435 drivers
/sdcard_sdio_baremetal.c \
436 drivers
/sdcard_standard.c \
437 io
/asyncfatfs
/asyncfatfs.c \
438 io
/asyncfatfs
/fat_standard.c \
442 ifneq ($(filter VCP
,$(FEATURES
)),)
446 ifneq ($(filter MSC
,$(FEATURES
)),)
449 # end target specific make file checks
451 # Search path and source files for the ST stdperiph library
452 VPATH
:= $(VPATH
):$(STDPERIPH_DIR
)/src
454 # Search path and source files for the Open Location Code library
455 OLC_DIR
= $(ROOT
)/lib
/main
/google
/olc
458 INCLUDE_DIRS
+= $(OLC_DIR
)
459 SRC
+= $(OLC_DIR
)/olc.c
460 SIZE_OPTIMISED_SRC
+= $(OLC_DIR
)/olc.c