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 MECALL backend for RISC-V targets #1017

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

romancardenas
Copy link
Contributor

This PR adds a new backend for every RISC-V target. It uses the SLIC philosophy of using a software interrupt controller that multiplexes an interrupt source for every task. However, instead of relying on a CLINT peripheral with software interrupts, it now triggers machine environment call exceptions to do the trick.

Pros of this approach: It is valid for every RISC-V target, regardless of its peripherals. Thus, it is very versatile. It also supports virtually an unlimited number of tasks, as long as they fit in memory. Also, users do not need to bind tasks to interrupt sources manually, as they are synthetically generated when needed.

Cons of this approach: It has more software overhead than using a dedicated physical interrupt controller. For example, for ESP32C3 targets, it may make more sense to use its dedicated ESP32C3 backend.

@romancardenas romancardenas force-pushed the master branch 2 times, most recently from ad4b15f to 5af69e0 Compare January 28, 2025 12:22
@romancardenas
Copy link
Contributor Author

romancardenas commented Jan 28, 2025

CI tweaked and passes. I will publish the new version of riscv-slic as soon as you are happy with this new backend.

@@ -30,6 +30,8 @@ Example:
- Updated esp32c3 dependency to v0.22.0
- Use `riscv-slic` from `crates.io`
- Remove unused dependency `rtic-monotonics`
- Updated esp32c3 dependency to v0.25.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Please put these at the top of changelog (like a stack)

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

Successfully merging this pull request may close these issues.

2 participants