all: update to the latest version of stm32-svd files/patches#13
all: update to the latest version of stm32-svd files/patches#13deadprogram wants to merge 1 commit intomainfrom
Conversation
Signed-off-by: deadprogram <ron@hybridgroup.com>
Not quite working yet... |
|
Hi, I will have a look into why "make mods" did not work (anymore?). The mechanism just applies some ed files (in good old Plan 9 tradition ;-) to deal with the 32 bit ->16 bit narrowing issue. I know that the README suggests not to patch files here, but rather upstream, but I feel these changes won't be accepted upstream. They added a lot of patches themselves that narrow registers from 32 bit to 16 bit. This is a problem for TinyGo, since we rely on the 32-bit nature of registers. I looked up quite some register manuals an it appears to me that registers in these cases may be accessed using 32-bit access. Perhaps they decided it with some optimization in mind. The other errors - For a broader picture behind my patches regarding TinyGo on stm32 please also see knieriem/tinygo#1 . It would be cool to resolve some of these issues, but I realize regarding the large number of STM32 families and variants that it requires some kind of structured approach. Just to be sure we are looking at the same problem: Are you using the new Rust based svdtools or the older python based tools? |
I am using the rust crate as directed by the README in the https://github.com/stm32-rs/stm32-rs repo: cargo install svdtools --version 0.5.0 |
|
There is also this related PR tinygo-org/tinygo#5168 |
|
@amken3d I am not sure if tinygo-org/tinygo#5168 does handle all the changes current stm32 svds (Rust svdtools) bring with them (?). Please compare e.g. with the existing changes in the patch set tinygo-org/tinygo@release...knieriem:tinygo:update-gen-device-svd, there appears some more things that are important for proper generation, like peripheral reordering, or dim array support (see also #10). |
|
@knieriem maybe you could please make a PR against the |
|
I have found the reason why Since there have been some more 16-bit register adjustments upstream very recently (regarding TIM v1 and v2), I decided to skip It disables most of the # Apply changes to .yaml files.
mods:
go run patch.goWith patch.go and the updated gen-device-svd tool, the bluepill example from above should compile again. As noted in tinygo-org/tinygo#5212 and #10, a few changes to some TinyGo files may be necessary, like done in tinygo-org/tinygo@1c75aff and tinygo-org/tinygo@683ebf2. Also, the stm32g0b1 target needs some small adjustments, since a few names change in |
thank you for that! |
|
@knieriem will you submit PR against this repo with the patch.go etc? |
|
Yes, I will do that. Shall we keep the name patch.go, or adjust it to the Make target mods => mods.go? Or better use "make patch"? |
|
|
Gentle ping about the patch, @knieriem I am so eager to test 😸 thank you! |
|
Closing in favor of #14 |
This PR is to update the SVD files to the latest version, along with the needed patches by using some of @knieriem wotk from their fork.
It does appear to include the
enumeratedValuesI mentioned in #12Note that the
make modstask did not work for me, I patched the files manually before regenerating the SVD files usingmake