px4iofirmware: add dual-MCU IO support for H7#26536
Draft
px4iofirmware: add dual-MCU IO support for H7#26536
Conversation
Add platform-level support for running PX4IO firmware on STM32H7, enabling dual-MCU boards where the IO coprocessor is an H7 rather than the traditional STM32F100 (io-v2). Platform changes: - Add H7 IWDG watchdog (stm32h7/watchdog/) — register-compatible with F7, needed by px4iofirmware's arch_watchdog_iwdg dependency - Split px4iofirmware serial.cpp into per-arch platform libraries: stm32h7/io_serial (ISR/ICR/RDR/TDR registers, struct-based DMA, D-cache coherence) and stm32_common/io_serial (SR/DR registers, positional DMA) — mirrors the FMU-side px4io_serial pattern - Guard px4io.h ENABLE_SBUS_OUT and VDD_SERVO_FAULT macros on GPIO existence so boards without those pins compile cleanly Bootloader/uploader: - Add secondary MCU serial forwarding in bootloader - Extend px4_uploader.py for secondary firmware upload - Add SYS_SECONDARY_FW_UPDATE parameter
cd82929 to
8f27826
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
arch_io_serial), moving bare-metal USART/DMA code out ofsrc/modules/px4iofirmware/intoplatforms/nuttx/src/px4/stm/ENABLE_SBUS_OUTandVDD_SERVO_FAULTmacros in px4io.h behind GPIO availability checksPROTO_SERIAL_FORWARD) for uploading firmware to a secondary MCU through the primary--update-modeoption to px4_uploader.py supporting primary/secondary/both/auto upload modesSYS_SEC_UPDATEparameter for triggering secondary firmware update via bootloader rebootTest plan
make px4_io-v2_default— verifies F1 io_serial refactoring doesn't break existing IO boards (39.8KB flash)make cubepilot_cubeorangeplus_default— verifies H7 FMU builds unaffected by new io_serial/watchdog subdirs (EXCLUDE_FROM_ALL)python3 -m pytest test/test_px4_uploader.py— 9/9 tests pass (upload plan resolution, secondary upload flow, timeout handling)