File tree 5 files changed +12
-9
lines changed
5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 64
64
- uses : dtolnay/rust-toolchain@stable
65
65
- name : Install all Rust targets
66
66
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
67
69
- name : Build examples for thumbv6m-none-eabi
68
70
run : cargo build --target=thumbv6m-none-eabi --features cortex-m/critical-section-single-core --examples
69
71
- 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";
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 @@ -22,8 +22,8 @@ static mut DATA: [u8; 16 * 1024] = [1u8; 16 * 1024];
22
22
#[ entry]
23
23
fn main ( ) -> ! {
24
24
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 ) ) ;
27
27
}
28
28
29
29
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