Skip to content

Commit 1a61880

Browse files
author
Olle Ronstad
committed
added trampoline init
1 parent 3e10f53 commit 1a61880

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

rtic-macros/src/codegen/bindings/cortex.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,19 @@ pub fn pre_init_enable_interrupts(app: &App, analysis: &CodegenAnalysis) -> Vec<
270270
} else {
271271
Some((&task.args.priority, &task.args.binds))
272272
}
273-
})) {
273+
})).chain(app.hardware_tasks.values().filter_map(|task| {
274+
if let Some(trampoline) = &task.args.trampoline {
275+
if is_exception(trampoline) {
276+
// We do exceptions in another pass
277+
return None;
278+
} else {
279+
// If there's a trampoline, we need to unmask and set priority for it too
280+
Some((&task.args.priority, trampoline))
281+
}
282+
} else {
283+
None
284+
}
285+
})){
274286
let es = format!(
275287
"Maximum priority used by interrupt vector '{name}' is more than supported by hardware"
276288
);

0 commit comments

Comments
 (0)