-
Notifications
You must be signed in to change notification settings - Fork 229
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
re-building esp-riscv-rt
on top of riscv-rt
0.13.0
#2390
Comments
Thank you for opening this issue! I've been meaning to investigate better utilizing the packages provided by So I am definitely interested in exploring this option, and will try to make some time for it soon :) |
The only problem currently might be that we need to store/restore the full context (not only caller saved registers) as the trap-frame since that is what the scheduler in |
We can also add a feature flag to modify the trap frame in Let me know what you think and if I can help you with anything. |
I thought about this a bit more and I realized we actually added a bit more functionality over time. Maybe the functionality is already available in
Maybe we just need to start and see where we hit the show-stoppers |
It is great to start finding out what we have and what kind of problem we are facing! |
@bjoernQ can you point out where you use the trap frame at |
Sure, basically it's just a timer ISR where we call esp-hal/esp-wifi/src/preempt/mod.rs Line 135 in 2c14e59
There we just swap all the registers and a few CSRs ... That's all the magic :) |
A possibility for extending the trap frame is letting // in esp-riscv-rt
#[repr(C)]
struct EspTrapFrame {
/* ... all required extra registers ... */
frame: riscv_rt::TrapFrame,
} So the sequence would be:
|
A potential minor issue I see here, especially for ESP32C6 trying to use the CLINT backend in RTIC: The CLINT backend uses In any case, I would advance here and then polish these issues. |
One of the main fresh features of
riscv-rt
0.13.0 is that, together withriscv
0.12.0, now it should be possible to support targets that do not completely fulfill the RISC-V interrupt standard (e.g., ESP32-C3 and C6).I think it would be very interesting to adopt this new feature with
esp-riscv-rt
. It would help the RISC-V team to detect some deficiencies that still need our attention to support a wider range of targets. Additionally, new features inriscv-rt
would be easily adopted in ESP32-Cx targets.Let me know what you think, and if you are interested in exploring this option!
The text was updated successfully, but these errors were encountered: