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

Register clusters not supported #5

Open
pengi opened this issue May 9, 2023 · 6 comments
Open

Register clusters not supported #5

pengi opened this issue May 9, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@pengi
Copy link
Owner

pengi commented May 9, 2023

Describe the bug
Some platforms have what's called "Register clusters" which acts like structs, making a set of registers reusable.

One example usage is to cluster DMA related registers in nrf52840 SPIS peripheral, so RXD, TXD clusters have the same registers, configuring the data pointers.

To Reproduce
Steps to reproduce the behavior:

  1. Load nrf52840 svd file (a version using clusters)
  2. Run arm list nrf52840 SPIS

Expected behavior
I expect to see RXD and TXD registers

Screenshots / Logs
Seems to be missing.

(gdb) arm list nrf52840 SPIS2 
Registers in SPIS2 @ 0x40023000:
 - TASKS_ACQUIRE @ +0x24
        ...............................# TASKS_ACQUIRE
 - TASKS_RELEASE @ +0x28
        ...............................# TASKS_RELEASE
 - EVENTS_END @ +0x104
        ...............................# EVENTS_END
 - EVENTS_ENDRX @ +0x110
        ...............................# EVENTS_ENDRX
 - EVENTS_ACQUIRED @ +0x128
        ...............................# EVENTS_ACQUIRED
 - SHORTS @ +0x200
        .............................#.. END_ACQUIRE
 - INTENSET @ +0x304
        ..............................#. END
        ...........................#.... ENDRX
        .....................#.......... ACQUIRED
 - INTENCLR @ +0x308
        ..............................#. END
        ...........................#.... ENDRX
        .....................#.......... ACQUIRED
 - SEMSTAT @ +0x400
        ..............................## SEMSTAT
 - STATUS @ +0x440
        ...............................# OVERREAD
        ..............................#. OVERFLOW
 - ENABLE @ +0x500
        ............................#### ENABLE
 - CONFIG @ +0x554
        ...............................# ORDER
        ..............................#. CPHA
        .............................#.. CPOL
 - DEF @ +0x55c
        ........................######## DEF
 - ORC @ +0x5c0
        ........................######## ORC

Desktop (please complete the following information):

  • OS: ubuntu
  • Version 0.9.8 (git checkout)
@pengi pengi added the bug Something isn't working label May 9, 2023
@pengi
Copy link
Owner Author

pengi commented May 9, 2023

This issue actually seems to be solved in master branch from cmsis-svd without integration. Keeping bug open until it's possible to do a decent solution.

The issue is that the solution is from 2018 (five years ago, current date), but last tagged version is from 2016, so need to install the git version of cmsis-svd

A temporary workaround until a new version of cmsis-svd is released, uninstall cmsis-svd and reinstall from git

pip uninstall cmsis_svd
pip install 'git+https://github.com/posborne/cmsis-svd@master#egg=cmsis-svd&subdirectory=python'

Haven't really checked yet though. The issue I have is that SPIS2 from their nrf52840.svd doesn't contain TXD and RXD clusters. But it might be more related to that those parameters doesn't follow the <peripheral derivedFrom="SPIS0"> tag, since TXD and RXD seems to work in SPIS0

@pengi
Copy link
Owner Author

pengi commented May 9, 2023

There is a patch already apparently. However, not merged.

cmsis-svd/cmsis-svd#100

@pengi
Copy link
Owner Author

pengi commented Sep 13, 2023

Hum... better command to update is:

pip install -U 'git+https://github.com/posborne/cmsis-svd@master#egg=cmsis-svd&subdirectory=python'

This is a real problem, so should should add that also to the documentation. But probably need to fork posborne/cmsis-svd to not rely on the release cycle of that project

@salkinium
Copy link

Maybe just use the URL in the pyproject.toml?

@pengi
Copy link
Owner Author

pengi commented Sep 13, 2023

Oh, didn't know that was possible. Just assumed that would be issues with dependencies for the user that installs a package. Thanks for the link. I might fix that soon

However, there are still issues that are not merged, which results in missing register clusters... Needs to think about it a bit

@salkinium
Copy link

Yeah, it's probably not wise to directly depend on the master branch of a repository you don't control, that can easily lead to very annoying bugs. So forking it and merging all issues you need is probably best, but then again you might as well just publish in on PyPi anyways… so. meh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants