ODP: Issue when log2, printk and assert together

Chruściński, Krzysztof


good timing. Fix for that has been merged 40 minutes ago: https://github.com/zephyrproject-rtos/zephyr/pull/36883
When printk is redirected to logging (CONFIG_LOG_PRINTK) then printk.h includes log_msg2.h which includes cbprintf_internal.h which includes __assert.h which includes printk.h. Fixing it by adding compile time switches for including and using asserts in cbprintf and forcing to not use them when LOG_PRINTK is set. Fixes #36486.


Od: devel@... <devel@...> w imieniu użytkownika Srinivasan Tamilarasan via lists.zephyrproject.org <srinivasan.tamilarasan=onsemi.com@...>
Wysłane: środa, 21 lipca 2021 14:23
Do: devel@... <devel@...>
Temat: [Zephyr-devel] Issue when log2, printk and assert together

Hi all,

When enable CONFIG_LOG2_MODE_DEFERRED=y, CONFIG_LOG_PRINTK=y and CONFIG_ASSERT=y flag. I am getting the build error even there is no log/assert messages are used.


PFA of cmake error log.


But when I change to old method CONFIG_LOG_MODE_DEFERRED=y then there is no build error.


Can anyone help me to resolve this error?


Idea is I need to use both assert and log together in the same project and printk messages needs to route via logging subsystem.




Join devel@lists.zephyrproject.org to automatically receive all group messages.