Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions riscv-rt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- New `#[riscv_rt::post_init]` attribute to aid in the definition of the `__post_init` function.
- Added `.uninit` section to the linker file. Due to its similarities with `.bss`, the
linker will place this new section in `REGION_BSS`.
- Additional feature `no-mie-mip` to work on chips without the MIE and MIP CSRs (e.g. ESP32-C2, ESP32-C3)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Additional feature `no-mie-mip` to work on chips without the MIE and MIP CSRs (e.g. ESP32-C2, ESP32-C3)
- Additional feature `no-xie-xip` to work on chips without the XIE and XIP CSRs (e.g. ESP32-C2, ESP32-C3)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦‍♂️ ofc ... sorry I missed that


### Changed

Expand Down
1 change: 1 addition & 0 deletions riscv-rt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ v-trap = ["riscv-rt-macros/v-trap"]
u-boot = ["riscv-rt-macros/u-boot", "single-hart"]
no-interrupts = []
no-exceptions = []
no-mie-mip = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
no-mie-mip = []
no-xie-xip = []

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure - that makes sense 👍

device = []
memory = []
7 changes: 4 additions & 3 deletions riscv-rt/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ _abs_start:
#[cfg(feature = "s-mode")]
"csrw sie, 0
csrw sip, 0",
#[cfg(not(feature = "s-mode"))]
#[cfg(all(not(feature = "s-mode"), not(feature = "no-mie-mip")))]
"csrw mie, 0
csrw mip, 0
csrr a0, mhartid", // Make sure that the hart ID is in a0 in M-mode
csrw mip, 0",
#[cfg(not(feature = "s-mode"))]
"csrr a0, mhartid", // Make sure that the hart ID is in a0 in M-mode
// Set pre-init trap vector
"la t0, _pre_init_trap",
#[cfg(feature = "s-mode")]
Expand Down
Loading