File tree Expand file tree Collapse file tree 5 files changed +12
-9
lines changed Expand file tree Collapse file tree 5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 6464      - uses : dtolnay/rust-toolchain@stable 
6565      - name : Install all Rust targets 
6666        run : rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf 
67+       - name : Remove examples that pass by failing 
68+         run : rm examples/data_overflow.rs 
6769      - name : Build examples for thumbv6m-none-eabi 
6870        run : cargo build --target=thumbv6m-none-eabi --features cortex-m/critical-section-single-core --examples 
6971      - name : Build examples for thumbv7m-none-eabi 
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 @@ -22,8 +22,8 @@ static mut DATA: [u8; 16 * 1024] = [1u8; 16 * 1024];
2222#[ entry]  
2323fn  main ( )  -> ! { 
2424    unsafe  { 
25-         let  _bigdata = ptr:: read_volatile ( & RODATA   as   * const   u8 ) ; 
26-         let  _bigdata = ptr:: read_volatile ( & DATA   as   * const   u8 ) ; 
25+         let  _bigdata = ptr:: read_volatile ( ptr :: addr_of! ( RODATA ) ) ; 
26+         let  _bigdata = ptr:: read_volatile ( ptr :: addr_of! ( DATA ) ) ; 
2727    } 
2828
2929    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