Skip to content

Commit 936dfc5

Browse files
author
Olle Ronstad
committed
added trampoline init
1 parent 13285e7 commit 936dfc5

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
@@ -241,7 +241,19 @@ pub fn pre_init_enable_interrupts(app: &App, analysis: &CodegenAnalysis) -> Vec<
241241
} else {
242242
Some((&task.args.priority, &task.args.binds))
243243
}
244-
})) {
244+
})).chain(app.hardware_tasks.values().filter_map(|task| {
245+
if let Some(trampoline) = &task.args.trampoline {
246+
if is_exception(trampoline) {
247+
// We do exceptions in another pass
248+
return None;
249+
} else {
250+
// If there's a trampoline, we need to unmask and set priority for it too
251+
Some((&task.args.priority, trampoline))
252+
}
253+
} else {
254+
None
255+
}
256+
})){
245257
let es = format!(
246258
"Maximum priority used by interrupt vector '{name}' is more than supported by hardware"
247259
);

0 commit comments

Comments
 (0)