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

riscv-rt: Add mtvec-align features for the vector table alignment #259

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
3 changes: 2 additions & 1 deletion riscv-rt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Ensure the `.heap` section is 4-byte aligned
- Ensure the vector table is 256-byte aligned.
- Ensure the `.heap` section is 4-byte aligned.
- Limit rustc cfg flags to `riscvi`, `riscvm`, `riscvf`, and `riscvd`.
- Temporary use of `RISCV_RT_LLVM_ARCH_PATCH` environment variable to include the
temporary patch required for avoid LLVM spurious errors.
Expand Down
2 changes: 1 addition & 1 deletion riscv-rt/src/interrupts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ core::arch::global_asm!(
.type _vector_table, @function

.option push
.balign 0x4 // TODO check if this is the correct alignment
.balign 0x100 // RISC-V requires 4, but implementations may be stricter
ia0 marked this conversation as resolved.
Show resolved Hide resolved
.option norelax
.option norvc

Expand Down
Loading