Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Differences between svd #18

Open
csagonero opened this issue Jan 29, 2018 · 3 comments
Open

Differences between svd #18

csagonero opened this issue Jan 29, 2018 · 3 comments

Comments

@csagonero
Copy link

hi Japaric,

I really appreciate your work and your effort to developp RUST in the embedded world.
After a successfull port on STM32F072, I try on STM32F103.

As STM32F72, I downloaded SVD file from the ST website for STM32F103.
I found somes differences with the svd file you used.
examples : ( right : st version )
image

image

image

Which version is better ?
Thanks !

@Emilgardis
Copy link
Contributor

Emilgardis commented Jan 29, 2018

According to Table 3. in the reference manual. BKP has the base address of 0x40006C00, so our source is wrong. However, if you look in 6.4.5, we can see that the first 0x04 is reserved. The source we use acknowledges this by having DR1 with an offset at 0x00, which makes it technically correct, the best kind of correct. Your diff does then, however, imply that ST is supplying incorrect data in the SVD, as the offset of DR1 isn't 0x04. Perhaps you cut it out of the picture?

About IPR8, none of those values correspond to what it should be as far as I can see, so what you think this project uses is actually not what it does use.

Where did you get your SVD, could you link it? Keil provides the same SVD as the cmsis-svd repo provides, which is generally speaking the best place to get up-to-date SVDs.

I'd say to go with the one keil provides, i.e the one on cmsis-svd + the patches found in this repo (the "complete" SVD with patches is not included in an attempt to not violate any license).

By the way, why are you asking about the svd? You don't need it to compile this package.

@Emilgardis
Copy link
Contributor

Link to reference manual

@japaric
Copy link
Owner

japaric commented Feb 7, 2018

Thanks for digging some info, @Emilgardis.

@csagonero I have also seen that ST has made their SVD files more visible by adding a link to the file to each microcontroller page. I haven't looked at these SVD files in detail but I've seen that at least the <cpu> section in them is wrong for some F3 and F4 devices: that section says "no mpu present", "no fpu present" and "nvic priority bits = 3" but all that info is wrong. Other thing I have seen is that ST SVD files don't contain <enumeratedValues> info either so there's no gain in that regard when comparing them to the SVD files in posborne/cmsis-svd.

I think we should stick to the SVD files from posborne/cmsis-svd. We are already patching them to improve them and it may take some work to port those patches to the ST files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants