All examples pass with cargo xtask --target all

This commit is contained in:
Emil Fresk 2023-01-08 19:56:47 +01:00 committed by Henrik Tjäder
parent 1fdcde1ead
commit d3d0109dd0
13 changed files with 28 additions and 21 deletions

View file

@ -1,5 +1,6 @@
init init
hello from normal 2 hello from async 3 a 1
hello from async 2 hello from async 4 a 2
hello from normal 1 hello from async 1 a 3
hello from async 1 hello from async 2 a 4
idle

View file

@ -1,3 +1,4 @@
init init
hello from normal hello from async2
hello from async hello from async
idle

View file

@ -0,0 +1,3 @@
async_task data:[22, 22, 22, 22, 22]
uart0 data:[22, 22, 22, 22, 22]
idle

View file

@ -1,2 +1,2 @@
foo: a = 0, b = 0, c = 0 bar: a = 0, b = 1, c = 2
bar: a = 0, b = 0, c = 0 foo: a = 0, b = 1, c = 2

View file

@ -1,2 +1 @@
foo 1, 2 foo
foo 2, 3

View file

@ -1,3 +1,3 @@
foo: local_to_foo = 1
bar: local_to_bar = 1 bar: local_to_bar = 1
foo: local_to_foo = 1
idle: local_to_idle = 1 idle: local_to_idle = 1

View file

@ -0,0 +1,3 @@
init
bar a 13
foo a 13

View file

@ -34,10 +34,9 @@ mod app {
rtic::pend(Interrupt::UART0); rtic::pend(Interrupt::UART0);
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
loop { loop {
cortex_m::asm::nop(); cortex_m::asm::nop();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
} }
} }

View file

@ -40,10 +40,9 @@ mod app {
rtic::pend(Interrupt::UART0); rtic::pend(Interrupt::UART0);
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
loop { loop {
cortex_m::asm::nop(); cortex_m::asm::nop();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
} }
} }

View file

@ -39,6 +39,7 @@ mod app {
rtic::pend(Interrupt::UART1); rtic::pend(Interrupt::UART1);
cortex_m::asm::nop();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
} }

View file

@ -37,10 +37,9 @@ mod app {
rtic::pend(Interrupt::UART0); rtic::pend(Interrupt::UART0);
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
loop { loop {
cortex_m::asm::nop(); cortex_m::asm::nop();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
} }
} }

View file

@ -62,6 +62,6 @@ mod app {
#[task(shared = [&shared])] #[task(shared = [&shared])]
async fn bar(c: bar::Context) { async fn bar(c: bar::Context) {
let shared: &NotSync = c.shared.shared; let shared: &NotSync = c.shared.shared;
hprintln!("foo a {}", shared.data); hprintln!("bar a {}", shared.data);
} }
} }

View file

@ -87,12 +87,14 @@ fn main() -> anyhow::Result<()> {
let targets = [ARMV7M, ARMV6M]; let targets = [ARMV7M, ARMV6M];
let examples: Vec<_> = std::fs::read_dir("./examples")? let examples: Vec<_> = std::fs::read_dir("./examples")?
.filter_map(|path| { .filter_map(|p| p.ok())
path.map(|p| p.path().file_stem().unwrap().to_str().unwrap().to_string()) .map(|p| p.path())
.ok() .filter(|p| p.display().to_string().ends_with(".rs"))
}) .map(|path| path.file_stem().unwrap().to_str().unwrap().to_string())
.collect(); .collect();
println!("examples: {examples:?}");
let opts = Options::from_args(); let opts = Options::from_args();
let target = &opts.target; let target = &opts.target;