From 9764121cc1cdd6a7c27e86fa8d65bb6d2d48dc27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 14 Jan 2023 11:24:51 +0100 Subject: 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 --- examples/binds.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/binds.rs') diff --git a/examples/binds.rs b/examples/binds.rs index db5bd96..601f245 100644 --- a/examples/binds.rs +++ b/examples/binds.rs @@ -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 } } -- cgit v1.2.3