File tree 3 files changed +8
-7
lines changed
3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ static RODATA2: &[u8; 2] = b"34";
21
21
#[ entry]
22
22
fn main ( ) -> ! {
23
23
unsafe {
24
- let _bss1 = ptr:: read_volatile ( & BSS1 ) ;
25
- let _bss2 = ptr:: read_volatile ( & BSS2 ) ;
26
- let _data1 = ptr:: read_volatile ( & DATA1 ) ;
27
- let _data2 = ptr:: read_volatile ( & DATA2 ) ;
28
- let _rodata1 = ptr:: read_volatile ( & RODATA1 ) ;
29
- let _rodata2 = ptr:: read_volatile ( & RODATA2 ) ;
24
+ let _bss1 = ptr:: read_volatile ( ptr :: addr_of! ( BSS1 ) ) ;
25
+ let _bss2 = ptr:: read_volatile ( ptr :: addr_of! ( BSS2 ) ) ;
26
+ let _data1 = ptr:: read_volatile ( ptr :: addr_of! ( DATA1 ) ) ;
27
+ let _data2 = ptr:: read_volatile ( ptr :: addr_of! ( DATA2 ) ) ;
28
+ let _rodata1 = ptr:: read_volatile ( ptr :: addr_of! ( RODATA1 ) ) ;
29
+ let _rodata2 = ptr:: read_volatile ( ptr :: addr_of! ( RODATA2 ) ) ;
30
30
}
31
31
32
32
loop { }
Original file line number Diff line number Diff line change @@ -1038,7 +1038,7 @@ pub fn heap_start() -> *mut u32 {
1038
1038
static mut __sheap: u32 ;
1039
1039
}
1040
1040
1041
- unsafe { & mut __sheap }
1041
+ unsafe { core :: ptr :: addr_of_mut! ( __sheap) }
1042
1042
}
1043
1043
1044
1044
// Entry point is Reset.
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ use cortex_m::iprintln;
43
43
use cortex_m:: peripheral:: ITM ;
44
44
45
45
#[ panic_handler]
46
+ #[ cfg( all( not( test) , not( doctest) ) ) ]
46
47
fn panic ( info : & PanicInfo ) -> ! {
47
48
interrupt:: disable ( ) ;
48
49
You can’t perform that action at this time.
0 commit comments