ncs zephyr logging and nrfx logging conflict

I want to use some nrfx samples but when I create a copy of it in vscode, it copies to a specified directory and didn't work because of the relative paths in CMakefiles.

set(COMMON_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../common)
include(${COMMON_PATH}/common.cmake)

I started with a working project using a copy sample shell_module. It works fine, but I want to use libraries from nrfx. So I moved to an adjacent directory of nrfx_saadc.

Once my shell_module is in there, I could use nrfx libraries just like other nrfx samples, but my log module doesn't work. nrfx samples use NRFX_LOG* while zephyr use LOG_*.

When I move a project to ncs/v2.4.2/modules/hal/nordic/nrfx/samples/src/nrfx_saadc and added copy few lines to CMakeLists.txt,

if(DEFINED CUSTOM_BOILERPLATE)
include(${CUSTOM_BOILERPLATE})
return()
endif()

set(COMMON_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../common)
include(${COMMON_PATH}/common.cmake)

GET_DEVICE_CONFIG_FILES(${BOARD} ../boards)

I messed up the logging and can't find the conflict.

Do you know how can I debug this? Thanks.

Related