Skip to content

stm32: update lib/stm32-svd (stm32-rs @2026-02-21); adjust files in target, src/machine|runtime, where necessary#5218

Merged
deadprogram merged 5 commits intotinygo-org:devfrom
knieriem:stm32-update-svd
Feb 26, 2026
Merged

stm32: update lib/stm32-svd (stm32-rs @2026-02-21); adjust files in target, src/machine|runtime, where necessary#5218
deadprogram merged 5 commits intotinygo-org:devfrom
knieriem:stm32-update-svd

Conversation

@knieriem
Copy link
Contributor

As suggested (#5212 (comment)), this PR updates the lib/stm32-svd submodule to reflect the latest changes in tinygo-org/stm32-svd (see tinygo-org/stm32-svd#14):

Background/motivation: tinygo-org/stm32-svd#10

Build tag renaming: stm32l4x5 => stm32l4y5
A naming collision has emerged: stm32l4x5 was previously used in src/machine/* to cover the stm32l4r5 device. However, stm32l4x5 is now a distinct device within device/stm32. In one of the commits below I have renamed the existing tag to stm32l4y5 to avoid this conflict. Is there a preferred naming convention for such wildcards (e.g., using an uppercase X or a different suffix), or is this alphabetical increment acceptable?

This PR is a draft: a commit to update the sub-module lib/stm32-svd will be added as soon as the upstream main branch is updated.

@deadprogram deadprogram mentioned this pull request Feb 24, 2026
@deadprogram
Copy link
Member

@knieriem seems like this PR did not fully address the lgt92 build failure.

In one of the commits below I have renamed the existing tag to stm32l4y5 to avoid this conflict. Is there a preferred naming convention for such wildcards (e.g., using an uppercase X or a different suffix), or is this alphabetical increment acceptable?

I don't think we have had that problem until now. Seems like y is fine, I do not want to bikeshed it. 🚲

@deadprogram
Copy link
Member

OK all tests pass when everything is merged together, including the TinyHCI run on the stm32f4disco-1:

https://github.com/tinygo-org/tinygo/pull/5219/checks?check_run_id=64662387959

From my POV we can merge the various PRs now, then update this one with the updated submodule.

@knieriem
Copy link
Contributor Author

I have just added a commit updating the lib/stm32-svd submodule (pointing to the current commit of the tinygo-org/stm32-svd main branch)

@deadprogram
Copy link
Member

Now that #5212 has been merged, can you please rebase this PR @knieriem it should pass all tests!

….s to ..722.s

In stm32-rs, stm32f7x2.svd got replaced by stm32f722.svd and stm32f732.svd.
This change adjusts the target definition where stm32f7x2 is used,
…clash with stm32 device name

Previously, there was no specific stm32f4r5.svd in lib/stm32-svd,
just stm32f4x5.svd was used; now, both files are present. This means
that the existing build-tag stm32f4r5 will include the
device/stm32/stm32f4r5.go file, and the additional build-tag stm32f4x5
would include the device/stm32/stm32f4x5.go file as well, resulting
in build conflicts. Renaming just the tag, which is used in src/machine,
and src/runtime, into stm32f4y5 solves this issue.
USART.ISR_FIFO_ENABLED => USART.ISR
          IRQ_TIM6_DAC => IRQ_TIM6_DAC_LPTIM1
            ADC.CHSELR => ADC.CHSELR0 (alternate registers 0/1)
Recent changes in stm32-svd result in a change from previous
16-bit register access to 32-bit access.
Both access types are allowed, according to the register manuals.
@deadprogram
Copy link
Member

All tests pass! I think this is ready... 🎆

@deadprogram
Copy link
Member

@knieriem do you want to mark this PR as "Ready for review"?

@knieriem knieriem marked this pull request as ready for review February 25, 2026 20:08
@deadprogram
Copy link
Member

Amazing work here @knieriem thank you very much!! Now merging.

@deadprogram deadprogram merged commit e4c4b67 into tinygo-org:dev Feb 26, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants