-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arch: Migrate to new logging subsys #9361
arch: Migrate to new logging subsys #9361
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9361 +/- ##
=======================================
Coverage 52.16% 52.16%
=======================================
Files 212 212
Lines 25894 25894
Branches 5563 5563
=======================================
Hits 13507 13507
Misses 10129 10129
Partials 2258 2258 Continue to review full report at Codecov.
|
89a853b
to
689d96a
Compare
I have been trying to duplicate the build issue locally with success: I guess I am missing something... Any idea? |
#include <logging/sys_log.h> | ||
|
||
#define LOG_MODULE_NAME arm_core_mpu | ||
#define SYS_LOG_LEVEL SYS_LOG_LEVEL_DEBUG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this entry has no impact on the logger configuration. If you want to overwrite default configuration you need to use
#define LOG_LEVEL LOG_LEVEL_DEBUG
Ideally, kconfig option should be added (see the comment #8816 (comment))
arch/arm/core/cortex_m/mpu/nxp_mpu.c
Outdated
@@ -491,7 +495,7 @@ static int nxp_mpu_init(struct device *arg) | |||
return 0; | |||
} | |||
|
|||
#if defined(CONFIG_SYS_LOG) | |||
#if defined(CONFIG_LOG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is no longer needed. New logger is ready to be used from the start (before any module/driver initialization).
#include <linker/linker-defs.h> | ||
|
||
#define LOG_MODULE_NAME arm_mpu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if there is point to create to independent instances (arm_mpu and arm_core_mpu). If they are always working together then it can be just arm_mpu (see http://docs.zephyrproject.org/subsystems/logging/logger.html#usage for details how to declare a multi-file module).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nordic-krch arm_mpu, or nxp_mpu are the MPU drivers, while arm_core_mpu is the high-level memory protection module that can work with both drivers
arch/arm/core/cortex_m/mpu/nxp_mpu.c
Outdated
#include <misc/__assert.h> | ||
#include <linker/linker-defs.h> | ||
|
||
#define LOG_MODULE_NAME nxp_mpu | ||
#define SYS_LOG_LEVEL SYS_LOG_LEVEL_DEBUG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already mentioned. has no impact on the logger.
@pizi-nordic FYI |
689d96a
to
6651f49
Compare
@nordic-krch @ioannisg Comments addressed |
arch/arm/Kconfig
Outdated
prompt "ARM Architecture logging level" | ||
default ARCH_ARM_LOG_LEVEL_DBG | ||
|
||
config ARCH_ARM_LOG_LEVEL_OFF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do these options need to be specific to ARM and not generic, i.e. for any ARCH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change done in new PR
Migrate from SYS_LOG to LOG logging mechanism. Signed-off-by: Olivier Martin <olivier.martin@proglove.de>
6651f49
to
6820576
Compare
@Olivier-ProGlove this is now much better, IMO, as there will be common K-config structure for logging inside the component. @pizi-nordic could you please, re-review? |
Looks good to me. @nashif could you please do a sanity review, as well? |
How could we proceed with this? @Olivier-ProGlove could you re-base this PR and resolve conflicts? @nordic-krch could you, then, re-review? |
I am waiting for:
And then I will update all my new logging subystem pull-requests? Does it sound a reasonable plan? |
addressed in #10029 |
Migrate from SYS_LOG to LOG logging mechanism.
Signed-off-by: Olivier Martin olivier.martin@proglove.de