nRF54L15, Zephyr +MCUboot.
I am unable to redirect LOG_INF() output to RTT.
prj.conf
CONFIG_USE_SEGGER_RTT=y CONFIG_RTT_CONSOLE=y CONFIG_UART_CONSOLE=n
Can you tell me what is wrong? How to force logger to output to RTT?
nRF54L15, Zephyr +MCUboot.
I am unable to redirect LOG_INF() output to RTT.
prj.conf
CONFIG_USE_SEGGER_RTT=y CONFIG_RTT_CONSOLE=y CONFIG_UART_CONSOLE=n
Can you tell me what is wrong? How to force logger to output to RTT?
Hello,
Do you have CONFIG_LOG and CONFIG_LOG_BACKEND_RTT enabled as well? Also, did you have RTT logging working before including MCUBoot?
Best regards,
Vidar
The following settings do not compile
CONFIG_LOG=y CONFIG_LOG_BACKEND_RTT=y CONFIG_LOG_BUFFER_SIZE=8192 CONFIG_USE_SEGGER_RTT=y CONFIG_RTT_CONSOLE=y CONFIG_UART_CONSOLE=n
Error is:
warning: LOG_PRINTK (defined at subsys/logging\Kconfig.processing:8) has direct dependencies !USERSPACE && !LOG_MODE_MINIMAL && LOG with value n, but is currently being y-selected by the following sym bols: - LOG_BACKEND_RTT_FORCE_PRINTK (defined at subsys/logging\backends\Kconfig.rtt:103), with value y, direct dependencies LOG_BACKEND_RTT && !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL && LOG (value: y), an d select condition LOG_BACKEND_RTT && !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL && LOG (value: y)Parsing C:/ncs/v3.0.2/zephyr/Kconfig error: Aborting due to Kconfig warnings Loaded configuration 'C:/ncs/v3.0.2/zephyr/boards/nordic/nrf54l15dk/nrf54l15dk_nrf54l15_cpuapp_ns_defconfig' Merged configuration 'H:/cup/prj.conf' Merged configuration 'H:/cup/build/cup/zephyr/.config.sysbuild' CMake Error at C:/ncs/v3.0.2/zephyr/cmake/modules/kconfig.cmake:396 (message): command failed with return code: 1 Call Stack (most recent call first): C:/ncs/v3.0.2/nrf/cmake/modules/kconfig.cmake:36 (include) C:/ncs/v3.0.2/zephyr/cmake/modules/zephyr_default.cmake:133 (include) C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include) C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred! CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message): CMake configure failed for Zephyr project: cup Location: H:/cup Call Stack (most recent call first): cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake) cmake/modules/sysbuild_default.cmake:21 (include) C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include) C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) C:/ncs/v3.0.2/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include) template/CMakeLists.txt:10 (find_package) -- Configuring incomplete, errors occurred! See also "H:/cup/build/CMakeFiles/CMakeOutput.log". ←[91mFATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe '-Bh:\cup\build' -GNinja -DBOARD=nrf54l15 dk/nrf54l15/cpuapp/ns '-SC:\ncs\v3.0.2\zephyr\share\sysbuild' '-DAPP_DIR:PATH=h:\cup' ←[0m
The following settings work with logging to COM port:
CONFIG_LOG=y CONFIG_LOG_BUFFER_SIZE=8192
I did not try without MCUboot.
Any idea how to fix RTT logging?
Note:
NCS 3.0.2, LOG_xxx().
printk() is not used.
From the warning message I can see it's failing because CONFIG_USERSPACE or CONFIG_LOG_MODE_MINIMAL is enabled in your configuration. For logging, the default is CONFIG_LOG_MODE_DEFERRED, but note that CONFIG_NCS_SAMPLES_DEFAULTS will select log mode minimal if you have this enabled in your project configuration.
From the warning message I can see it's failing because CONFIG_USERSPACE or CONFIG_LOG_MODE_MINIMAL is enabled in your configuration. For logging, the default is CONFIG_LOG_MODE_DEFERRED, but note that CONFIG_NCS_SAMPLES_DEFAULTS will select log mode minimal if you have this enabled in your project configuration.
It turns out that CONFIG_USERSPACE=y was the offending line. Is there any way to use RTT in combination with CONFIG_USERSPACE or not?
I see. This requirement looks to have been removed in SDK v3.1.0 by the following commits:
- https://github.com/nrfconnect/sdk-zephyr/commit/13054293adb045d51762a8dd5b60612dd60e475c
- https://github.com/nrfconnect/sdk-zephyr/commit/77925656ab8
Works on NCS 3.2.0