Skip to content

Fix nightly CI failures #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/rt-ci.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions cortex-m-rt/examples/alignment.rs
Original file line number Diff line number Diff line change
@@ -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 {}
4 changes: 2 additions & 2 deletions cortex-m-rt/examples/data_overflow.rs
Original file line number Diff line number Diff line change
@@ -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 {}
2 changes: 1 addition & 1 deletion cortex-m-rt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions panic-itm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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();