File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313- New ` #[riscv_rt::post_init] ` attribute to aid in the definition of the ` __post_init ` function.
1414- Added ` .uninit ` section to the linker file. Due to its similarities with ` .bss ` , the
1515 linker will place this new section in ` REGION_BSS ` .
16+ - Additional feature ` no-xie-xip ` to work on chips without the XIE and XIP CSRs (e.g. ESP32-C2, ESP32-C3)
1617
1718### Changed
1819
Original file line number Diff line number Diff line change @@ -40,5 +40,6 @@ v-trap = ["riscv-rt-macros/v-trap"]
4040u-boot = [" riscv-rt-macros/u-boot" , " single-hart" ]
4141no-interrupts = []
4242no-exceptions = []
43+ no-xie-xip = []
4344device = []
4445memory = []
Original file line number Diff line number Diff line change @@ -65,13 +65,14 @@ _abs_start:
6565 .cfi_startproc
6666 .cfi_undefined ra" ,
6767 // Disable interrupts
68- #[ cfg( feature = "s-mode" ) ]
68+ #[ cfg( all ( feature = "s-mode" , not ( feature = "no-xie-xip" ) ) ) ]
6969 "csrw sie, 0
7070 csrw sip, 0" ,
71- #[ cfg( not( feature = "s-mode" ) ) ]
71+ #[ cfg( all ( not( feature = "s-mode" ) , not ( feature = "no-xie-xip" ) ) ) ]
7272 "csrw mie, 0
73- csrw mip, 0
74- csrr a0, mhartid" , // Make sure that the hart ID is in a0 in M-mode
73+ csrw mip, 0" ,
74+ #[ cfg( not( feature = "s-mode" ) ) ]
75+ "csrr a0, mhartid" , // Make sure that the hart ID is in a0 in M-mode
7576 // Set pre-init trap vector
7677 "la t0, _pre_init_trap" ,
7778 #[ cfg( feature = "s-mode" ) ]
You can’t perform that action at this time.
0 commit comments