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_octospi.c \
24 drivers
/bus_quadspi.c \
26 drivers
/bus_spi_config.c \
27 drivers
/bus_spi_pinconfig.c \
30 drivers
/display_canvas.c \
31 drivers
/dma_common.c \
32 drivers
/dma_reqmap.c \
39 drivers
/pin_pull_up_down.c \
43 drivers
/serial_pinconfig.c \
44 drivers
/serial_uart.c \
45 drivers
/serial_uart_pinconfig.c \
46 drivers
/sound_beeper.c \
47 drivers
/stack_check.c \
49 drivers
/timer_common.c \
51 drivers
/transponder_ir_arcitimer.c \
52 drivers
/transponder_ir_ilap.c \
53 drivers
/transponder_ir_erlt.c \
63 io
/smartaudio_protocol.c \
64 io
/statusindicator.c \
72 scheduler
/scheduler.c \
73 sensors
/adcinternal.c \
77 target
/config_helper.c \
79 fc/controlrate_profile.c \
80 drivers
/camera_control.c \
81 drivers
/accgyro
/gyro_sync.c \
82 drivers
/pwm_esc_detect.c \
83 drivers
/pwm_output.c \
85 drivers
/rx
/rx_xn297.c \
87 drivers
/serial_softserial.c \
96 flight
/dyn_notch_filter.c \
98 flight
/feedforward.c \
100 flight
/mixer_init.c \
101 flight
/mixer_tricopter.c \
104 flight
/rpm_filter.c \
106 flight
/servos_tricopter.c \
108 io
/serial_4way_avrootloader.c \
109 io
/serial_4way_stk500v2.c \
125 io
/spektrum_vtx_control.c \
132 sensors
/acceleration.c \
133 sensors
/acceleration_init.c \
134 sensors
/boardalignment.c \
137 sensors
/gyro_init.c \
138 sensors
/initialisation.c \
139 blackbox
/blackbox.c \
140 blackbox
/blackbox_encoding.c \
141 blackbox
/blackbox_io.c \
143 cms
/cms_menu_blackbox.c \
144 cms
/cms_menu_failsafe.c \
145 cms
/cms_menu_firmware.c \
146 cms
/cms_menu_gps_rescue.c\
148 cms
/cms_menu_ledstrip.c \
149 cms
/cms_menu_main.c \
150 cms
/cms_menu_misc.c \
152 cms
/cms_menu_power.c \
153 cms
/cms_menu_saveexit.c \
154 cms
/cms_menu_vtx_common.c \
155 cms
/cms_menu_vtx_rtc6705.c \
156 cms
/cms_menu_vtx_smartaudio.c \
157 cms
/cms_menu_vtx_tramp.c \
158 cms
/cms_menu_persistent_stats.c \
159 drivers
/display_ug2864hsweg01.c \
160 drivers
/light_ws2811strip.c \
161 drivers
/rangefinder
/rangefinder_hcsr04.c \
162 drivers
/rangefinder
/rangefinder_lidartf.c \
163 drivers
/serial_escserial.c \
164 drivers
/vtx_common.c \
165 drivers
/vtx_table.c \
167 io
/displayport_frsky_osd.c \
168 io
/displayport_max7456.c \
169 io
/displayport_msp.c \
170 io
/displayport_oled.c \
171 io
/displayport_srxl.c \
172 io
/displayport_crsf.c \
173 io
/displayport_hott.c \
183 sensors
/barometer.c \
184 sensors
/rangefinder.c \
185 telemetry
/telemetry.c \
189 telemetry
/frsky_hub.c \
191 telemetry
/jetiexbus.c \
192 telemetry
/smartport.c \
194 telemetry
/mavlink.c \
195 telemetry
/msp_shared.c \
197 telemetry
/ibus_shared.c \
198 sensors
/esc_sensor.c \
201 io
/vtx_smartaudio.c \
205 cms
/cms_menu_vtx_msp.c
207 COMMON_DEVICE_SRC
= \
209 $(DEVICE_STDPERIPH_SRC
)
211 COMMON_SRC
:= $(COMMON_SRC
) $(COMMON_DEVICE_SRC
)
214 TARGET_FLAGS
:= -DUSE_EXST
$(TARGET_FLAGS
)
217 ifeq ($(RAM_BASED
),yes
)
218 TARGET_FLAGS
:= -DUSE_EXST
-DCONFIG_IN_RAM
-DRAMBASED
$(TARGET_FLAGS
)
221 ifeq ($(SIMULATOR_BUILD
),yes
)
222 TARGET_FLAGS
:= -DSIMULATOR_BUILD
$(TARGET_FLAGS
)
225 SPEED_OPTIMISED_SRC
:= ""
226 SIZE_OPTIMISED_SRC
:= ""
228 SPEED_OPTIMISED_SRC
:= $(SPEED_OPTIMISED_SRC
) \
233 common
/typeconversion.c \
234 drivers
/accgyro
/accgyro_mpu.c \
235 drivers
/accgyro
/accgyro_mpu3050.c \
236 drivers
/accgyro
/accgyro_spi_bmi160.c \
237 drivers
/accgyro
/accgyro_spi_bmi270.c \
238 drivers
/accgyro
/accgyro_spi_lsm6dso.c \
239 drivers
/accgyro_legacy
/accgyro_adxl345.c \
240 drivers
/accgyro_legacy
/accgyro_bma280.c \
241 drivers
/accgyro_legacy
/accgyro_l3g4200d.c \
242 drivers
/accgyro_legacy
/accgyro_l3gd20.c \
243 drivers
/accgyro_legacy
/accgyro_lsm303dlhc.c \
244 drivers
/accgyro_legacy
/accgyro_mma845x.c \
246 drivers
/buf_writer.c \
248 drivers
/bus_quadspi.c \
252 drivers
/pwm_output.c \
255 drivers
/serial_uart.c \
262 fc/runtime_config.c \
263 flight
/dyn_notch_filter.c \
267 flight
/rpm_filter.c \
280 scheduler
/scheduler.c \
281 sensors
/acceleration.c \
282 sensors
/boardalignment.c \
285 $(DEVICE_STDPERIPH_SRC
) \
287 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
288 $(shell find
$(SRC_DIR
) -name
'*_init.c') \
289 bus_bst_stm32f30x.c \
292 drivers
/accgyro
/accgyro_fake.c \
293 drivers
/barometer
/barometer_bmp085.c \
294 drivers
/barometer
/barometer_bmp280.c \
295 drivers
/barometer
/barometer_fake.c \
296 drivers
/barometer
/barometer_ms5611.c \
297 drivers
/barometer
/barometer_lps.c \
298 drivers
/barometer
/barometer_qmp6988.c \
299 drivers
/barometer
/barometer_2smpb_02b.c \
300 drivers
/bus_i2c_config.c \
301 drivers
/bus_i2c_timing.c \
302 drivers
/bus_spi_config.c \
303 drivers
/bus_spi_pinconfig.c \
304 drivers
/compass
/compass_ak8963.c \
305 drivers
/compass
/compass_ak8975.c \
306 drivers
/compass
/compass_fake.c \
307 drivers
/compass
/compass_hmc5883l.c \
308 drivers
/compass
/compass_qmc5883l.c \
309 drivers
/compass
/compass_lis3mdl.c \
310 drivers
/display_ug2864hsweg01.c \
312 drivers
/light_ws2811strip.c \
313 drivers
/light_ws2811strip_hal.c \
314 drivers
/light_ws2811strip_stdperiph.c \
315 drivers
/serial_escserial.c \
316 drivers
/serial_pinconfig.c \
317 drivers
/serial_tcp.c \
318 drivers
/serial_uart_pinconfig.c \
319 drivers
/serial_usb_vcp.c \
320 drivers
/transponder_ir_io_hal.c \
321 drivers
/transponder_ir_io_stdperiph.c \
322 drivers
/vtx_rtc6705_soft_spi.c \
323 drivers
/vtx_rtc6705.c \
324 drivers
/vtx_common.c \
327 config
/config_eeprom.c \
329 config
/config_streamer.c \
330 config
/simplified_tuning.c \
335 io
/serial_4way_avrootloader.c \
336 io
/serial_4way_stk500v2.c \
337 io
/transponder_ir.c \
341 cms
/cms_menu_blackbox.c \
342 cms
/cms_menu_failsafe.c \
343 cms
/cms_menu_firmware.c \
344 cms
/cms_menu_gps_rescue.c\
346 cms
/cms_menu_ledstrip.c \
347 cms
/cms_menu_main.c \
348 cms
/cms_menu_misc.c \
350 cms
/cms_menu_power.c \
351 cms
/cms_menu_saveexit.c \
352 cms
/cms_menu_vtx_common.c \
353 cms
/cms_menu_vtx_rtc6705.c \
354 cms
/cms_menu_vtx_smartaudio.c \
355 cms
/cms_menu_vtx_tramp.c \
356 cms
/cms_menu_persistent_stats.c \
359 io
/vtx_smartaudio.c \
362 io
/spektrum_vtx_control.c \
368 cms
/cms_menu_vtx_msp.c
370 # Gyro driver files that only contain initialization and configuration code - not runtime code
371 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
372 drivers
/accgyro
/accgyro_mpu6050.c \
373 drivers
/accgyro
/accgyro_mpu6500.c \
374 drivers
/accgyro
/accgyro_spi_mpu6000.c \
375 drivers
/accgyro
/accgyro_spi_mpu6500.c \
376 drivers
/accgyro
/accgyro_spi_mpu9250.c \
377 drivers
/accgyro
/accgyro_spi_icm20689.c \
378 drivers
/accgyro
/accgyro_spi_icm426xx.c \
379 drivers
/accgyro
/accgyro_spi_lsm6dso_init.c
382 # F4 and F7 optimizations
383 SPEED_OPTIMISED_SRC
:= $(SPEED_OPTIMISED_SRC
) \
384 drivers
/bus_i2c_hal.c \
385 drivers
/bus_spi_ll.c \
388 drivers
/pwm_output_dshot.c \
389 drivers
/pwm_output_dshot_shared.c \
390 drivers
/pwm_output_dshot_hal.c
392 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
393 drivers
/bus_i2c_hal_init.c
395 # check if target.mk supplied
396 SRC
:= $(STARTUP_SRC
) $(MCU_COMMON_SRC
) $(TARGET_SRC
) $(VARIANT_SRC
)
398 # Files that should not be optimized, useful for debugging IMPRECISE cpu faults.
399 # Specify FULL PATH, e.g. "./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_ll_sdmmc.c"
400 NOT_OPTIMISED_SRC
:= $(NOT_OPTIMISED_SRC
) \
404 INCLUDE_DIRS
+= $(DSP_LIB
)/Include
406 SRC
+= $(wildcard $(DSP_LIB
)/Source
/*/*.S
)
409 ifneq ($(filter ONBOARDFLASH
,$(FEATURES
)),)
412 drivers
/flash_m25p16.c \
413 drivers
/flash_w25n01g.c \
414 drivers
/flash_w25q128fv.c \
415 drivers
/flash_w25m.c \
423 SRC
:= $(filter-out $(MCU_EXCLUDES
), $(SRC
))
425 ifneq ($(filter SDCARD_SPI
,$(FEATURES
)),)
428 drivers
/sdcard_spi.c \
429 drivers
/sdcard_standard.c \
430 io
/asyncfatfs
/asyncfatfs.c \
431 io
/asyncfatfs
/fat_standard.c \
435 ifneq ($(filter SDCARD_SDIO
,$(FEATURES
)),)
438 drivers
/sdcard_sdio_baremetal.c \
439 drivers
/sdcard_standard.c \
440 io
/asyncfatfs
/asyncfatfs.c \
441 io
/asyncfatfs
/fat_standard.c \
445 ifneq ($(filter VCP
,$(FEATURES
)),)
449 ifneq ($(filter MSC
,$(FEATURES
)),)
452 # end target specific make file checks
454 # Search path and source files for the ST stdperiph library
455 VPATH
:= $(VPATH
):$(STDPERIPH_DIR
)/src
457 # Search path and source files for the Open Location Code library
458 OLC_DIR
= $(ROOT
)/lib
/main
/google
/olc
461 INCLUDE_DIRS
+= $(OLC_DIR
)
462 SRC
+= $(OLC_DIR
)/olc.c
463 SIZE_OPTIMISED_SRC
+= $(OLC_DIR
)/olc.c