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

feat: configurable link section attribute for irqs #718

Merged

Commits on May 19, 2023

  1. feat: configurable link section attribute for irqs

    This change introduces a new config field that allows `svd2rust`
    to target which linker sections get assigned to the `__INTERRUPTS`
    static, with reasonable defaults.
    
    Previously on RISC-V, the choice was always left up to the compiler, and
    it seemed to always pick `.rodata`. Unfortunately, in my context, that
    meant placing the LUT in a memory range that had a lot of highly
    variable latency, which cost not just time but predictability in
    servicing interrupts.
    
    With this change in place, I'm able to target a particular section
    (e.g. `.data`, or `.trap.rodata`) for the placement of the static, which
    grants more granular control over the ultimate loaded memory address.
    
    For the full details about the problem, please see: esp-rs/esp-hal@e29f3d5
    sethp committed May 19, 2023
    Configuration menu
    Copy the full SHA
    deb379e View commit details
    Browse the repository at this point in the history
  2. lint: make clippy happy

    Replaces `get(0)` with `first()` as suggested by https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    sethp committed May 19, 2023
    Configuration menu
    Copy the full SHA
    f68084a View commit details
    Browse the repository at this point in the history
  3. docs: add changelog entry

    sethp committed May 19, 2023
    Configuration menu
    Copy the full SHA
    328d0c3 View commit details
    Browse the repository at this point in the history
  4. refactor: use Option::map instead of if-let

    Thanks to @burrbull for the review!
    sethp committed May 19, 2023
    Configuration menu
    Copy the full SHA
    1c773fb View commit details
    Browse the repository at this point in the history