Skip to content

Commit

Permalink
Merge pull request #505 from newAM/fix-ci
Browse files Browse the repository at this point in the history
Fix nightly CI failures
  • Loading branch information
adamgreig authored Jan 12, 2024
2 parents ff2bb75 + c91d0f9 commit 6b3a5b7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rt-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- name: Install all Rust targets
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
- name: Remove examples that pass by failing
run: rm examples/data_overflow.rs
- name: Build examples for thumbv6m-none-eabi
run: cargo build --target=thumbv6m-none-eabi --features cortex-m/critical-section-single-core --examples
- name: Build examples for thumbv7m-none-eabi
Expand Down
12 changes: 6 additions & 6 deletions cortex-m-rt/examples/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ static RODATA2: &[u8; 2] = b"34";
#[entry]
fn main() -> ! {
unsafe {
let _bss1 = ptr::read_volatile(&BSS1);
let _bss2 = ptr::read_volatile(&BSS2);
let _data1 = ptr::read_volatile(&DATA1);
let _data2 = ptr::read_volatile(&DATA2);
let _rodata1 = ptr::read_volatile(&RODATA1);
let _rodata2 = ptr::read_volatile(&RODATA2);
let _bss1 = ptr::read_volatile(ptr::addr_of!(BSS1));
let _bss2 = ptr::read_volatile(ptr::addr_of!(BSS2));
let _data1 = ptr::read_volatile(ptr::addr_of!(DATA1));
let _data2 = ptr::read_volatile(ptr::addr_of!(DATA2));
let _rodata1 = ptr::read_volatile(ptr::addr_of!(RODATA1));
let _rodata2 = ptr::read_volatile(ptr::addr_of!(RODATA2));
}

loop {}
Expand Down
4 changes: 2 additions & 2 deletions cortex-m-rt/examples/data_overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ static mut DATA: [u8; 16 * 1024] = [1u8; 16 * 1024];
#[entry]
fn main() -> ! {
unsafe {
let _bigdata = ptr::read_volatile(&RODATA as *const u8);
let _bigdata = ptr::read_volatile(&DATA as *const u8);
let _bigdata = ptr::read_volatile(ptr::addr_of!(RODATA));
let _bigdata = ptr::read_volatile(ptr::addr_of!(DATA));
}

loop {}
Expand Down
2 changes: 1 addition & 1 deletion cortex-m-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ pub fn heap_start() -> *mut u32 {
static mut __sheap: u32;
}

unsafe { &mut __sheap }
unsafe { core::ptr::addr_of_mut!(__sheap) }
}

// Entry point is Reset.
Expand Down
1 change: 1 addition & 0 deletions panic-itm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use cortex_m::iprintln;
use cortex_m::peripheral::ITM;

#[panic_handler]
#[cfg(all(not(test), not(doctest)))]
fn panic(info: &PanicInfo) -> ! {
interrupt::disable();

Expand Down

0 comments on commit 6b3a5b7

Please sign in to comment.