Upgrade of semihosting changed timing

New semihosting 0.5 does not use error handling,
returns directly and as semihosting is generally slow
this led to missing print statements.

Workaround is to add NOP, which seems sufficient
to let it flush the buffers
This commit is contained in:
Henrik Tjäder 2023-01-14 11:24:51 +01:00
parent 050313d62d
commit 9764121cc1
4 changed files with 12 additions and 6 deletions

View file

@ -34,10 +34,11 @@ mod app {
rtic::pend(Interrupt::UART0);
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
loop {
// Exit moved after nop to ensure that rtic::pend gets
// to run before exiting
cortex_m::asm::nop();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}

View file

@ -40,10 +40,11 @@ mod app {
rtic::pend(Interrupt::UART0);
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
loop {
cortex_m::asm::nop();
// Exit moved after nop to ensure that rtic::pend gets
// to run before exiting
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}

View file

@ -39,6 +39,9 @@ mod app {
rtic::pend(Interrupt::UART1);
// Exit moved after nop to ensure that rtic::pend gets
// to run before exiting
cortex_m::asm::nop();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}

View file

@ -37,10 +37,11 @@ mod app {
rtic::pend(Interrupt::UART0);
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
loop {
// Exit moved after nop to ensure that rtic::pend gets
// to run before exiting
cortex_m::asm::nop();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}