-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Licensed under the Apache-2.0 license | ||
|
||
//! A very simple program to test the behavior of the CPU when trying to write to ROM. | ||
|
||
#![no_main] | ||
#![no_std] | ||
|
||
// Needed to bring in startup code | ||
#[allow(unused)] | ||
use caliptra_test_harness::println; | ||
|
||
#[panic_handler] | ||
pub fn panic(_info: &core::panic::PanicInfo) -> ! { | ||
loop {} | ||
} | ||
|
||
#[no_mangle] | ||
extern "C" fn main() { | ||
unsafe { | ||
let rom_address = 0x00_u32; | ||
let rom_address_ptr = rom_address as *mut u32; | ||
*rom_address_ptr = 0xdeadbeef; | ||
} | ||
loop {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters