Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Cortex-M4 core header #9

Open
BostonBoston opened this issue Aug 16, 2024 · 1 comment
Open

Add support for Cortex-M4 core header #9

BostonBoston opened this issue Aug 16, 2024 · 1 comment

Comments

@BostonBoston
Copy link

Looking for support of the STM32F429x

I'd potentially be interested in doing this if you have any guidance on how.

@auxym
Copy link
Collaborator

auxym commented Aug 17, 2024

Hi, thanks for the interest. Note that if you don't specifically need the functions defined in core_cm4.h, you don't need to do this work, and you can already use svd2nim with your STM32 SVD file, which will produce a fully standalone nim module for register access.

Unfortunately I don't have much time to put into this at the moment. Maybe a bit later.

If you want to have a try, it's not too hard, just manually writing {.importc.} definitions for all the functions defined in core_cmh4.h. You can probably find a guide online on C FFI in nim.

You can also have a look at how I wrapped core_cm0plus:

https://github.com/EmbeddedNim/svd2nim/blob/master/core/core_cm0plus.nim

https://github.com/ARM-software/CMSIS_4/blob/master/CMSIS/Include/core_cm0plus.h

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

No branches or pull requests

2 participants