From 8be2ef0c0ea8dd776e0b0567269eef7cf75c7b00 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 10 Apr 2024 00:49:35 +1000 Subject: [PATCH] AP_HAL_ChibiOS: remove redundant lines from hwdef files --- libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef.dat | 3 --- libraries/AP_HAL_ChibiOS/hwdef/CSKY405/hwdef.dat | 1 - libraries/AP_HAL_ChibiOS/hwdef/F35Lightning/hwdef.dat | 3 --- libraries/AP_HAL_ChibiOS/hwdef/HEEWING-F405/hwdef.dat | 1 - libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef.dat | 3 --- .../AP_HAL_ChibiOS/hwdef/KakuteH7Mini-Nand/hwdef.dat | 2 -- libraries/AP_HAL_ChibiOS/hwdef/MatekF405-CAN/hwdef.dat | 1 - libraries/AP_HAL_ChibiOS/hwdef/MatekF405-TE/hwdef.dat | 2 -- libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat | 8 -------- libraries/AP_HAL_ChibiOS/hwdef/MatekF405-bdshot/hwdef.dat | 1 - libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat | 3 +-- libraries/AP_HAL_ChibiOS/hwdef/OmnibusNanoV6/hwdef.dat | 2 -- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat | 6 +++--- libraries/AP_HAL_ChibiOS/hwdef/SuccexF4/hwdef.dat | 1 - .../AP_HAL_ChibiOS/hwdef/include/minimize_features.inc | 1 - .../AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc | 5 ++--- .../AP_HAL_ChibiOS/hwdef/omnibusf4pro-bdshot/hwdef.dat | 1 - libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat | 1 - libraries/AP_HAL_ChibiOS/hwdef/revo-mini-i2c/hwdef.dat | 2 -- libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat | 2 -- libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat | 1 - 21 files changed, 6 insertions(+), 44 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef.dat index 4980924ee3570..364ea0a0bd76a 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef.dat @@ -58,6 +58,3 @@ IMU BMI270 SPI:bmi270 ROTATION_ROLL_180_YAW_225 # v2 has no BARO define HAL_BARO_ALLOW_INIT_NO_BARO 1 - -# save some flash -include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CSKY405/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CSKY405/hwdef.dat index 88966354d0548..636724294de32 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CSKY405/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CSKY405/hwdef.dat @@ -170,7 +170,6 @@ define HAL_DEFAULT_AIRSPEED_PIN 10 # -------reduce max size of embedded params for apj_tool.py define AP_PARAM_MAX_EMBEDDED_PARAM 1024 -define HAL_GYROFFT_ENABLED 0 # --------------------- save flash ---------------------- # save some flash diff --git a/libraries/AP_HAL_ChibiOS/hwdef/F35Lightning/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/F35Lightning/hwdef.dat index cccc1e50bb754..88260318626d0 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/F35Lightning/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/F35Lightning/hwdef.dat @@ -155,9 +155,6 @@ define HAL_BATT_CURR_PIN 12 define HAL_BATT_VOLT_SCALE 11 define HAL_BATT_CURR_SCALE 25 -# minimal drivers to reduce flash usage -include ../include/no_bootloader_DFU.inc - # enable IMU fast sampling define HAL_DEFAULT_INS_FAST_SAMPLE 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/HEEWING-F405/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/HEEWING-F405/hwdef.dat index 95fa1e38c3c21..68926f04e5401 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/HEEWING-F405/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/HEEWING-F405/hwdef.dat @@ -154,7 +154,6 @@ define HAL_BATT_CURR_SCALE 26.7 #define HAL_DEFAULT_AIRSPEED_PIN 10 define HAL_WITH_DSP FALSE -define HAL_GYROFFT_ENABLED 0 include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef.dat index 80b518f40c382..3c738a06fa432 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef.dat @@ -152,9 +152,6 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin # disable parachute and sprayer to save flash define HAL_PARACHUTE_ENABLED 0 -define HAL_SPRAYER_ENABLED 0 - -define HAL_MOUNT_ENABLED 0 # save some flash include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini-Nand/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini-Nand/hwdef.dat index c7f40c34072c1..98d7f7c038865 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini-Nand/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini-Nand/hwdef.dat @@ -10,5 +10,3 @@ SPIDEV bmi270 SPI4 DEVID1 MPU6000_CS MODE3 1*MHZ 4*MHZ IMU BMI270 SPI:bmi270 ROTATION_PITCH_180_YAW_90 define HAL_LOGGING_DATAFLASH_DRIVER AP_Logger_W25N01GV - -define DEFAULT_NTF_LED_TYPES 257 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-CAN/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-CAN/hwdef.dat index d40dc7f189228..84f6ebb815ab7 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-CAN/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-CAN/hwdef.dat @@ -161,7 +161,6 @@ define HAL_BATT2_VOLT_SCALE 11.0 # --------------------- save flash ---------------------- include ../include/minimize_features.inc -include ../include/minimal_GPS.inc undef AP_BATTERY_SMBUS_ENABLED define AP_BATTERY_SMBUS_ENABLED 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-TE/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-TE/hwdef.dat index 820b64fb1abc5..c9033143bdfd1 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-TE/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-TE/hwdef.dat @@ -166,8 +166,6 @@ define HAL_BATT_CURR_SCALE 66.7 define BOARD_RSSI_ANA_PIN 8 define HAL_DEFAULT_AIRSPEED_PIN 10 -define HAL_GYROFFT_ENABLED 0 - # --------------------- save flash ---------------------- # save some flash include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat index 12a58593d9804..0af6d1efb76a1 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat @@ -180,18 +180,10 @@ define OSD_ENABLED 1 define HAL_OSD_TYPE_DEFAULT 1 ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin -define HAL_GYROFFT_ENABLED 0 - # save some flash -define AP_GRIPPER_ENABLED 0 define HAL_PARACHUTE_ENABLED 0 -define HAL_SPRAYER_ENABLED 0 define HAL_RUNCAM_ENABLED 0 -define HAL_HOTT_TELEM_ENABLED 0 -define HAL_NMEA_OUTPUT_ENABLED 0 define HAL_BUTTON_ENABLED 0 -define AP_NOTIFY_OREOLED_ENABLED 0 -define HAL_PICCOLO_CAN_ENABLE 0 include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-bdshot/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-bdshot/hwdef.dat index 5c4ea93b692c2..5d9f76f2ca23d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-bdshot/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-bdshot/hwdef.dat @@ -1,7 +1,6 @@ # Bi-directional dshot version of MatekF405 include ../MatekF405/hwdef.dat -include ../include/minimal_GPS.inc undef PC6 PC9 PA8 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat index a276cb828c932..ead1a2743f7da 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat @@ -156,9 +156,8 @@ define OSD_ENABLED 1 define HAL_OSD_TYPE_DEFAULT 1 ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin -# disable parachute and sprayer to save flash +# disable parachute to save flash define HAL_PARACHUTE_ENABLED 0 -define HAL_SPRAYER_ENABLED 0 # save some flash include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/OmnibusNanoV6/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/OmnibusNanoV6/hwdef.dat index 5a9b40c46d259..84a127f43e361 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/OmnibusNanoV6/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/OmnibusNanoV6/hwdef.dat @@ -146,7 +146,5 @@ define HAL_OSD_TYPE_DEFAULT 1 #font for the osd ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin -define HAL_MOUNT_ENABLED 0 - # minimal drivers to reduce flash usage include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat index b0c52d2c35225..a08b61107b21c 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat @@ -3,9 +3,8 @@ include ../Pixhawk1/hwdef.dat -# only include UBLOX and NMEA GPS drivers +# include NMEA GPS driver define AP_GPS_NMEA_ENABLED 1 -include ../include/minimal_GPS.inc FLASH_SIZE_KB 1024 include ../include/minimize_features.inc @@ -17,4 +16,5 @@ define BOARD_CHECK_F427_USE_2M "2M flash - use Pixhawk1 firmware" # enable support for dshot on iomcu undef ROMFS ROMFS io_firmware.bin Tools/IO_Firmware/iofirmware_lowpolh.bin -undef HAL_WITH_IO_MCU_DSHOT \ No newline at end of file +undef HAL_WITH_IO_MCU_DSHOT + diff --git a/libraries/AP_HAL_ChibiOS/hwdef/SuccexF4/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/SuccexF4/hwdef.dat index 0aee0204d09d6..5219afd50f217 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/SuccexF4/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/SuccexF4/hwdef.dat @@ -126,7 +126,6 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin # disable parachute and sprayer to save flash define HAL_PARACHUTE_ENABLED 0 -define HAL_SPRAYER_ENABLED 0 # minimal drivers to reduce flash usage include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc index c5fb0c8550ba8..cf7e745ee5a8d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc @@ -30,5 +30,4 @@ define HAL_MSP_ENABLED 0 # Copter-specific defines; these defines are only used in the Copter # directory, but are seen across the entire codebase: -define MODE_FLOWHOLD_ENABLED 0 define MODE_TURTLE_ENABLED 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc index 05a48aec9219d..11be0caeab143 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc @@ -6,10 +6,9 @@ include minimize_common.inc define AP_OPTICALFLOW_ENABLED 0 -define AP_GPS_BACKEND_DEFAULT_ENABLED 0 -define AP_GPS_UBLOX_ENABLED 1 +# minimize_common.py removes backends except for a select few. Add +# some back in: define AP_GPS_NMEA_ENABLED 1 -define HAL_MSP_GPS_ENABLED HAL_MSP_SENSORS_ENABLED define AP_MOTORS_FRAME_DEFAULT_ENABLED 0 define AP_MOTORS_FRAME_QUAD_ENABLED 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro-bdshot/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro-bdshot/hwdef.dat index 3fa7b0b70c6bd..96483cbf8b9ba 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro-bdshot/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro-bdshot/hwdef.dat @@ -2,7 +2,6 @@ # Buzzer timer is required so becomes single tone include ../omnibusf4pro/hwdef.dat -include ../include/minimal_GPS.inc undef PB0 PB1 PA3 PB4 PA2 PA1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat index 1413596b7de24..df870671bd464 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat @@ -149,6 +149,5 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin # disable parachute and sprayer to save flash define HAL_PARACHUTE_ENABLED 0 -define HAL_SPRAYER_ENABLED 0 include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/revo-mini-i2c/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/revo-mini-i2c/hwdef.dat index b7a2ebc1277a2..11a600bc64a0f 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/revo-mini-i2c/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/revo-mini-i2c/hwdef.dat @@ -149,8 +149,6 @@ SPIDEV dataflash SPI3 DEVID1 FLASH_CS MODE3 32*MHZ 32*MHZ # enable logging to dataflash define HAL_LOGGING_DATAFLASH_ENABLED 1 -define HAL_GYROFFT_ENABLED 0 - # bootloader embedding / bootloader flashing not available define AP_BOOTLOADER_FLASHING_ENABLED 0 include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat index 0a9e00e28a25e..d840f50946a22 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat @@ -127,6 +127,4 @@ SPIDEV dataflash SPI3 DEVID1 FLASH_CS MODE3 32*MHZ 32*MHZ # enable logging to dataflash define HAL_LOGGING_DATAFLASH_ENABLED 1 -define HAL_GYROFFT_ENABLED 0 - include ../include/minimize_fpv_osd.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat index e6a372e92d512..e6bc82ba767e0 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat @@ -69,7 +69,6 @@ env BUILD_ABIN True # Disable un-needed hardware drivers include ../include/skyviper.inc -define AP_AIRSPEED_ENABLED 0 define AP_BEACON_ENABLED 0 define AP_OPTICALFLOW_ENABLED 0 define AP_FRSKY_TELEM_ENABLED 0