Skip to content

Conversation

@romancardenas
Copy link
Contributor

This PR provides the following changes:

  1. New custom-setup-interrupts feature to opt-out the default implementation of _setup_interrupts
  2. Now, instead of defining a _default_setup_interrupts symbol that acts as a weak implementation of _default_setup_interrupts, riscv-rt now directly defines _setup_interrupts (protected under a feature gate). This reduces the amount of code in the final binary when users define their custom interrupt setup routine.
  3. Now, _setup_interrupts can accept an usize input argument that corresponds to the ID of the running hart. This might be useful in multi-hart targets to define hart-specific interrupt setup routines.
  4. New riscv_macros::setup_interrupts attribute macro for aiding users defining their custom interrupt setup routine.

About feature naming

I think custom-setup-interrupts is a clear name for the feature, as it should be activated whenever users want to implement their custom interrupt setup routine. However, previous similar features follow a no-* name (e.g., no-interrupts or no-exceptions). Let me know if you prefer to stick to the no-* naming or if you prefer using custom-*.

While I am currently more inclined to custom-*, I would like to know you opinion.

@romancardenas romancardenas requested a review from a team as a code owner February 9, 2026 13:42
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.

1 participant