Skip to content

Commit 0cf0dbd

Browse files
committed
boot_serial: allow to build when CONFIG_MULTITHREADING=n
For zephyr-rtos: K_sleep() is not available when multithreading is disabled. Let's use k_busy_wait() in that case. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
1 parent d4d90f8 commit 0cf0dbd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

boot/boot_serial/src/boot_serial.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,11 @@ bs_reset(char *buf, int len)
436436
bs_empty_rsp(buf, len);
437437

438438
#ifdef __ZEPHYR__
439+
#ifdef CONFIG_MULTITHREADING
439440
k_sleep(K_MSEC(250));
441+
#else
442+
k_busy_wait(250000);
443+
#endif
440444
sys_reboot(SYS_REBOOT_COLD);
441445
#else
442446
os_cputime_delay_usecs(250000);

0 commit comments

Comments
 (0)