File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 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";
2121#[ entry]
2222fn main ( ) -> ! {
2323 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 ) ) ;
3030 }
3131
3232 loop { }
Original file line number Diff line number Diff line change @@ -1038,7 +1038,7 @@ pub fn heap_start() -> *mut u32 {
10381038 static mut __sheap: u32 ;
10391039 }
10401040
1041- unsafe { & mut __sheap }
1041+ unsafe { core :: ptr :: addr_of_mut! ( __sheap) }
10421042}
10431043
10441044// Entry point is Reset.
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ use cortex_m::iprintln;
4343use cortex_m:: peripheral:: ITM ;
4444
4545#[ panic_handler]
46+ #[ cfg( all( not( test) , not( doctest) ) ) ]
4647fn panic ( info : & PanicInfo ) -> ! {
4748 interrupt:: disable ( ) ;
4849
You can’t perform that action at this time.
0 commit comments