mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 03:20:00 +03:00
* autopilot naming, function sharing * initial position hold setup * get current gps location * first position hold draft * basic control scheme * add debug values for testing * first working example with smoothed acceleration * add deadbands * Re-organise included files and functions thanks Karate * revise PID gains * PIDJ distance controller, not velocity based. Remove airmode check * sanity check notes * fix pid bug and improve iTerm handling * calculate PIDs independently for each axis, increas DJ gains * adjust pids and smoothing; smoothing cutoff to settings * force iTerm to zero when close to target * allow earth referencing in alt and pos hold * stop activation until throttle raised, but not require airmode use wasThrottleRaised in place of isAirmodeActivated where airmode isn't really needed * remove unnecessary debug * block arming if poshold or althold switches are on * basic sanity check and OSD warning * allow user to fly without mag only if they reverse the default * separate alt and pos hold deadbands if poshold deadband is zero, sticks are ignored if user tries to enable posHold and it can't work, they get stick with a deadband * try to prevent position hold if no mag without valid IMU fixes a bug in the last commit, also * retaisn iTerm just attenuate the output * struct for values * reset position at start when slowed down, retain rotated iTerm back * resolve bounceback and remove iTerm attenuation * adjust PID gains to 30 * force unit tests sto work * tidy up after merge * Use mpif * conditionally only do compass check if Mag is defined * fixe defines and remove const * comments to explain strange rc multiplier * fix small omission when refactoring after throttle raised PR * licence updates, refactoring from review comments * fix issues when pos hold deadband is set to zero * A for acceleration element, not J * compact the posHoldUpdate() function - thanks K * rename showPosHoldWarning to posHoldFailure * Use a function in gps.c to initate the posHold activity on new GPS data * Use autopilotAngle in place of posHoldAngle * separate function for gpsHeading truth * use FLIGHT_MODE(POS_HOLD_MODE) in place of isPosHoldRequested * removed non-required definitions * fix failure to initiate position hold from error in ifdef * refactoring from reviews, rename posHoldReset * move deadbands for pos and alt hold to their config files. * comment * fix for blackbox breakup of GPS values reverts use a function in gps.c to initate the posHold activity on new GPS data * fix for msp change for posHoldConfig * try to constrain aggressiveness at start, smaller deadband * allow greater overshoot at the start for high incoming speed rename justStarted to isDeceleratingAtStart * dynamically update smoothing at the start * retain iTerm when moving sticks, to keep attitude in the wind * fix unit tests * finally retain iTerm correctly while moving sticks, but reset at start * Fix iTerm reset and parameter rotation * absolute rotation vs incremental rotation, fix spike after resetting target location * don't rotate D or A, it reverses their sign inappropriately * Block yaw, allow in CLI, option to apply yaw correction code * restore debug * calc D from groundspeed and drift angle * add back some target based D * Earth Frame iTerm vector appears to work :-) * fix unit test * lower PID gains, slowly leak iTerm while sticks move * earth ref Dterm, not from GPS Speed smoother than using GPS Speed and heading * stronger PIDs * adjust debug * shoehorn the unit tests * Proper earth referencing, at last * clean up a bit * no need to duplicate wrapping done in sin_approx * add note about PT1 gain on PT2 filters * avoid unnecessary float conversions * Remove unnecessary CLI testing params * update PID gains, stronger tilt angle correction * improved distance to target. thanks to demvlad * Terminate start individually on each axis added comments * refactoring to avoid code duplication * implement reviews, reduce PID gains * upsampling filter at 5Hz * warn if posHold mode requested but throttle not above airmode activation point * disable angle feedforward in position hold * rebase, pass unit test * sequential PT1's, refactoring from reviews * PID and filter revision * bane of my life * lenient sanity check, message for noMag, possible DA vector limit code * replace angleTarget in pid.c only when autopilot is active * rearrange status checks * fix debug, tidy up EF axis names, add comments about sign and direction * stop more cleanly, easier sanity check, phases, debugs complete * extend sanity check distance while sticks move; refactor; comments * fix instability on hard stop, allow activation after arming but before takeoff * make altHoldState_t local, getter to pass unit tests. * hopefully the last cleanup of this test file * implement review from PL - thank you! * restore angle limiting in pid.c , max of 80 degrees allowed in CLI * fixes after review changes weren't right * fix braces * limit max angle to 50 by vector length * Fix curly brackets, comments and debug mistake * in autopilot modes, allow up to 85 deg for pos hold * limit pilot angle in position hold to half the configured position hold angle * use smaller of angle_limit or half the autopilot limit * increase alt_hold sensitivity 5x and narrow deadband to 20 * make altitude control 5x stronger with narrower deadband and new name * add suggestions from recent reviews * start autopilot gpsStamp at 0 * renaming variables * reset the upsampling filters when resetting position control * improved gpsStamp thanks PL Also cleanup names and notes * simplify altitude control * rename to GPS_distances to GPS_latLongVectors * alt_hold respect zero deadband, hold when throttle is zero * remove unused debug * fix unit test * re-name variables in alt_hold and update comments * more flexible limit on target vs current altitude * updates from reviews, thanks karate * review changes from PL * more updates from PL review * rationalise GPS_latLongVectors * remove static newGpsData and rescueThrottle * Thanks, PL, for your review * Modifications, but has a big twitch when sticks stop * Re-naming, fix the twitch, minor changes * remove unnecessary unit test reference * sanity dist to 10m at full stop, send task interval for upsampling filter * vector and parameter re-name Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com> * small changes from review Co-Authored-By: Mark Haslinghuis <8344830+haslinghuis@users.noreply.github.com> Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com> * comment PL Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com> * fix ltm alt_hold flightMode * NOINLINE some pid.c functions * Revert "NOINLINE some pid.c functions" This reverts commit56a3f7cec2
. * fast_code_pref the wing functions in pid.c * use fast_code_pref where won't break the build * apply fast_code_pref correctly * NOINLINE some pid.c functions FAST_CODE_PREF for updatePIDAudio add comment to FAST_CODE_PREF FIx platform.h unit test issue Wing functions all FAST_CODE_PREF * revert FAST_CODE_PREF changes * Reduce ITCM RAM footprint considerably * multiple name changes and some refactoring Thanks, PL * small editorial change * refactoring, thanks PL Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com> * 64 bytes to check crossing 180 deg longitude Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com> * try to fix build error Co-Authored-By: Petr Ledvina <2318015+ledvinap@users.noreply.github.com> * Revert "try to fix build error" This reverts commitf926d26021
. * just guessing here * Revert "just guessing here" This reverts commitebc240a325
. * use a null location at initialisation * Revert "use a null location at initialisation" This reverts commitb51ae1395d
. * revert more compact initialisation code due to SITL error otherwise * fix wrapping when 180 lon meridian is crossed * null location option from PL * Revert "null location option from PL" This reverts commitad40e979bd
. * refactor PosHold start/stop code * move Alt_Hold and Pos_Hold warnings ahead of Angle, update some comments * use setTargetLocationByAxis, fix comments * change from karatebrot review Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com> * things still to do Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com> * keep warning strings 12 or less characters Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com> * a few more Co-Authored-By: Jan Post <19867640+KarateBrot@users.noreply.github.com> --------- Co-authored-by: Jan Post <19867640+KarateBrot@users.noreply.github.com> Co-authored-by: Mark Haslinghuis <8344830+haslinghuis@users.noreply.github.com> Co-authored-by: Petr Ledvina <2318015+ledvinap@users.noreply.github.com> Co-authored-by: Jay Blackman <blckmn@users.noreply.github.com>
587 lines
19 KiB
Makefile
587 lines
19 KiB
Makefile
PG_SRC = \
|
|
pg/adc.c \
|
|
pg/alt_hold.c \
|
|
pg/autopilot.c \
|
|
pg/beeper.c \
|
|
pg/beeper_dev.c \
|
|
pg/board.c \
|
|
pg/bus_i2c.c \
|
|
pg/bus_quadspi.c \
|
|
pg/bus_spi.c \
|
|
pg/dashboard.c \
|
|
pg/displayport_profiles.c \
|
|
pg/dyn_notch.c \
|
|
pg/flash.c \
|
|
pg/gimbal.c \
|
|
pg/gps.c \
|
|
pg/gps_lap_timer.c \
|
|
pg/gps_rescue.c \
|
|
pg/gyrodev.c \
|
|
pg/max7456.c \
|
|
pg/mco.c \
|
|
pg/motor.c \
|
|
pg/msp.c \
|
|
pg/pg.c \
|
|
pg/piniobox.c \
|
|
pg/pinio.c \
|
|
pg/pin_pull_up_down.c \
|
|
pg/pos_hold.c \
|
|
pg/rcdevice.c \
|
|
pg/rpm_filter.c \
|
|
pg/rx.c \
|
|
pg/rx_pwm.c \
|
|
pg/rx_spi.c \
|
|
pg/rx_spi_cc2500.c \
|
|
pg/rx_spi_expresslrs.c \
|
|
pg/scheduler.c \
|
|
pg/sdcard.c \
|
|
pg/sdio.c \
|
|
pg/serial_uart.c \
|
|
pg/stats.c \
|
|
pg/timerio.c \
|
|
pg/timerup.c \
|
|
pg/usb.c \
|
|
pg/vcd.c \
|
|
pg/vtx_io.c \
|
|
pg/vtx_table.c
|
|
|
|
COMMON_SRC = \
|
|
build/build_config.c \
|
|
build/debug.c \
|
|
build/debug_pin.c \
|
|
build/version.c \
|
|
main.c \
|
|
$(PG_SRC) \
|
|
common/bitarray.c \
|
|
common/colorconversion.c \
|
|
common/crc.c \
|
|
common/encoding.c \
|
|
common/explog_approx.c \
|
|
common/filter.c \
|
|
common/gps_conversion.c \
|
|
common/huffman.c \
|
|
common/huffman_table.c \
|
|
common/maths.c \
|
|
common/printf.c \
|
|
common/printf_serial.c \
|
|
common/pwl.c \
|
|
common/sdft.c \
|
|
common/sensor_alignment.c \
|
|
common/stopwatch.c \
|
|
common/streambuf.c \
|
|
common/string_light.c \
|
|
common/strtol.c \
|
|
common/time.c \
|
|
common/typeconversion.c \
|
|
common/uvarint.c \
|
|
common/vector.c \
|
|
config/config.c \
|
|
config/config_eeprom.c \
|
|
config/config_streamer.c \
|
|
config/feature.c \
|
|
config/simplified_tuning.c \
|
|
cli/cli.c \
|
|
cli/settings.c \
|
|
config/config.c \
|
|
drivers/dshot.c \
|
|
drivers/dshot_dpwm.c \
|
|
drivers/dshot_command.c \
|
|
drivers/buf_writer.c \
|
|
drivers/bus.c \
|
|
drivers/bus_i2c_busdev.c \
|
|
drivers/bus_i2c_utils.c \
|
|
drivers/bus_i2c_soft.c \
|
|
drivers/bus_octospi.c \
|
|
drivers/bus_quadspi.c \
|
|
drivers/buttons.c \
|
|
drivers/camera_control.c \
|
|
drivers/display.c \
|
|
drivers/display_canvas.c \
|
|
drivers/dma_common.c \
|
|
drivers/io.c \
|
|
drivers/light_led.c \
|
|
drivers/mco.c \
|
|
drivers/motor.c \
|
|
drivers/pinio.c \
|
|
drivers/pin_pull_up_down.c \
|
|
drivers/resource.c \
|
|
drivers/serial.c \
|
|
drivers/serial_impl.c \
|
|
drivers/serial_uart_hw.c \
|
|
drivers/sound_beeper.c \
|
|
drivers/stack_check.c \
|
|
drivers/timer_common.c \
|
|
drivers/transponder_ir_arcitimer.c \
|
|
drivers/transponder_ir_ilap.c \
|
|
drivers/transponder_ir_erlt.c \
|
|
fc/board_info.c \
|
|
fc/dispatch.c \
|
|
fc/hardfaults.c \
|
|
fc/tasks.c \
|
|
fc/runtime_config.c \
|
|
fc/stats.c \
|
|
io/beeper.c \
|
|
io/piniobox.c \
|
|
io/serial.c \
|
|
io/serial_resource.c \
|
|
io/smartaudio_protocol.c \
|
|
io/statusindicator.c \
|
|
io/tramp_protocol.c \
|
|
io/transponder_ir.c \
|
|
io/usb_cdc_hid.c \
|
|
io/usb_msc.c \
|
|
msp/msp.c \
|
|
msp/msp_box.c \
|
|
msp/msp_build_info.c \
|
|
msp/msp_serial.c \
|
|
scheduler/scheduler.c \
|
|
sensors/adcinternal.c \
|
|
sensors/battery.c \
|
|
sensors/current.c \
|
|
sensors/voltage.c \
|
|
target/config_helper.c \
|
|
fc/init.c \
|
|
fc/controlrate_profile.c \
|
|
drivers/accgyro/gyro_sync.c \
|
|
drivers/rx/rx_spi.c \
|
|
drivers/rx/rx_xn297.c \
|
|
drivers/rx/rx_pwm.c \
|
|
drivers/serial_softserial.c \
|
|
fc/core.c \
|
|
fc/gps_lap_timer.c \
|
|
fc/rc.c \
|
|
fc/rc_adjustments.c \
|
|
fc/rc_controls.c \
|
|
fc/rc_modes.c \
|
|
flight/alt_hold.c \
|
|
flight/autopilot.c \
|
|
flight/dyn_notch_filter.c \
|
|
flight/failsafe.c \
|
|
flight/gps_rescue.c \
|
|
flight/imu.c \
|
|
flight/mixer.c \
|
|
flight/mixer_init.c \
|
|
flight/mixer_tricopter.c \
|
|
flight/pid.c \
|
|
flight/pid_init.c \
|
|
flight/position.c \
|
|
flight/pos_hold.c \
|
|
flight/rpm_filter.c \
|
|
flight/servos.c \
|
|
flight/servos_tricopter.c \
|
|
io/serial_4way.c \
|
|
io/serial_4way_avrootloader.c \
|
|
io/serial_4way_stk500v2.c \
|
|
rx/ibus.c \
|
|
rx/jetiexbus.c \
|
|
rx/msp.c \
|
|
rx/pwm.c \
|
|
rx/frsky_crc.c \
|
|
rx/rc_stats.c \
|
|
rx/rx.c \
|
|
rx/rx_bind.c \
|
|
rx/rx_spi.c \
|
|
rx/rx_spi_common.c \
|
|
rx/crsf.c \
|
|
rx/ghst.c \
|
|
rx/sbus.c \
|
|
rx/sbus_channels.c \
|
|
rx/spektrum.c \
|
|
rx/srxl2.c \
|
|
io/spektrum_vtx_control.c \
|
|
io/spektrum_rssi.c \
|
|
rx/sumd.c \
|
|
rx/sumh.c \
|
|
rx/xbus.c \
|
|
rx/fport.c \
|
|
rx/msp_override.c \
|
|
sensors/acceleration.c \
|
|
sensors/acceleration_init.c \
|
|
sensors/boardalignment.c \
|
|
sensors/compass.c \
|
|
sensors/gyro.c \
|
|
sensors/gyro_init.c \
|
|
sensors/initialisation.c \
|
|
blackbox/blackbox.c \
|
|
blackbox/blackbox_encoding.c \
|
|
blackbox/blackbox_io.c \
|
|
cms/cms.c \
|
|
cms/cms_menu_blackbox.c \
|
|
cms/cms_menu_failsafe.c \
|
|
cms/cms_menu_firmware.c \
|
|
cms/cms_menu_gps_rescue.c \
|
|
cms/cms_menu_gps_lap_timer.c \
|
|
cms/cms_menu_imu.c \
|
|
cms/cms_menu_ledstrip.c \
|
|
cms/cms_menu_main.c \
|
|
cms/cms_menu_misc.c \
|
|
cms/cms_menu_osd.c \
|
|
cms/cms_menu_power.c \
|
|
cms/cms_menu_saveexit.c \
|
|
cms/cms_menu_vtx_common.c \
|
|
cms/cms_menu_vtx_rtc6705.c \
|
|
cms/cms_menu_vtx_smartaudio.c \
|
|
cms/cms_menu_vtx_tramp.c \
|
|
cms/cms_menu_persistent_stats.c \
|
|
cms/cms_menu_rpm_limit.c \
|
|
cms/cms_menu_quick.c \
|
|
drivers/display_ug2864hsweg01.c \
|
|
drivers/light_ws2811strip.c \
|
|
drivers/rangefinder/rangefinder_hcsr04.c \
|
|
drivers/rangefinder/rangefinder_lidartf.c \
|
|
drivers/rangefinder/rangefinder_lidarmt.c \
|
|
drivers/vtx_common.c \
|
|
drivers/vtx_table.c \
|
|
io/dashboard.c \
|
|
io/displayport_frsky_osd.c \
|
|
io/displayport_max7456.c \
|
|
io/displayport_msp.c \
|
|
io/displayport_oled.c \
|
|
io/displayport_srxl.c \
|
|
io/displayport_crsf.c \
|
|
io/displayport_hott.c \
|
|
io/frsky_osd.c \
|
|
io/gimbal_control.c \
|
|
io/rcdevice_cam.c \
|
|
io/rcdevice.c \
|
|
io/gps.c \
|
|
io/ledstrip.c \
|
|
io/pidaudio.c \
|
|
osd/osd.c \
|
|
osd/osd_elements.c \
|
|
osd/osd_warnings.c \
|
|
sensors/barometer.c \
|
|
sensors/rangefinder.c \
|
|
telemetry/telemetry.c \
|
|
telemetry/crsf.c \
|
|
telemetry/ghst.c \
|
|
telemetry/srxl.c \
|
|
telemetry/frsky_hub.c \
|
|
telemetry/hott.c \
|
|
telemetry/jetiexbus.c \
|
|
telemetry/smartport.c \
|
|
telemetry/ltm.c \
|
|
telemetry/mavlink.c \
|
|
telemetry/msp_shared.c \
|
|
telemetry/ibus.c \
|
|
telemetry/ibus_shared.c \
|
|
sensors/esc_sensor.c \
|
|
io/vtx.c \
|
|
io/vtx_rtc6705.c \
|
|
io/vtx_smartaudio.c \
|
|
io/vtx_tramp.c \
|
|
io/vtx_control.c \
|
|
io/vtx_msp.c \
|
|
cms/cms_menu_vtx_msp.c
|
|
|
|
ifneq ($(SIMULATOR_BUILD),yes)
|
|
|
|
COMMON_SRC += \
|
|
drivers/bus_spi.c \
|
|
drivers/serial_uart.c \
|
|
drivers/accgyro/accgyro_mpu3050.c \
|
|
drivers/accgyro/accgyro_mpu6050.c \
|
|
drivers/accgyro/accgyro_mpu6500.c \
|
|
drivers/accgyro/accgyro_mpu.c \
|
|
drivers/accgyro/accgyro_spi_bmi160.c \
|
|
drivers/accgyro/accgyro_spi_bmi270.c \
|
|
drivers/accgyro/accgyro_spi_icm20649.c \
|
|
drivers/accgyro/accgyro_spi_icm20689.c \
|
|
drivers/accgyro/accgyro_spi_icm426xx.c \
|
|
drivers/accgyro/accgyro_spi_l3gd20.c \
|
|
drivers/accgyro/accgyro_spi_lsm6dso.c \
|
|
drivers/accgyro/accgyro_spi_lsm6dso_init.c \
|
|
drivers/accgyro/accgyro_spi_lsm6dsv16x.c \
|
|
drivers/accgyro/accgyro_spi_mpu6000.c \
|
|
drivers/accgyro/accgyro_spi_mpu6500.c \
|
|
drivers/accgyro/accgyro_spi_mpu9250.c \
|
|
drivers/accgyro/accgyro_virtual.c \
|
|
drivers/accgyro/gyro_sync.c \
|
|
BoschSensortec/BMI270-Sensor-API/bmi270_maximum_fifo.c \
|
|
drivers/barometer/barometer_2smpb_02b.c \
|
|
drivers/barometer/barometer_bmp085.c \
|
|
drivers/barometer/barometer_bmp280.c \
|
|
drivers/barometer/barometer_bmp388.c \
|
|
drivers/barometer/barometer_dps310.c \
|
|
drivers/barometer/barometer_lps22df.c \
|
|
drivers/barometer/barometer_lps.c \
|
|
drivers/barometer/barometer_ms5611.c \
|
|
drivers/barometer/barometer_qmp6988.c \
|
|
drivers/barometer/barometer_virtual.c \
|
|
drivers/compass/compass_ak8963.c \
|
|
drivers/compass/compass_ak8975.c \
|
|
drivers/compass/compass_hmc5883l.c \
|
|
drivers/compass/compass_ist8310.c \
|
|
drivers/compass/compass_lis2mdl.c \
|
|
drivers/compass/compass_lis3mdl.c \
|
|
drivers/compass/compass_mpu925x_ak8963.c \
|
|
drivers/compass/compass_qmc5883l.c \
|
|
drivers/compass/compass_virtual.c \
|
|
drivers/max7456.c \
|
|
drivers/vtx_rtc6705.c \
|
|
drivers/vtx_rtc6705_soft_spi.c
|
|
|
|
ifneq ($(GYRO_DEFINE),)
|
|
|
|
LEGACY_GYRO_DEFINES := USE_GYRO_L3GD20
|
|
ifneq ($(findstring $(GYRO_DEFINE),$(LEGACY_GYRO_DEFINES)),)
|
|
|
|
LEGACY_SRC := \
|
|
drivers/accgyro/legacy/accgyro_adxl345.c \
|
|
drivers/accgyro/legacy/accgyro_bma280.c \
|
|
drivers/accgyro/legacy/accgyro_l3g4200d.c \
|
|
drivers/accgyro/legacy/accgyro_lsm303dlhc.c \
|
|
drivers/accgyro/legacy/accgyro_mma845x.c
|
|
|
|
COMMON_SRC += $(LEGACY_SRC)
|
|
SPEED_OPTIMISED_SRC += $(LEGACY_SRC)
|
|
|
|
endif
|
|
endif
|
|
|
|
RX_SRC = \
|
|
drivers/rx/expresslrs_driver.c \
|
|
drivers/rx/rx_a7105.c \
|
|
drivers/rx/rx_cc2500.c \
|
|
drivers/rx/rx_cyrf6936.c \
|
|
drivers/rx/rx_nrf24l01.c \
|
|
drivers/rx/rx_pwm.c \
|
|
drivers/rx/rx_spi.c \
|
|
drivers/rx/rx_sx127x.c \
|
|
drivers/rx/rx_sx1280.c \
|
|
drivers/rx/rx_xn297.c \
|
|
rx/cc2500_common.c \
|
|
rx/cc2500_frsky_shared.c \
|
|
rx/cc2500_frsky_d.c \
|
|
rx/cc2500_frsky_x.c \
|
|
rx/cc2500_sfhss.c \
|
|
rx/cc2500_redpine.c \
|
|
rx/a7105_flysky.c \
|
|
rx/cyrf6936_spektrum.c \
|
|
rx/expresslrs.c \
|
|
rx/expresslrs_common.c \
|
|
rx/expresslrs_telemetry.c
|
|
|
|
FLASH_SRC += \
|
|
drivers/flash/flash.c \
|
|
drivers/flash/flash_m25p16.c \
|
|
drivers/flash/flash_w25m.c \
|
|
drivers/flash/flash_w25n.c \
|
|
drivers/flash/flash_w25q128fv.c \
|
|
io/flashfs.c
|
|
|
|
SDCARD_SRC += \
|
|
drivers/sdcard.c \
|
|
drivers/sdcard_spi.c \
|
|
drivers/sdcard_sdio_baremetal.c \
|
|
drivers/sdcard_standard.c \
|
|
io/asyncfatfs/asyncfatfs.c \
|
|
io/asyncfatfs/fat_standard.c
|
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
$(FATFS_DIR)
|
|
VPATH := $(VPATH):$(FATFS_DIR)
|
|
|
|
# Gyro driver files that only contain initialization and configuration code - not runtime code
|
|
SIZE_OPTIMISED_SRC += \
|
|
drivers/accgyro/accgyro_mpu6050.c \
|
|
drivers/accgyro/accgyro_mpu6500.c \
|
|
drivers/accgyro/accgyro_spi_mpu6000.c \
|
|
drivers/accgyro/accgyro_spi_mpu6500.c \
|
|
drivers/accgyro/accgyro_spi_mpu9250.c \
|
|
drivers/accgyro/accgyro_spi_icm20689.c \
|
|
drivers/accgyro/accgyro_spi_icm426xx.c \
|
|
drivers/accgyro/accgyro_spi_lsm6dso_init.c
|
|
|
|
SPEED_OPTIMISED_SRC += \
|
|
drivers/bus_spi.c \
|
|
drivers/serial_uart.c \
|
|
drivers/accgyro/accgyro_mpu.c \
|
|
drivers/accgyro/accgyro_mpu3050.c \
|
|
drivers/accgyro/accgyro_spi_bmi160.c \
|
|
drivers/accgyro/accgyro_spi_bmi270.c \
|
|
drivers/accgyro/accgyro_spi_lsm6dso.c
|
|
|
|
endif
|
|
|
|
COMMON_DEVICE_SRC = \
|
|
$(CMSIS_SRC) \
|
|
$(DEVICE_STDPERIPH_SRC)
|
|
|
|
COMMON_SRC := $(COMMON_SRC) $(COMMON_DEVICE_SRC) $(RX_SRC)
|
|
|
|
ifeq ($(EXST),yes)
|
|
TARGET_FLAGS := -DUSE_EXST $(TARGET_FLAGS)
|
|
endif
|
|
|
|
ifeq ($(RAM_BASED),yes)
|
|
TARGET_FLAGS := -DUSE_EXST -DCONFIG_IN_RAM -DRAMBASED $(TARGET_FLAGS)
|
|
endif
|
|
|
|
ifeq ($(SIMULATOR_BUILD),yes)
|
|
TARGET_FLAGS := -DSIMULATOR_BUILD $(TARGET_FLAGS)
|
|
endif
|
|
|
|
SPEED_OPTIMISED_SRC += \
|
|
common/encoding.c \
|
|
common/filter.c \
|
|
common/maths.c \
|
|
common/pwl.c \
|
|
common/sdft.c \
|
|
common/stopwatch.c \
|
|
common/typeconversion.c \
|
|
common/vector.c \
|
|
drivers/buf_writer.c \
|
|
drivers/bus.c \
|
|
drivers/bus_quadspi.c \
|
|
drivers/io.c \
|
|
drivers/serial.c \
|
|
fc/core.c \
|
|
fc/tasks.c \
|
|
fc/rc.c \
|
|
fc/rc_controls.c \
|
|
fc/runtime_config.c \
|
|
flight/dyn_notch_filter.c \
|
|
flight/imu.c \
|
|
flight/mixer.c \
|
|
flight/pid.c \
|
|
flight/rpm_filter.c \
|
|
rx/ibus.c \
|
|
rx/rc_stats.c \
|
|
rx/rx.c \
|
|
rx/rx_spi.c \
|
|
rx/crsf.c \
|
|
rx/frsky_crc.c \
|
|
rx/sbus.c \
|
|
rx/sbus_channels.c \
|
|
rx/spektrum.c \
|
|
rx/srxl2.c \
|
|
rx/sumd.c \
|
|
rx/xbus.c \
|
|
rx/fport.c \
|
|
rx/frsky_crc.c \
|
|
scheduler/scheduler.c \
|
|
sensors/acceleration.c \
|
|
sensors/boardalignment.c \
|
|
sensors/gyro.c \
|
|
$(CMSIS_SRC) \
|
|
$(DEVICE_STDPERIPH_SRC) \
|
|
|
|
SIZE_OPTIMISED_SRC := $(SIZE_OPTIMISED_SRC) \
|
|
$(shell find $(SRC_DIR) -name '*_init.c') \
|
|
bus_bst_stm32f30x.c \
|
|
cli/cli.c \
|
|
cli/settings.c \
|
|
drivers/accgyro/accgyro_fake.c \
|
|
drivers/barometer/barometer_bmp085.c \
|
|
drivers/barometer/barometer_bmp280.c \
|
|
drivers/barometer/barometer_fake.c \
|
|
drivers/barometer/barometer_ms5611.c \
|
|
drivers/barometer/barometer_lps.c \
|
|
drivers/barometer/barometer_qmp6988.c \
|
|
drivers/barometer/barometer_2smpb_02b.c \
|
|
drivers/bus_i2c_config.c \
|
|
drivers/bus_i2c_timing.c \
|
|
drivers/bus_spi_config.c \
|
|
drivers/bus_spi_pinconfig.c \
|
|
drivers/compass/compass_ak8963.c \
|
|
drivers/compass/compass_ak8975.c \
|
|
drivers/compass/compass_fake.c \
|
|
drivers/compass/compass_hmc5883l.c \
|
|
drivers/compass/compass_qmc5883l.c \
|
|
drivers/compass/compass_lis2mdl.c \
|
|
drivers/compass/compass_lis3mdl.c \
|
|
drivers/compass/compass_ist8310.c \
|
|
drivers/display_ug2864hsweg01.c \
|
|
drivers/inverter.c \
|
|
drivers/light_ws2811strip.c \
|
|
drivers/serial_escserial.c \
|
|
drivers/serial_pinconfig.c \
|
|
drivers/serial_tcp.c \
|
|
drivers/serial_uart_pinconfig.c \
|
|
drivers/serial_usb_vcp.c \
|
|
drivers/vtx_rtc6705_soft_spi.c \
|
|
drivers/vtx_rtc6705.c \
|
|
drivers/vtx_common.c \
|
|
fc/init.c \
|
|
fc/board_info.c \
|
|
config/config_eeprom.c \
|
|
config/feature.c \
|
|
config/config_streamer.c \
|
|
config/simplified_tuning.c \
|
|
i2c_bst.c \
|
|
io/dashboard.c \
|
|
io/serial.c \
|
|
io/serial_4way.c \
|
|
io/serial_4way_avrootloader.c \
|
|
io/serial_4way_stk500v2.c \
|
|
io/transponder_ir.c \
|
|
io/usb_cdc_hid.c \
|
|
msp/msp_serial.c \
|
|
cms/cms.c \
|
|
cms/cms_menu_blackbox.c \
|
|
cms/cms_menu_failsafe.c \
|
|
cms/cms_menu_firmware.c \
|
|
cms/cms_menu_gps_rescue.c \
|
|
cms/cms_menu_gps_lap_timer.c \
|
|
cms/cms_menu_imu.c \
|
|
cms/cms_menu_ledstrip.c \
|
|
cms/cms_menu_main.c \
|
|
cms/cms_menu_misc.c \
|
|
cms/cms_menu_osd.c \
|
|
cms/cms_menu_power.c \
|
|
cms/cms_menu_saveexit.c \
|
|
cms/cms_menu_vtx_common.c \
|
|
cms/cms_menu_vtx_rtc6705.c \
|
|
cms/cms_menu_vtx_smartaudio.c \
|
|
cms/cms_menu_vtx_tramp.c \
|
|
cms/cms_menu_persistent_stats.c \
|
|
cms/cms_menu_rpm_limit.c \
|
|
cms/cms_menu_quick.c \
|
|
io/vtx.c \
|
|
io/vtx_rtc6705.c \
|
|
io/vtx_smartaudio.c \
|
|
io/vtx_tramp.c \
|
|
io/vtx_control.c \
|
|
io/spektrum_vtx_control.c \
|
|
osd/osd.c \
|
|
osd/osd_elements.c \
|
|
osd/osd_warnings.c \
|
|
rx/rx_bind.c \
|
|
io/vtx_msp.c \
|
|
cms/cms_menu_vtx_msp.c
|
|
|
|
SIZE_OPTIMISED_SRC := $(SIZE_OPTIMISED_SRC) \
|
|
drivers/bus_i2c_hal_init.c
|
|
|
|
# check if target.mk supplied
|
|
SRC := $(STARTUP_SRC) $(MCU_COMMON_SRC) $(TARGET_SRC) $(VARIANT_SRC)
|
|
|
|
# Files that should not be optimized, useful for debugging IMPRECISE cpu faults.
|
|
# Specify FULL PATH, e.g. "./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_ll_sdmmc.c"
|
|
NOT_OPTIMISED_SRC := $(NOT_OPTIMISED_SRC) \
|
|
|
|
ifneq ($(DSP_LIB),)
|
|
|
|
INCLUDE_DIRS += $(DSP_LIB)/Include
|
|
SRC += $(wildcard $(DSP_LIB)/Source/*/*.S)
|
|
|
|
endif
|
|
|
|
SRC += $(FLASH_SRC) $(MSC_SRC) $(SDCARD_SRC) $(COMMON_SRC)
|
|
|
|
#excludes
|
|
SRC := $(filter-out $(MCU_EXCLUDES), $(SRC))
|
|
|
|
SRC += $(VCP_SRC)
|
|
|
|
# end target specific make file checks
|
|
|
|
# Search path and source files for the Open Location Code library
|
|
OLC_DIR := google/olc
|
|
|
|
ifneq ($(OLC_DIR),)
|
|
INCLUDE_DIRS += $(LIB_MAIN_DIR)/$(OLC_DIR)
|
|
SRC += $(OLC_DIR)/olc.c
|
|
SIZE_OPTIMISED_SRC += $(OLC_DIR)/olc.c
|
|
endif
|