Skip to content

risc-v: When exceptions are provided in a settings file, code is produced that breaks build without rt enabled #948

@kurtjd

Description

@kurtjd

In my settings file I define some exceptions.

When I generate the pac with this yml, a pub enum Exception is generated and the pac_enum macro wraps it.

However, the macro expanded depends on riscv_rt::TrapFrame so if the rt feature is not enabled, this will not build. I had considered changing the generated code to include #[cfg(feature = "rt")] and fall back on pub use riscv::interrupt::Exception but I don't think is really sound.

Curious if this is expected behavior (making riscv-rt no longer optional) or if any one has other ideas for a change that works in configurations without rt enabled. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions