Skip to content

Commit 7bdc621

Browse files
carlocaionenashif
authored andcommitted
qemu_cortex_m0: Disable QEMU icount feature
The NRF timer emulated by QEMU is not behaving correctly when icount is used. This is easily reproducible with the following snippet: unsigned int key = irq_lock(); k_busy_wait(15000); irq_unlock(key); printk("done\n"); where the `printk` is never executed and `k_busy_wait` is never left. This particular code is only mis-behaving when `-icount` is used: This works fine: qemu-system-arm -cpu cortex-m0 -machine microbit -nographic -kernel build/zephyr/zephyr.elf -rtc clock=vm This doesn't work: qemu-system-arm -cpu cortex-m0 -machine microbit -nographic -kernel build/zephyr/zephyr.elf -rtc clock=vm -icount shift=6,align=off,sleep=off Signed-off-by: Carlo Caione <ccaione@baylibre.com>
1 parent 7a48ad3 commit 7bdc621

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

boards/arm/qemu_cortex_m0/qemu_cortex_m0_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ CONFIG_CONSOLE=y
1919
CONFIG_UART_CONSOLE=y
2020

2121
CONFIG_PINCTRL=y
22+
23+
# icount is kinda broken when the NRF timer emulation is used
24+
CONFIG_QEMU_ICOUNT=n

0 commit comments

Comments
 (0)