Use settings.yaml
with svd2rust
for RISC-V devices
#303
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening as draft as this is still incomplete, but will eventually close #297.
For the ESP32-C2 and ESP32-C3, I believe this should be relatively (or fully) complete, however it will require some review. Priority levels were stated in the TRM (though I'm not entirely sure if these should be 0- or 1-indexed). Core interrupts were taken from
esp-riscv-rt
, and I believe these should be correct.The above also applies for the ESP32-C6 and ESP32-H2, though they are notably missing both the
CLINT
andPLIC
sections in their respectivesettings.yaml
files.Copying blindly from greenlsi/e310x#1, I believe
CLINT
should be as simple as:However, I'm unsure where this frequency comes from exactly; will required some investigation.
I tried adding the following for
PLIC
, but encountered some issues; it's been awhile, forget what exactly, but IIRC it was due to there being noPLIC
peripheral in the PAC. Again, needs investigation.This changes the
src/interrupts.rs
file quite a bit, so I suppose additional changes will be required inesp-hal
and/oresp-riscv-rt
to reflect these.