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/).
77
88## [ Unreleased]
99
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+
1015### Changed
1116
1217- 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"]
3737u-boot = [" riscv-rt-macros/u-boot" , " single-hart" ]
3838no-interrupts = []
3939no-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<()> {
2424 let interrupts_content = fs:: read_to_string ( "interrupts.x" ) ?;
2525 include_content. push_str ( & ( interrupts_content + "\n " ) ) ;
2626 }
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+ }
2732
2833 content = content. replace ( "${INCLUDE_LINKER_FILES}" , & include_content) ;
2934
You can’t perform that action at this time.
0 commit comments