Skip to content

Commit

Permalink
Output the missing peripheral name and referencing task instead of pa…
Browse files Browse the repository at this point in the history
…nicing. (#151)
  • Loading branch information
luqmana authored May 11, 2021
1 parent d3d6405 commit c6f1b89
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions xtask/src/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,16 @@ fn make_descriptors(
// For peripherals referenced by the task, we don't need to allocate
// _new_ regions, since we did them all in advance. Just record the
// entries for the TaskDesc.
for (j, name) in task.uses.iter().enumerate() {
task_regions[allocs.len() + j] = peripheral_index[name] as u8;
for (j, peripheral_name) in task.uses.iter().enumerate() {
if let Some(&peripheral) = peripheral_index.get(&peripheral_name) {
task_regions[allocs.len() + j] = peripheral as u8;
} else {
bail!(
"Could not find peripheral `{}` referenced by task `{}`.",
peripheral_name,
name
);
}
}

let mut flags = abi::TaskFlags::empty();
Expand Down

0 comments on commit c6f1b89

Please sign in to comment.