File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ main() {
5555 cargo rustc --target " $TARGET " --example " $ex " --features " ${needed_features} " --release -- $linker
5656 done
5757 for ex in " ${fail_examples[@]} " ; do
58- ! cargo rustc --target " $TARGET " --example " $ex " --features " ${needed_features} " -- $linker
59- ! cargo rustc --target " $TARGET " --example " $ex " --features " ${needed_features} " --release -- $linker
58+ cargo rustc --target " $TARGET " --example " $ex " --features " ${needed_features} " -- $linker && exit 1
59+ cargo rustc --target " $TARGET " --example " $ex " --features " ${needed_features} " --release -- $linker && exit 1
6060 done
6161 cargo rustc --target " $TARGET " --example device --features " device,${needed_features} " -- $linker
6262 cargo rustc --target " $TARGET " --example device --features " device,${needed_features} " --release -- $linker
Original file line number Diff line number Diff line change @@ -9,21 +9,22 @@ extern crate cortex_m_rt as rt;
99extern crate panic_halt;
1010
1111use core:: ptr;
12-
1312use rt:: entry;
1413
1514// This large static array uses most of .rodata
16- static RODATA : [ u8 ; 48 * 1024 ] = [ 1u8 ; 48 * 1024 ] ;
15+ const RODATA_SIZE : usize = 250 * 1024 ;
16+ static RODATA : [ u8 ; RODATA_SIZE ] = [ 1u8 ; RODATA_SIZE ] ;
1717
1818// This large mutable array causes .data to use the rest of FLASH
1919// without also overflowing RAM.
20- static mut DATA : [ u8 ; 16 * 1024 ] = [ 1u8 ; 16 * 1024 ] ;
20+ const DATA_SIZE : usize = 8 * 1024 ;
21+ static mut DATA : [ u8 ; DATA_SIZE ] = [ 1u8 ; DATA_SIZE ] ;
2122
2223#[ entry]
2324fn main ( ) -> ! {
2425 unsafe {
25- let _bigdata = ptr:: read_volatile ( ptr:: addr_of!( RODATA ) ) ;
26- let _bigdata = ptr:: read_volatile ( ptr:: addr_of!( DATA ) ) ;
26+ let _bigdata: u8 = ptr:: read_volatile ( ptr:: addr_of!( RODATA ) as * const u8 ) ;
27+ let _bigdata: u8 = ptr:: read_volatile ( ptr:: addr_of!( DATA ) as * const u8 ) ;
2728 }
2829
2930 loop { }
You can’t perform that action at this time.
0 commit comments