aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/examples/pre_init.rs
blob: 00e2f2c1560109832541a119c20865f8725ecff8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! `cortex-m-rt` based program with a function run before RAM is initialized.

#![deny(warnings)]
#![no_main]
#![no_std]

extern crate cortex_m_rt as rt;
extern crate panic_semihosting;

use rt::{entry, pre_init};

#[pre_init]
unsafe fn disable_watchdog() {
    // Do what you need to disable the watchdog.
}

#[entry]
fn main() -> ! {
    loop {}
}