Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Remove duplicate peripherals #15

Open
MabezDev opened this issue Jan 23, 2020 · 3 comments
Open

Remove duplicate peripherals #15

MabezDev opened this issue Jan 23, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@MabezDev
Copy link
Member

Many of the generated (in particular the indexed ones) need to be manually derived.

This is achieved in svdpatch here

When the peripherals are copied it leaves behind the base peripheral, we should remove these.

Example:

In https://docs.rs/esp32/0.2.1/esp32/#structs for example, there is I2C0, I2C1 and I2C, the latter being the base peripherals that we derive the other two from. In this instance we should remove I2C.

@MabezDev MabezDev added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 23, 2020
@jessebraham
Copy link
Member

jessebraham commented Jan 25, 2020

I was ultimately able to remove the peripherals in question, but ran into a bit of a snag with svdtools.

When processing it begins with _deletes which means we get errors about peripherals not being found when copying registers. Moving the _delete to the final step allows our SVD to be patched successfully, but results in errors when patching the stm32-rs repository.

I will see if I can do to get svdtools working for both repositories.

@MabezDev
Copy link
Member Author

Hmm, maybe we could get way with copying however many we need, and then renaming that last one, instead of deleting it?

@jessebraham
Copy link
Member

I think some for peripherals we can probably make that work.

Where I foresee issues are with peripherals such as I2C. I2C_EXT and I2C1_EXT are renamed to I2C0 and I2C1 respectively, whereas their registers are being copied from I2C.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants