Commit Graph
4034 Commits
Author SHA1 Message Date
HGLRC 70ecdeb5b3 AP_HAL_ChibiOS: add HGLRC H743 EVO board support 2026-08-19 16:59:40 +01:00
Henry Wurzburg 048246c394 hwdef: set VTX power pin default in the bootloader on 12 boards
The VTX power switch pin is defined with a default OUTPUT level in
hwdef.dat, but was never mirrored into hwdef-bl.dat. Since ChibiOS's own
unconfigured-pin default is INPUT FLOATING, the pin floated for the
entire time each of these boards sat in the bootloader (DFU / SD-card
flashing), even though the main firmware correctly drove it once it
booted. Add the matching line so the VTX power rail has a defined state
throughout.

- AEDROXH7 (PB12 VTX_SW)
- DAKEFPVF405 (PB4 VTX_PWR)
- DAKEFPVH743Pro (PE3 PINIO2)
- FlyFishRCF405 (PC5 PINIO1)
- HWH7 (PE4 VTX_POWER)
- JHEMCUF405WING (PC13 PINIO1)
- LongBowF405WING (PC13 PINIO1)
- OrqaF405Pro (PB9 VTX_SW)
- SIMPLIFLYH7 (PB2 PINIO1)
- SPEDIXH743 (PA2 VTX_SW)
- SpeedyBeeF405WING (PC13 PINIO1)
- speedybeef4v5 (PC13 VTX_PWR)
2026-08-19 17:18:45 +10:00
abhijithcv d265dfeb83 AP_HAL_ChibiOS: add Agam MegH7 board 2026-08-18 10:53:02 +10:00
RomanKalinchuk 5558077728 AP_HAL_ChibiOS: add support for FlyFishRC F405 flight controller
STM32F405 based board with ICM-42688-P IMU, DPS310 barometer,
MAX7456 OSD, onboard dataflash, 8 PWM outputs, hardware SBUS
inverter on USART2, and USB OTG.
2026-08-17 17:39:34 +10:00
serkanMzlm bb1e0ef1bf AP_HAL_ChibiOS: add Lectron-Pi5-H7 board 2026-08-17 11:01:09 +10:00
dakefpv 339d9e339e hwdef: DAKEFPV adds support for LSM6DSV and BMI270 IMUs 2026-08-10 12:51:28 +10:00
Peter BarkerandClaude Opus 5 ba36131aa5 hwdef: remove defines which are already in effect with the same value
Processing these hwdefs printed "<name> already in defines with same
value".  In four of them the board repeats a define it has just taken
from the hwdef it includes:

  DAKEFPVH743            DEFAULT_NTF_LED_TYPES  from DAKEFPVH743Pro
  MatekF765-Wing-bdshot  DEFAULT_NTF_LED_TYPES  from MatekF765-Wing
  SkystarsH7HDv2         AP_MSP_VIDEOTX_ENABLED from SkystarsH7HD-bdshot
  TBS_LUCID_H7_WING      DEFAULT_NTF_LED_TYPES  from TBS_LUCID_H7

and in the other two the same define appears twice in the one file:

  sparknavi-blue         HAL_WITH_RAMTRON
  esp32diy               HAL_LOGGING_BACKENDS_DEFAULT

The generated hwdef.h held each of these twice, as an identical
redefinition, and now holds it once; the value reaching the compiler is
unchanged.  hw.dat loses the line too, so it and the ROMFS which
embeds it are one line shorter.

Parsed state - defines, intdefines, config, pins and the rest - is
unchanged for all 490 boards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 19:24:04 +10:00
Peter BarkerandClaude Opus 5 12cf96348b hwdef: test alternative-function labels with one startswith
Three places looped over af_labels asking whether a label named an
alternative function, and none of them used the entry which matched.
str.startswith() takes a tuple of prefixes and does the whole test at
once, so ask it that way instead; two of the three are in
get_alt_function(), which is called for every pin line.

Processing all 443 ChibiOS hwdefs goes from 0.335s to 0.325s.  The
parse state of all 490 boards is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 19:24:04 +10:00
Peter BarkerandClaude Opus 5 df68c8cf0a hwdef: compile valid_type's peripheral-number regexes
valid_type() still ran nine uncompiled re.match() calls for every pin
line, cross-checking the peripheral number in a pin's type against the
one in its label.  Compile them once as class members.

Processing all 443 ChibiOS hwdefs goes from 0.35s to 0.32s.  The parse
state of all 490 boards is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 19:24:04 +10:00
Peter BarkerandClaude Opus 5 274aa0f44c hwdef: stop splitting each hwdef line three times
Every line was split into words three times over: once by
process_file() to see whether it was an include line, once by the
HAL-specific process_line(), and once again by the base
process_line() the HAL-specific one delegates to.

Have process_line() take the words the caller has already split out,
and only split in process_file() for lines which could be an include.
That takes the number of splits done to process all 443 ChibiOS hwdefs
from 140374 to 56389, and the time from 0.40s to 0.35s.

The parse state of all 490 boards, and the hwdef.h, ldscript.ld and
hw.dat generated for a sample of 14 boards and their bootloaders, are
unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 19:24:04 +10:00
Peter BarkerandClaude Opus 5 c5ce5fd3f6 hwdef: compile the pin-type regex once, cache MCU modules
valid_type() rebuilt an 18-entry list of patterns and ran up to 18
uncompiled re.match() calls for every pin line in every hwdef.  Compile
the alternation once as a class member instead.

get_mcu_lib() called importlib.import_module() every time, which is
also once per pin line; remember the module we found.

Together these take processing all 443 ChibiOS hwdefs from 0.45s to
0.40s.  The parse state of all 490 boards is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 19:24:04 +10:00
Peter BarkerandClaude Opus 5 842aa07984 hwdef: avoid shlex when splitting simple hwdef lines
shlex is a character-at-a-time lexer written in Python, and it
dominated the cost of processing hwdefs: 65% of the time spent parsing
all 443 ChibiOS hwdefs was inside shlex.split().

Almost no hwdef line needs it.  A line containing none of shlex's
special characters, whose whitespace is only spaces and tabs, is split
identically by str.split(); 99.1% of the lines the parser sees qualify.
Take that path when it applies and fall back to shlex otherwise.

Processing all 443 ChibiOS hwdefs goes from 1.39s to 0.45s.  The parse
state of all 490 boards, and the hwdef.h, ldscript.ld and hw.dat
generated for a sample of 13 boards and their bootloaders, are
unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 19:24:04 +10:00
Jacob Dahl b0ede4ff21 hwdef: ARK_RTK_GPS: do not save u-blox config to receiver flash
AP_Periph configures the ZED-F9P from its own parameters at every boot, so
the copy saved into the receiver's flash is never the source of truth. Each
save is a UBX-CFG-CFG sent with no deviceMask, which the receiver applies to
BBR and flash: an erase and program of the whole flash configuration layer.

That write lands 5s or more after startup and only while disarmed, which is
exactly when a unit is likely to be unplugged, and the receiver shares the
board supply so there is no orderly shutdown. A power cut mid-save can leave
the configuration layer corrupt.

Defaulting GPS_SAVE_CFG to 0 keeps the receiver configured from RAM on every
boot and removes the write.
2026-08-06 09:03:29 +10:00
Peter BarkerandClaude Fable 5 6f6c28e8ae AP_HAL_ChibiOS: fix STM32L4+ bootloader build with no I2C configured
The STM32L4+ port's stm32_isr.c unconditionally includes the
stm32_i2c1..4.inc ISR files, which require STM32_I2C_USE_I2Cx to be
defined. In bootloader builds HAL_USE_I2C is FALSE so hal_i2c_lld.h
(which supplies FALSE defaults) is never included, breaking the
PixFlamingo bootloader build.

Add ifndef-guarded FALSE defaults, matching the STM32G4 fix in
abffee1520.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 18:01:44 +10:00
Peter BarkerandClaude Sonnet 4.6 df1706cf8d AP_HAL_ChibiOS: remove ALLOW_ARM_NO_COMPASS from betaflight conversion script
ALLOW_ARM_NO_COMPASS has not had the stated effect since Nov 2019; remove it from
the template output of the betaflight hwdef conversion script.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-05 11:54:44 +10:00
Peter BarkerandClaude Sonnet 4.6 6ee4f05b4b hwdef: remove ALLOW_ARM_NO_COMPASS from all hwdef files
ALLOW_ARM_NO_COMPASS was broken by commit 653fad44d4 in Nov 2019
which changed AP_Arming::compass_checks() to call use_for_yaw(0)
instead of use_for_yaw(void).  The void version implicitly called
healthy() which caused compass_checks() to return true (pass) when
no compass was present.  After that change, compass_checks() proceeds
to call healthy() directly and fails pre-arm even with this define set.

The define has not had the stated effect for over 5 years.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-05 11:54:44 +10:00
cuav-chen2 e57b8a47d3 hwdef: Add CUAV-X25-MEGA OpenDroneID enabled build 2026-08-04 13:57:12 +01:00
cuav-chen2 8722ebbafa hwdef: Add support for CUAV-X25-MEGA 2026-08-04 13:57:12 +01:00
Phillip Kocmoud daca0ac07b AP_HAL_ChibiOS: Add support for HCR-523 AP Periph CAN L1/L5 GPS/Mag Device 2026-08-04 15:34:29 +10:00
Leonard Hall 05a896cc4c AP_HAL_ChibiOS: don't fake CAN send success in bootloader builds 2026-08-04 12:04:45 +10:00
Peter Barker 98813a2cd3 hwdef: correct '#endif // COMMENT' comments
these should always match the opening #if
2026-08-04 11:59:14 +10:00
Peter Barker ba1280eb92 AP_HAL_ChibiOS: correct '#endif // COMMENT' comments
these should always match the opening #if
2026-08-04 11:59:14 +10:00
Peter Barker 06a33a1de4 hwdef: remove board-hwdef defines which are the default values
boards coming in with stale defines.  The defines are several versions old, so I don't think it's really worth adding code to enforce no-more-merging of these bad defines.
2026-07-29 09:43:42 +01:00
MOS550andCursor ec237c0943 hwdef: add AET-H743-Air flight controller support
Add hwdef, bootloader hwdef, README, defaults, and pinout images for the
AET-H743-Air STM32H743 board with dual BMI270, AT7456E OSD, onboard SD NAND
logging, shared UART3 RC/SBUS/ELRS routing, and bidirectional DShot on
motor outputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 08:50:53 +01:00
Andy Piper 9d90b98a95 AP_HAL_ChibiOS: do not force MSP VTX on low-flash FPV boards
minimize_fpv_osd.inc force-enabled AP_MSP_VIDEOTX_ENABLED on the F405
FPV boards, costing ~1.5K of flash for a feature those boards rarely
use. Leave it to the default (off); 2MB boards that want it opt in via
their own hwdef.
2026-07-29 17:16:29 +10:00
Andy Piper fcd4db28c7 AP_HAL_ChibiOS: enable MSP VTX control on DisplayPort and DJI boards
These boards default a serial port to MSP DisplayPort or DJI FPV, so they
have the digital VTX hardware that MSP VTX control targets. Enable it
explicitly now that it no longer defaults on for >1MB boards.
2026-07-29 17:16:29 +10:00
Andy Piper 1c2bdee87f AP_HAL_ChibiOS: enable MSP VTX control on FPV/OSD boards
Keep MSP VTX support in the minimised FPV/OSD feature set so the boards
that ship with an MSP OSD get VTX control.
2026-07-29 17:16:29 +10:00
MonikaRobu 0aeda12926 AP_HAL_ChibiOS: add SimpliFly H7 flight controller
Initial hwdef support for the SimpliFly H7 based on STM32H743:
- ICM42688P IMU on SPI, BMP280 barometer on I2C
- AT7456E (MAX7456) OSD on SPI2, W25Q128FV 16MB dataflash
- 5 UARTs, 4 motor outputs on TIM8 (BDshot capable)
- 4 servo outputs on TIM4 (BDshot capable), NeoPixel LED on TIM3
- 9V regulator GPIO control (RELAY2_PIN 81)
- Camera trigger output on CC pad (RELAY3_PIN 82)
- defaults.parm: SERVO9_FUNCTION=120 (NeoPixel), OSD_TYPE2=5 (MSP DisplayPort)
2026-07-29 16:45:06 +10:00
Randy Mackay 7c3ce8e5c1 AP_HAL_ChibiOS: luminousbee5 hwdef update for PSC_NE_JERK rename 2026-07-29 07:06:37 +09:00
Jacob Dahl c0c04ceeab hwdef: enable bootloader flashing on ARKV6X and ARK_PI6X 2026-07-28 12:43:12 +10:00
zhucaigui 653a2161c3 hwdef: added SIYI-UniFC-6-PICO OpenDroneID enabled build 2026-07-28 10:22:13 +10:00
zhucaigui 2b81fdfe70 hwdef: added SIYI_N7 OpenDroneID enabled build 2026-07-28 10:10:53 +10:00
dopelion f744806f3a AP_HAL_ChibiOS: add CyberX-v10 hwdef 2026-07-23 12:08:20 +10:00
Brown 4f50f1997f AP_HAL_ChibiOS: support LSM6DSV on KakuteH7-Wing
pre-commit / ci (push) Canceled after 0s
test scripts / build (astyle-cleanliness) (push) Canceled after 0s
test scripts / build (check_autotest_options) (push) Canceled after 0s
test scripts / build (logger_metadata) (push) Canceled after 0s
test scripts / build (param-file-validation) (push) Canceled after 0s
test scripts / build (param_parse) (push) Canceled after 0s
test scripts / build (python-cleanliness) (push) Canceled after 0s
test scripts / build (shellcheck) (push) Canceled after 0s
test scripts / build (validate_board_list) (push) Canceled after 0s
Add an alternate SPI device and IMU probe for KakuteH7-Wing boards
populated with LSM6DSV in place of ICM42688.
2026-07-22 13:27:01 +01:00
orbittechnologyx 1a68a90f6b AP_HAL_ChibiOS: updated current scale value in hwdef.dat file 2026-07-22 13:18:38 +01:00
orbittechnologyx fe8643b3b4 AP_HAL_ChibiOS: updated README file 2026-07-22 13:18:38 +01:00
orbittechnologyx 789998ab45 AP_HAL_ChibiOS: fix documentation in README and updated hwdef 2026-07-22 13:18:38 +01:00
orbittechnologyx 4d5e888243 AP_HAL_ChibiOS: add support for ORBITH743v2 2026-07-22 13:18:38 +01:00
Ashwani SihagandHenry Wurzburg 4b0c2a22e6 AP_HAL_ChibiOS: add SaamPixV1_1 board support
Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
2026-07-22 12:35:12 +01:00
lvguofei 8f3b4b7b98 AP_HAL_ChibiOS: add AMOV Flycore hwdef 2026-07-22 12:30:56 +01:00
Maxim Buzdalov 2d534eb842 hwdef: support SPL06 barometer in FlywooF405S-AIO and HD boards 2026-07-21 11:27:54 +10:00
HuibeanandRandy Mackay 1c0a9fa2ec AP_HAL_ChibiOS: VM-L431-BMS hwdef updates
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2026-07-21 09:38:06 +09:00
Huibean 5e4815bb09 AP_HAL_ChibiOS: Fix missing CAN3 2026-07-21 09:23:15 +10:00
Sharanie0612 60a6844e14 AP_HAL_ChibiOS: add ZeroOneX6-ODID board support 2026-07-15 08:08:34 +10:00
Jacob Dahl ff89dabe3b hwdef: ARKV6S: add board support 2026-07-14 14:34:22 +01:00
Rahul-Karshak feaed5449a AP_HAL_ChibiOS: add KARSHAKH743VTOL board 2026-07-14 08:45:06 +10:00
holydust e6033e4918 AP_HAL_ChibiOS: add CORVON_V5 board 2026-07-14 08:44:38 +10:00
Pietro Saccone 49f318e019 AP_HAL_ChibiOS: add support for BCubeF745v2 2026-07-06 16:24:17 +01:00
Peter BarkerandClaude Opus 4.8 a1cc96adea AP_HAL_ChibiOS: require serial default protocols to use SerialProtocol_* names
Reject a numeric DEFAULT_SERIALn_PROTOCOL/HAL_SERIALn_PROTOCOL/HAL_OTGn_PROTOCOL
value during hwdef processing, and convert the in-tree boards that used numbers
to the equivalent SerialProtocol_* name (value-preserving).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 14:03:37 +10:00
Tim Tuxworth ceb710cc75 AP_HAL_ChibiOS: add GPS defaults.parm file 2026-07-03 15:45:19 +10:00