File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ main() {
55
55
cargo rustc --target " $TARGET " --example " $ex " --features " ${needed_features} " --release -- $linker
56
56
done
57
57
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
60
60
done
61
61
cargo rustc --target " $TARGET " --example device --features " device,${needed_features} " -- $linker
62
62
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;
9
9
extern crate panic_halt;
10
10
11
11
use core:: ptr;
12
-
13
12
use rt:: entry;
14
13
15
14
// 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 ] ;
17
17
18
18
// This large mutable array causes .data to use the rest of FLASH
19
19
// 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 ] ;
21
22
22
23
#[ entry]
23
24
fn main ( ) -> ! {
24
25
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 ) ;
27
28
}
28
29
29
30
loop { }
You can’t perform that action at this time.
0 commit comments