Hi
In SDK 12.3.0 custom project use NRF_LOG_INFO output log, keil show: warning: #47-D: incompatible redefinition of macro "NRF_LOG_MODULE_NAME" (declared at line 60 of "....\components\libraries\log\nrf_log.h")
Hi
In SDK 12.3.0 custom project use NRF_LOG_INFO output log, keil show: warning: #47-D: incompatible redefinition of macro "NRF_LOG_MODULE_NAME" (declared at line 60 of "....\components\libraries\log\nrf_log.h")
One of the possibilities is that you have included "nrf_log.h" in header file.
yes, if i remove the header file, "nrf_log.h", use NRF_LOG_INFO will make a error Error: L6218E: Undefined symbol NRF_LOG_INFO (referred from my_protocol.o). so,What file do I need to add?
You should include "nrf_log.h" only in C files. It's because of the trick with redefining NRF_LOG_MODULE_NAME to get module name string added to a log message. It you really want to use logger in header files (for inline functions) then you need to undef NRF_LOG_MODULE_NAME at the bottom of such header file.