all: update to the latest version of stm32-svd files/patches (2)#14
all: update to the latest version of stm32-svd files/patches (2)#14deadprogram merged 4 commits intotinygo-org:mainfrom
Conversation
The Rust based version appears to be used upstream since May 2022.
stm32-rs narrows access to 16 bit for specific registers, where TinyGo expects 32-bit access. Patch.go adjusts .yaml files mainly by deactivating "size: 16" constraints. While converting src/machine_stm32* to 16-bit access is possible, 32-bit access is currently maintained to ensure bus compatibility across all STM32 families and avoid breaking existing machine code. Note: These modifications could alternatively be integrated into gen-device-svd at the SVD processing level in the future.
Update README.md to include a note about verifying the build process after syncing with stm32-rs. This ensures that SVD changes (like register renames) are caught in src/machine before they are merged.
|
Note that this change, together with my updates to gen-device-svd, does not yet fix / address tinygo-org/tinygo#5154. This would be needed to be addressed separately. It appears @amken3d's tinygo-org/tinygo@dev...amken3d:tinygo:dev-fix5154 is intended to fix the USB grouping problem. I will try to merge these changes with my tinygo-org/tinygo#5212. A possible point of confusion may be that @amken3d, when they started implementing for the G0B1, were likely unaware of #10 at that time, which references updates to gen-device-svd from May 2025 and the previous work on the G0x1 series, so that there are now some changes that possibly overlap / try to attempt similar issues. I hope in the end this can be resolved, so that I can perhaps integrate my STM32H7 related support, and support for the smaller devices from the G0x1 series (G031 and G071). |
I do not think that the USB grouping problem has been worked on or addressed yet. Only discussed. |
| ) | ||
|
|
||
| // This file adjusts some of the patch files in stm32-rs/devices/** | ||
| // It doesn't apply modifications twice, so it can be re-run safely. |
|
From my point of view/testing, I think we can merge this PR now. Any further feedback from @amken3d or anyone else? |
|
github is showing 0 changed files, is this correct? |
No, but for some reason Github trips out. See tinygo-org/tinygo#5219 for this PR/branch in actual use. |
|
If its working and tested by either/or of you then fine by me. Let's get this great change merged! |
As suggested by #13 (comment), this PR contains my changes to stm32-svd:
patch.goas a way to revert narrowing to 16-bit access of specific registers (which is done by stm32-rs) back to 32-bit accessPatch.go is an updated version of a previous, ed based approach: https://github.com/knieriem/tinygo-stm32-svd.
This change requires some minor changes to src/machine_*files and also a few target files, some of them already described in #10, which I will provide in a PR for TinyGo.
This change also requires some extensions to gen-device-svd (see tinygo-org/tinygo#5212)