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/).
13
13
- New ` #[riscv_rt::post_init] ` attribute to aid in the definition of the ` __post_init ` function.
14
14
- Added ` .uninit ` section to the linker file. Due to its similarities with ` .bss ` , the
15
15
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)
16
17
17
18
### Changed
18
19
Original file line number Diff line number Diff line change @@ -40,5 +40,6 @@ v-trap = ["riscv-rt-macros/v-trap"]
40
40
u-boot = [" riscv-rt-macros/u-boot" , " single-hart" ]
41
41
no-interrupts = []
42
42
no-exceptions = []
43
+ no-xie-xip = []
43
44
device = []
44
45
memory = []
Original file line number Diff line number Diff line change @@ -65,13 +65,14 @@ _abs_start:
65
65
.cfi_startproc
66
66
.cfi_undefined ra" ,
67
67
// Disable interrupts
68
- #[ cfg( feature = "s-mode" ) ]
68
+ #[ cfg( all ( feature = "s-mode" , not ( feature = "no-xie-xip" ) ) ) ]
69
69
"csrw sie, 0
70
70
csrw sip, 0" ,
71
- #[ cfg( not( feature = "s-mode" ) ) ]
71
+ #[ cfg( all ( not( feature = "s-mode" ) , not ( feature = "no-xie-xip" ) ) ) ]
72
72
"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
75
76
// Set pre-init trap vector
76
77
"la t0, _pre_init_trap" ,
77
78
#[ cfg( feature = "s-mode" ) ]
You can’t perform that action at this time.
0 commit comments