File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ runner = "hf2 elf"
66[build ]
77target = " thumbv7em-none-eabihf"
88rustflags = [
9-
109 # This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
1110 # See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
1211 " -C" , " link-arg=--nmagic" ,
1312
13+ # To use defmt, the linker needs to be provided with this argument. The BSP
14+ # uses build.rs to supply it conditionally, uncomment this line to use it
15+ # unconditionally.
16+ # "-C", "link-arg=-Tdefmt.x",
17+
1418 " -C" , " link-arg=-Tlink.x" ,
1519]
Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ usbd-serial = "0.2"
5252[features ]
5353# ask the HAL to enable atsamd51j support
5454default = [" rt" , " atsamd-hal/samd51j" ]
55+ # Use DEFMT_LOG environment variable to set logging level, defaults to `error`
56+ defmt = [" atsamd-hal/defmt" ]
5557dma = [" atsamd-hal/dma" ]
5658max-channels = [" dma" , " atsamd-hal/max-channels" ]
5759neopixel-spi = [" dep:ws2812-spi" ]
Original file line number Diff line number Diff line change @@ -12,5 +12,8 @@ fn main() {
1212 println ! ( "cargo:rustc-link-search={}" , out. display( ) ) ;
1313 println ! ( "cargo:rerun-if-changed=memory.x" ) ;
1414 }
15+ if env:: var_os ( "CARGO_FEATURE_DEFMT" ) . is_some ( ) {
16+ println ! ( "cargo:rustc-link-arg=-Tdefmt.x" ) ;
17+ }
1518 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
1619}
You can’t perform that action at this time.
0 commit comments