aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/examples/data_overflow.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cortex-m-rt/examples/data_overflow.rs')
-rw-r--r--cortex-m-rt/examples/data_overflow.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cortex-m-rt/examples/data_overflow.rs b/cortex-m-rt/examples/data_overflow.rs
index 396f1c8..ceec18b 100644
--- a/cortex-m-rt/examples/data_overflow.rs
+++ b/cortex-m-rt/examples/data_overflow.rs
@@ -5,13 +5,12 @@
#![no_main]
#![no_std]
-#[macro_use(entry)]
extern crate cortex_m_rt as rt;
extern crate panic_abort;
use core::ptr;
-entry!(main);
+use rt::entry;
// This large static array uses most of .rodata
static RODATA: [u8; 48*1024] = [1u8; 48*1024];
@@ -20,6 +19,7 @@ static RODATA: [u8; 48*1024] = [1u8; 48*1024];
// without also overflowing RAM.
static mut DATA: [u8; 16*1024] = [1u8; 16*1024];
+#[entry]
fn main() -> ! {
unsafe {
let _bigdata = ptr::read_volatile(&RODATA as *const u8);