ODP: Issue when log2, printk and assert together
Chruściński, Krzysztof
Hi,
this will not go away, it's a standard warning generated by cmake to notify user that ASSERTs are enabled since they bump footprint significantly and may not be welcomed for release build.
regards,
Krzysztof
Od: Srinivasan Tamilarasan <Srinivasan.Tamilarasan@...>
Wysłane: piątek, 23 lipca 2021 09:15 Do: Chruściński, Krzysztof <Krzysztof.Chruscinski@...>; devel@... <devel@...> Temat: RE: Issue when log2, printk and assert together Hi Krzysztof, The build error is due to our internal logic. Now the build error got resolved and working fine.
But the warning “__ASSERT() statements are globally ENABLED” I am getting always.
How to resolve this warning?
Thank you for your support.
Regards, Srinivasan
From: Chruściński, Krzysztof <Krzysztof.Chruscinski@...>
Sent: 23 July 2021 11:56 AM To: Srinivasan Tamilarasan <Srinivasan.Tamilarasan@...>; devel@... Subject: ODP: Issue when log2, printk and assert together
[External Email]: This email arrived from an external source - Please exercise caution when opening any attachments or clicking on links. Hi,
just tried it in hello_world and it compiles fine with configuration you've provided. Can you make sure that CBPRINTF_STATIC_PACKAGE_CHECK_ALIGNMENT is not set (it should be disabled by CONFIG_LOG_PRINTK).
regards, Krzysztof Od: Srinivasan Tamilarasan <Srinivasan.Tamilarasan@...>
Hi, I have cherry picked below 2 commits to zephyr2.6 branch and build it.
Then I have included the macros CONFIG_LOG=y , CONFIG_LOG2_MODE_DEFERRED=y, CONFIG_LOG_PRINTK=y and CONFIG_ASSERT=y. Then the build error got resolved and got below warning, __ASSERT() statements are globally ENABLED
After that I have added below statement in my application, __ASSERT(0, "ERRROR:Line:%d,File:%s\n", line, file);
Then again I am getting build error same like before the fix.
Is this issue completely resolved in the rtos? If it is any other commits do I need to take to resolve this issue?
Regards, Srinivasan
From: Srinivasan Tamilarasan
Hi, Good. It is got fixed now.
Thank you for the response.
Regards, Srinivasan
From: Chruściński, Krzysztof <Krzysztof.Chruscinski@...>
[External Email]: This email arrived from an external source - Please exercise caution when opening any attachments or clicking on links. Hi,
good timing. Fix for that has been merged 40 minutes ago: https://github.com/zephyrproject-rtos/zephyr/pull/36883
regards, Krzysztof Od:
devel@... <devel@...> w imieniu użytkownika Srinivasan Tamilarasan via lists.zephyrproject.org <srinivasan.tamilarasan=onsemi.com@...>
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.
Regards, Srinivasan |
||
|