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

CMSIS-SVD to ioreg list conversion tool #259

Closed
aethaniel opened this issue Dec 16, 2014 · 12 comments
Closed

CMSIS-SVD to ioreg list conversion tool #259

aethaniel opened this issue Dec 16, 2014 · 12 comments

Comments

@aethaniel
Copy link

Hi,
I'm totally rookie in Rust and Zinc but I'm really interested in this project for many reasons.
I would like to know if there is a need and/or a plan to convert CMSIS-SVD public files of various Cortex-M devices to a list ioreg macros?
If the SVD format (with or without complementary information like PDSC files) is suitable for such conversion, it could allow some community 'enablement' on lot of different devices.

@bharrisau
Copy link
Contributor

Can you link to an example? Less typing is always appreciated.

@farcaller
Copy link
Member

Linking in example svd file: http://www.keil.com/pack/doc/CMSIS/SVD/html/svd__example_pg.html

@bharrisau
Copy link
Contributor

Awesome. Even has the read-write type. Not a 1:1 mapping though, as we want GROUPNAME for the ioreg stuff. And each peripheral is an implementation of GROUPNAME (which is more device specific).

I like how the interrupts are done also - a peripheral registers one or more interrupt numbers.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 16, 2014

@aethaniel Thanks for bringing this up. That would definitely help to add new chips.

It's xml format and provided by manufacturer. We could write a parser to get relevant info for ioregs!.

The one question I would have: is ioreg! stable and the way to go? So we can put effor there

@farcaller
Copy link
Member

ioreg! API is quite stable now and it seems to cover all our use cases well.

@farcaller
Copy link
Member

I've looked through one of those in detail (LPC11xx svd), it surely looks useful and will save us a lot of time.

Will it make sense to unify all reg definitions in one file? So far I think that svd-to-ioreg generator could be a rather trivial chunk of ruby code.

/cc @bgamari in here.

@bgamari
Copy link
Contributor

bgamari commented Dec 16, 2014

It seems like an SVD-to-ioregs! script would definitely be the right way to go. It would likely just dump the definitions into a single file. The user could then split them out as they see fit.

@kevinmehall
Copy link

@tcr and I started implementing an SVD parser in Rust. It's generating semi-usable ioregs! declarations for Atmel's SAM D21 / R21 series.

https://github.com/technicalmachine/rust-svd

@farcaller
Copy link
Member

Looks very nice! I've checked it with lpc11xx svd and it looks promising. So far it seems that only the lack of dim* support prevents of having it used as is.

@farcaller
Copy link
Member

disregard that. I didn't realise that the file name is hard coded and got it crashed right away. Still looks promising :)

@mcoffin
Copy link
Contributor

mcoffin commented Jun 8, 2015

Closed by #267 landing?

@farcaller
Copy link
Member

Yup, thanks for pointing out!

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

No branches or pull requests

7 participants