misc: Add k_panic on assert

Replaced forever loop in assert with call to a function.
In post_assert_action() function, k_panic is called.

Forever loop was preventing logs to be printed and had behavior
ependent on the context (low prioriy thread - system continue to
ork, irq - system is blocked).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2019-01-25 13:56:10 +01:00 committed by Andrew Boie
commit 6904501173
3 changed files with 24 additions and 13 deletions

View file

@ -17,3 +17,5 @@ zephyr_sources_ifdef(CONFIG_JSON_LIBRARY json.c)
zephyr_sources_if_kconfig(printk.c)
zephyr_sources_if_kconfig(ring_buffer.c)
zephyr_sources_ifdef(CONFIG_ASSERT assert.c)