Closed natevw closed 7 months ago
Closing this, sorry for the noise.
When I generate an initial SVD with msp430_svd instead, the device.x file does get some content.
(The end-result build of my app crate still has same error, but I'm guessing now that's maybe more directly just because it has hardcoded values for a different MSP430 — on closer inspection there seems no direct relation between the device.x in the PAC and the memory.x in the quickstart app beyond the file extension coincidence.)
Thanks! I think I got it working with memory.x in my firmware app crate:
MEMORY
{
RAM : ORIGIN = 0x1C00, LENGTH = 0x4000
/*
n.b. there's another much bigger section of ROM (i.e. Flash) on this MSP430!
FLASH2 : origin = 0x10000,length = 0x35C00
*/
ROM : ORIGIN = 0x5C00, LENGTH = 0xA380
VECTORS : ORIGIN = 0xFF80, LENGTH = 0x80
}
/* Stack begins at the end of RAM:
_stack_start = ORIGIN(RAM) + LENGTH(RAM); */
Not sure how to include the rest of the Flash (what Rust seems to call "ROM" afaict) section but otoh not sure if we'll even need that for this project yet 🤷
I used tixml2svd to generate an "msp430f4438a.svd" file for a variant that doesn't have any public PAC. With this file I then ran:
followed by all the post-processing/cleanup steps and gave it a Cargo.toml based on the example in those same steps in the docs:
with rust-toolchain.toml:
in a shared parent folder:
but when I depend on
path = "../msp430f5438a"
in my "firmware" (app) crate I get an error:Now when I compare the device.x file that svd2rust gave me it is completely blank, whereas I see in other PAC that people have created using this e.g. https://github.com/cr1901/msp430f5529/blob/18aab52/device.x there's a bunch of
PROVIDED
lines in theirs. Is this empty device.x the cause of my "shorter than expected" vector table? How do I getsvd2rust
to fill in the device.x file it creates?I should also note that when I run it I get a bunch of "WARN" logs from
svd2rust::generate::periperhal
aboutetc. etc. for many various uca/ucb lines, if that's at all related?
My goal is simply a working PAC crate for the MSP430F5438A which I can use with the https://github.com/rust-embedded/msp430-quickstart template, unfortunately I'm learning a lot of things all at once here and perhaps out of my depth hoping svd2rust would be able to automatically create one for me?