stm32: add support for stm32h723 (nucleo-h723zg) and stm32h757_cm7 - #5571
Draft
knieriem wants to merge 5 commits into
Draft
stm32: add support for stm32h723 (nucleo-h723zg) and stm32h757_cm7#5571knieriem wants to merge 5 commits into
knieriem wants to merge 5 commits into
Conversation
This ensures that identifiers like stm32.IRQ_TIM_CC compile successfully even when the SVD file defines IRQ_TIM1_CC only. This complements the existing peripheral alias mechanism.
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.
This WIP PR adds support for the NUCLEO H723ZG (
stm32h723) and thestm32h757_cm7based on previous work from last year, applying small changes to the recently added implementation for stm32h753 by @digitalentity.Current state:
Changes:
USB for H723 still deactivated — machine_stm32h7_usb.go would need to be adjusted to support USB1 too (perhaps gen-device-stm32: fix USB_OTG_FS groupName inconsistency #5562 makes adjusting the structure easier as it provides improved USB_OTG_* types)
moved the
_ "machine/usb/cbc"import from runtime_stm32h7.go to runtime_stm32h7_usbcbc.go to allow usb-less compilation.[Would a
usb.cbcbuild tag help to select such functionality in thetarget/*.jsonfile, with alternatives likeusb.mscorusb.none?]STM32H723 does not know Port I (but J and K). Therefore gpio pin setup got extended, adding a version with port I (
_port_i.go), and a version without (_no_port_i.go). Perhaps better suffixes need to be found.Naming differences (like
WWDGvsWWDG1) or (IRQ_TIM_CCvs.IRQ_TIM1_CC) have been resolved by extending the alias mechanism in gen-device-svd, which allows to add an unnumbered name for devices that provide the name with a1suffix only -- with the result that the existing implementation, w.r.t. to these names, can be used without modification.adds a PinMode
PinModeETHwhich can be used in Ethernet experiments.This PR also enables building executables for stm32h757_cm7 based boards by factoring out interrupt mask and pending registers (which differ on single- and dual-core MCUs) to
..h7_gpio.govariants suffixed with_sp.goor_mp.go.[Still, to get it running on my custom H757 board, where the oscillator is not populated, I have to convert the runtime HSE setup to one using HSI. I wonder if we could use build tags to select clock configurations at build time:
clock.hseor.ext,clock.hsior.int,clock.custfor a entirely project defined clock configuration; similar tags could be used to extend MPU configuration.]