Files
ardupilot/libraries/AP_HAL_ChibiOS
Peter BarkerandClaude Fable 5 cd5c3b458b hwdef: remove defines which are consumed nowhere in the codebase
Each of these "define NAME value" lines creates a macro which no code,
script or ChibiOS source references, so they have no effect:

 - ALLOW_ARM_NO_GPS (AeroCogito-H7Digital): no such macro (unlike
   ALLOW_ARM_NO_COMPASS, which is consumed by AP_Arming_Copter.cpp)
 - AP_BATTERY_TIBQ76952_I2C_DEVICE (VM-L431-BMS): driver uses
   AP_BATTMON_TIBQ76952_BUS/_ADDR
 - AP_COMPASS_IST8308_DEFAULT_ROTATION (GreenSightUltraBlue): no such
   macro; rotation comes from the COMPASS line
 - HAL_BLHELI_PASSTHROUGH_ENABLED/_UART and
   HAL_ESC_TELEMETRY_UART/_ENABLED (NucleoH753ZI): no such macros
 - HAL_CAN_ENABLED, HAL_CAN_NUM_DRIVERS (SkyRukh_Surge_H7): obsolete;
   CAN interface count is derived from the CAN pin definitions
 - HAL_HEATER3_GPIO_PIN, HAL_HEATER4_GPIO_PIN (rFCU): IMU_heater.cpp
   only supports HAL_HEATER_GPIO_PIN and HAL_HEATER2_GPIO_PIN
 - HAL_BL_IOMCU_FW_DETECT and HAL_IO_FMU_COMMS_TX_DMA_CHANNEL/
   _RX_DMA_STREAM/_RX_DMA_CHANNEL (CubeRedSecondary-IO): iofirmware
   only consumes HAL_IO_FMU_COMMS_TX_DMA_STREAM and
   HAL_IO_FMU_COMMS_TX_IRQ_PRIORITY, which are retained
 - HAL_LED_OFF (OrqaH7QuadCore, SkystarsH7HD bootloaders): bootloader
   uses HAL_LED_ON and derives off as !HAL_LED_ON
 - HAL_BOOTLOADER_NAME, HAL_BOOTLOADER_BOOT_FROM_SDCARD
   (PilotGaeaSH7V1-bdshot): no such macros; SD-card boot would be
   AP_BOOTLOADER_FLASH_FROM_SD_ENABLED
 - HAL_BUZZER_ON (SIMPLIFLYH7): no buzzer-polarity macro exists
 - HAL_NEOPIXEL_COUNT (KakuteF4): no such macro; LED count comes from
   the NTF_LED_LEN parameter
 - VDD_BRICK2_VALID (sparknavi-blue): only meaningful as a pin label,
   which this board does not have; as a bare define it does nothing
 - HAL_HEATER_MAG_OFFSET_RM3100 (ZeroOneX6): the consuming
   HAL_HEATER_MAG_OFFSET define is commented out, and the offset
   vector is zero in any case

All affected boards still process cleanly through chibios_hwdef.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-05 14:00:50 +10:00
..
…
…
…
…
…
…
…
…
…