File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## [ Unreleased]
9
9
10
+ ### Added
11
+
12
+ - New ` device ` feature to include ` device.x ` in ` link.x ` . This feature is based
13
+ on the current implementation of ` cortex-m-rt ` .
14
+
10
15
### Changed
11
16
12
17
- Linker file now refers to standard exceptions and interrupts only when the
Original file line number Diff line number Diff line change @@ -37,3 +37,4 @@ v-trap = ["riscv-rt-macros/v-trap"]
37
37
u-boot = [" riscv-rt-macros/u-boot" , " single-hart" ]
38
38
no-interrupts = []
39
39
no-exceptions = []
40
+ device = []
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ fn add_linker_script(arch_width: u32) -> io::Result<()> {
24
24
let interrupts_content = fs:: read_to_string ( "interrupts.x" ) ?;
25
25
include_content. push_str ( & ( interrupts_content + "\n " ) ) ;
26
26
}
27
+ // If device is enabled, include the device.x file (usually, provided by PACs)
28
+ if env:: var_os ( "CARGO_FEATURE_DEVICE" ) . is_some ( ) {
29
+ include_content. push_str ( "/* Device-specific exception and interrupt handlers */\n " ) ;
30
+ include_content. push_str ( "INCLUDE device.x\n " ) ;
31
+ }
27
32
28
33
content = content. replace ( "${INCLUDE_LINKER_FILES}" , & include_content) ;
29
34
You can’t perform that action at this time.
0 commit comments