stm32: update lib/stm32-svd (stm32-rs @2026-02-21); adjust files in target, src/machine|runtime, where necessary#5218
Conversation
|
@knieriem seems like this PR did not fully address the
I don't think we have had that problem until now. Seems like |
|
OK all tests pass when everything is merged together, including the TinyHCI run on the 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. |
|
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) |
….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.
ea2fcea to
c49d0ba
Compare
|
All tests pass! I think this is ready... 🎆 |
|
@knieriem do you want to mark this PR as "Ready for review"? |
|
Amazing work here @knieriem thank you very much!! Now merging. |
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):
gen-device-svd(update tools/gen-device-svd w.r.t. recent changes to the structure of stm32-svd files #5212) prepared in May 2025. The updated generator also resolves issues with missing definitions in the generated.gofiles.Background/motivation: tinygo-org/stm32-svd#10
Build tag renaming:
stm32l4x5=>stm32l4y5A naming collision has emerged:
stm32l4x5was previously used insrc/machine/*to cover thestm32l4r5device. However,stm32l4x5is now a distinct device within device/stm32. In one of the commits below I have renamed the existing tag tostm32l4y5to 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.