Skip to content
Snippets Groups Projects
Commit 2021aa0e authored by Per's avatar Per
Browse files

rust no_std no debug

parent 4427b856
No related branches found
No related tags found
No related merge requests found
...@@ -12,5 +12,5 @@ panic = "abort" ...@@ -12,5 +12,5 @@ panic = "abort"
[profile.release] [profile.release]
panic = "abort" panic = "abort"
codegen-units = 1 # better optimizations codegen-units = 1 # better optimizations
debug = true # symbols are nice and they don't increase the size on Flash # debug = true # symbols are nice and they don't increase the size on Flash
lto = true # better optimizations lto = true # better optimizations
\ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
use core::intrinsics; use core::intrinsics;
use core::panic::PanicInfo; use core::panic::PanicInfo;
use core::ptr;
#[panic_handler] #[panic_handler]
fn panic(_info: &PanicInfo) -> ! { fn panic(_info: &PanicInfo) -> ! {
...@@ -14,7 +15,7 @@ fn panic(_info: &PanicInfo) -> ! { ...@@ -14,7 +15,7 @@ fn panic(_info: &PanicInfo) -> ! {
#[inline(never)] #[inline(never)]
fn f1() -> u32 { fn f1() -> u32 {
0 unsafe { ptr::read_volatile(&0) }
} }
#[no_mangle] #[no_mangle]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment