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_utils.c \
23 drivers
/bus_i2c_soft.c \
24 drivers
/bus_octospi.c \
25 drivers
/bus_quadspi.c \
27 drivers
/bus_spi_config.c \
28 drivers
/bus_spi_pinconfig.c \
31 drivers
/display_canvas.c \
32 drivers
/dma_common.c \
38 drivers
/pin_pull_up_down.c \
41 drivers
/serial_pinconfig.c \
42 drivers
/serial_uart.c \
43 drivers
/serial_uart_pinconfig.c \
44 drivers
/sound_beeper.c \
45 drivers
/stack_check.c \
47 drivers
/timer_common.c \
48 drivers
/transponder_ir_arcitimer.c \
49 drivers
/transponder_ir_ilap.c \
50 drivers
/transponder_ir_erlt.c \
60 io
/smartaudio_protocol.c \
61 io
/statusindicator.c \
68 msp
/msp_build_info.c \
70 scheduler
/scheduler.c \
71 sensors
/adcinternal.c \
75 target
/config_helper.c \
77 fc/controlrate_profile.c \
78 drivers
/accgyro
/gyro_sync.c \
80 drivers
/rx
/rx_xn297.c \
82 drivers
/serial_softserial.c \
92 flight
/dyn_notch_filter.c \
96 flight
/mixer_tricopter.c \
101 flight
/servos_tricopter.c \
103 io
/serial_4way_avrootloader.c \
104 io
/serial_4way_stk500v2.c \
121 io
/spektrum_vtx_control.c \
128 sensors
/acceleration.c \
129 sensors
/acceleration_init.c \
130 sensors
/boardalignment.c \
133 sensors
/gyro_init.c \
134 sensors
/initialisation.c \
135 blackbox
/blackbox.c \
136 blackbox
/blackbox_encoding.c \
137 blackbox
/blackbox_io.c \
139 cms
/cms_menu_blackbox.c \
140 cms
/cms_menu_failsafe.c \
141 cms
/cms_menu_firmware.c \
142 cms
/cms_menu_gps_rescue.c \
143 cms
/cms_menu_gps_lap_timer.c \
145 cms
/cms_menu_ledstrip.c \
146 cms
/cms_menu_main.c \
147 cms
/cms_menu_misc.c \
149 cms
/cms_menu_power.c \
150 cms
/cms_menu_saveexit.c \
151 cms
/cms_menu_vtx_common.c \
152 cms
/cms_menu_vtx_rtc6705.c \
153 cms
/cms_menu_vtx_smartaudio.c \
154 cms
/cms_menu_vtx_tramp.c \
155 cms
/cms_menu_persistent_stats.c \
156 cms
/cms_menu_rpm_limit.c \
157 cms
/cms_menu_quick.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 cms
/cms_menu_vtx_msp.c
206 ifneq ($(SIMULATOR_BUILD
),yes
)
209 $(addprefix drivers
/accgyro
/,$(notdir $(wildcard $(SRC_DIR
)/drivers
/accgyro
/*.c
))) \
210 $(ROOT
)/lib
/main
/BoschSensortec
/BMI270-Sensor-API
/bmi270_maximum_fifo.c \
211 $(addprefix drivers
/barometer
/,$(notdir $(wildcard $(SRC_DIR
)/drivers
/barometer
/*.c
))) \
212 $(addprefix drivers
/compass
/,$(notdir $(wildcard $(SRC_DIR
)/drivers
/compass
/*.c
))) \
214 drivers
/vtx_rtc6705.c \
215 drivers
/vtx_rtc6705_soft_spi.c
217 ifneq ($(GYRO_DEFINE
),)
219 LEGACY_GYRO_DEFINES
:= USE_GYRO_L3GD20
220 ifneq ($(findstring $(GYRO_DEFINE
),$(LEGACY_GYRO_DEFINES
)),)
223 $(addprefix drivers
/accgyro_legacy
/,$(notdir $(wildcard $(SRC_DIR
)/drivers
/accgyro_legacy
/*.c
)))
230 rx
/cc2500_frsky_shared.c \
231 rx
/cc2500_frsky_d.c \
232 rx
/cc2500_frsky_x.c \
234 rx
/cc2500_redpine.c \
236 rx
/cyrf6936_spektrum.c \
237 drivers
/rx
/expresslrs_driver.c \
239 rx
/expresslrs_common.c \
240 rx
/expresslrs_telemetry.c \
241 drivers
/rx
/rx_cc2500.c \
242 drivers
/rx
/rx_a7105.c \
243 drivers
/rx
/rx_cyrf6936.c \
244 drivers
/rx
/rx_sx127x.c \
245 drivers
/rx
/rx_sx1280.c
249 drivers
/flash_m25p16.c \
250 drivers
/flash_w25n01g.c \
251 drivers
/flash_w25q128fv.c \
252 drivers
/flash_w25m.c \
257 drivers
/sdcard_spi.c \
258 drivers
/sdcard_sdio_baremetal.c \
259 drivers
/sdcard_standard.c \
260 io
/asyncfatfs
/asyncfatfs.c \
261 io
/asyncfatfs
/fat_standard.c
263 INCLUDE_DIRS
:= $(INCLUDE_DIRS
) \
265 VPATH
:= $(VPATH
):$(FATFS_DIR
)
269 COMMON_DEVICE_SRC
= \
271 $(DEVICE_STDPERIPH_SRC
)
273 COMMON_SRC
:= $(COMMON_SRC
) $(COMMON_DEVICE_SRC
) $(RX_SRC
)
276 TARGET_FLAGS
:= -DUSE_EXST
$(TARGET_FLAGS
)
279 ifeq ($(RAM_BASED
),yes
)
280 TARGET_FLAGS
:= -DUSE_EXST
-DCONFIG_IN_RAM
-DRAMBASED
$(TARGET_FLAGS
)
283 ifeq ($(SIMULATOR_BUILD
),yes
)
284 TARGET_FLAGS
:= -DSIMULATOR_BUILD
$(TARGET_FLAGS
)
287 SPEED_OPTIMISED_SRC
:= ""
288 SIZE_OPTIMISED_SRC
:= ""
290 SPEED_OPTIMISED_SRC
:= $(SPEED_OPTIMISED_SRC
) \
296 common
/typeconversion.c \
297 drivers
/accgyro
/accgyro_mpu.c \
298 drivers
/accgyro
/accgyro_mpu3050.c \
299 drivers
/accgyro
/accgyro_spi_bmi160.c \
300 drivers
/accgyro
/accgyro_spi_bmi270.c \
301 drivers
/accgyro
/accgyro_spi_lsm6dso.c \
302 drivers
/accgyro_legacy
/accgyro_adxl345.c \
303 drivers
/accgyro_legacy
/accgyro_bma280.c \
304 drivers
/accgyro_legacy
/accgyro_l3g4200d.c \
305 drivers
/accgyro_legacy
/accgyro_l3gd20.c \
306 drivers
/accgyro_legacy
/accgyro_lsm303dlhc.c \
307 drivers
/accgyro_legacy
/accgyro_mma845x.c \
309 drivers
/buf_writer.c \
311 drivers
/bus_quadspi.c \
315 drivers
/pwm_output.c \
318 drivers
/serial_uart.c \
325 fc/runtime_config.c \
326 flight
/dyn_notch_filter.c \
330 flight
/rpm_filter.c \
344 scheduler
/scheduler.c \
345 sensors
/acceleration.c \
346 sensors
/boardalignment.c \
349 $(DEVICE_STDPERIPH_SRC
) \
351 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
352 $(shell find
$(SRC_DIR
) -name
'*_init.c') \
353 bus_bst_stm32f30x.c \
356 drivers
/accgyro
/accgyro_fake.c \
357 drivers
/barometer
/barometer_bmp085.c \
358 drivers
/barometer
/barometer_bmp280.c \
359 drivers
/barometer
/barometer_fake.c \
360 drivers
/barometer
/barometer_ms5611.c \
361 drivers
/barometer
/barometer_lps.c \
362 drivers
/barometer
/barometer_qmp6988.c \
363 drivers
/barometer
/barometer_2smpb_02b.c \
364 drivers
/bus_i2c_config.c \
365 drivers
/bus_i2c_timing.c \
366 drivers
/bus_spi_config.c \
367 drivers
/bus_spi_pinconfig.c \
368 drivers
/compass
/compass_ak8963.c \
369 drivers
/compass
/compass_ak8975.c \
370 drivers
/compass
/compass_fake.c \
371 drivers
/compass
/compass_hmc5883l.c \
372 drivers
/compass
/compass_qmc5883l.c \
373 drivers
/compass
/compass_lis2mdl.c \
374 drivers
/compass
/compass_lis3mdl.c \
375 drivers
/compass
/compass_ist8310.c \
376 drivers
/display_ug2864hsweg01.c \
378 drivers
/light_ws2811strip.c \
379 drivers
/serial_escserial.c \
380 drivers
/serial_pinconfig.c \
381 drivers
/serial_tcp.c \
382 drivers
/serial_uart_pinconfig.c \
383 drivers
/serial_usb_vcp.c \
384 drivers
/vtx_rtc6705_soft_spi.c \
385 drivers
/vtx_rtc6705.c \
386 drivers
/vtx_common.c \
389 config
/config_eeprom.c \
391 config
/config_streamer.c \
392 config
/simplified_tuning.c \
397 io
/serial_4way_avrootloader.c \
398 io
/serial_4way_stk500v2.c \
399 io
/transponder_ir.c \
403 cms
/cms_menu_blackbox.c \
404 cms
/cms_menu_failsafe.c \
405 cms
/cms_menu_firmware.c \
406 cms
/cms_menu_gps_rescue.c \
407 cms
/cms_menu_gps_lap_timer.c \
409 cms
/cms_menu_ledstrip.c \
410 cms
/cms_menu_main.c \
411 cms
/cms_menu_misc.c \
413 cms
/cms_menu_power.c \
414 cms
/cms_menu_saveexit.c \
415 cms
/cms_menu_vtx_common.c \
416 cms
/cms_menu_vtx_rtc6705.c \
417 cms
/cms_menu_vtx_smartaudio.c \
418 cms
/cms_menu_vtx_tramp.c \
419 cms
/cms_menu_persistent_stats.c \
420 cms
/cms_menu_rpm_limit.c \
421 cms
/cms_menu_quick.c \
424 io
/vtx_smartaudio.c \
427 io
/spektrum_vtx_control.c \
433 cms
/cms_menu_vtx_msp.c
435 # Gyro driver files that only contain initialization and configuration code - not runtime code
436 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
437 drivers
/accgyro
/accgyro_mpu6050.c \
438 drivers
/accgyro
/accgyro_mpu6500.c \
439 drivers
/accgyro
/accgyro_spi_mpu6000.c \
440 drivers
/accgyro
/accgyro_spi_mpu6500.c \
441 drivers
/accgyro
/accgyro_spi_mpu9250.c \
442 drivers
/accgyro
/accgyro_spi_icm20689.c \
443 drivers
/accgyro
/accgyro_spi_icm426xx.c \
444 drivers
/accgyro
/accgyro_spi_lsm6dso_init.c
447 # F4 and F7 optimizations
448 SPEED_OPTIMISED_SRC
:= $(SPEED_OPTIMISED_SRC
) \
449 drivers
/bus_i2c_hal.c \
450 drivers
/bus_spi_ll.c \
453 drivers
/pwm_output_dshot.c \
454 drivers
/pwm_output_dshot_shared.c \
455 drivers
/pwm_output_dshot_hal.c
457 SIZE_OPTIMISED_SRC
:= $(SIZE_OPTIMISED_SRC
) \
458 drivers
/bus_i2c_hal_init.c
460 # check if target.mk supplied
461 SRC
:= $(STARTUP_SRC
) $(MCU_COMMON_SRC
) $(TARGET_SRC
) $(VARIANT_SRC
)
463 # Files that should not be optimized, useful for debugging IMPRECISE cpu faults.
464 # Specify FULL PATH, e.g. "./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_ll_sdmmc.c"
465 NOT_OPTIMISED_SRC
:= $(NOT_OPTIMISED_SRC
) \
469 INCLUDE_DIRS
+= $(DSP_LIB
)/Include
470 SRC
+= $(wildcard $(DSP_LIB
)/Source
/*/*.S
)
474 SRC
+= $(FLASH_SRC
) $(MSC_SRC
) $(SDCARD_SRC
) $(COMMON_SRC
)
477 SRC
:= $(filter-out $(MCU_EXCLUDES
), $(SRC
))
481 # end target specific make file checks
483 # Search path and source files for the Open Location Code library
484 OLC_DIR
= $(ROOT
)/lib
/main
/google
/olc
487 INCLUDE_DIRS
+= $(OLC_DIR
)
488 SRC
+= $(OLC_DIR
)/olc.c
489 SIZE_OPTIMISED_SRC
+= $(OLC_DIR
)/olc.c