Skip to content
Snippets Groups Projects
Commit 1183f096 authored by Per's avatar Per
Browse files

wcet_nop

parent 34f4fdc7
No related branches found
No related tags found
No related merge requests found
...@@ -28,9 +28,21 @@ ...@@ -28,9 +28,21 @@
] ]
}, },
{ {
"label": "xargo build --example nested --features wcet_bkpt", "label": "xargo build --release --example nested",
"type": "shell", "type": "shell",
"command": "xargo build --features \"wcet_bkpt\" --example nested ", "command": "xargo build --release --example nested",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$rustc"
]
},
{
"label": "xargo build --release --example nested --features wcet_nop",
"type": "shell",
"command": "xargo build --release --features \"wcet_nop\" --example nested ",
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
......
...@@ -32,6 +32,7 @@ version = "0.1.0" ...@@ -32,6 +32,7 @@ version = "0.1.0"
[features] [features]
wcet_bkpt = [] wcet_bkpt = []
wcet_nop = []
[profile.release] [profile.release]
lto = true lto = true
......
...@@ -140,11 +140,13 @@ where ...@@ -140,11 +140,13 @@ where
let old = basepri::read(); let old = basepri::read();
let hw = (max_priority - ceiling) << (8 - _nvic_prio_bits); let hw = (max_priority - ceiling) << (8 - _nvic_prio_bits);
basepri::write(hw); basepri::write(hw);
if cfg!(feature = "wcet_bkpt") {bkpt();} else {nop();} if cfg!(feature = "wcet_bkpt") { bkpt(); }
if cfg!(feature = "wcet_nop") { nop(); }
let ret = f(data, &mut Threshold::new(ceiling)); let ret = f(data, &mut Threshold::new(ceiling));
if cfg!(feature = "wcet_bkpt") {bkpt();} else {nop();}
if cfg!(feature = "wcet_bkpt") { bkpt(); }
if cfg!(feature = "wcet_nop") { nop(); }
basepri::write(old); basepri::write(old);
ret ret
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment