I am debuggin using NRF_LOG over UART. Now I want to implement own UART functionality e.g. to configure the firmware. Is it possible to use the UART for both purposes?
I am debuggin using NRF_LOG over UART. Now I want to implement own UART functionality e.g. to configure the firmware. Is it possible to use the UART for both purposes?
Hi,
I would recommend that you use the command line interface (CLI) library in cooperation with NRF_LOG to achieve such functionality. You can enable CLI commands in NRF_LOG by setting the NRF_LOG_CLI_CMDS and NRF_CLI_LOG_BACKEND configs. Please have a look at the CLI example in the SDK.
Best regards,
Jørgen
Hi,
I would recommend that you use the command line interface (CLI) library in cooperation with NRF_LOG to achieve such functionality. You can enable CLI commands in NRF_LOG by setting the NRF_LOG_CLI_CMDS and NRF_CLI_LOG_BACKEND configs. Please have a look at the CLI example in the SDK.
Best regards,
Jørgen
Thank you for the info. I'm playing with the CLI now. But can't link the project, I'm getting this error:
_build/nrf52832_xxaa/cli.c.o:(.rodata.m_cli_uart_transport+0x0): undefined reference to `nrf_cli_uart_transport_api'
I have
#define NRF_CLI_UART_ENABLED 1 #define NRF_FPRINTF_ENABLED 1
in my config file.
Is there something else that needs to be enabled to link the nfr_cli_uart_transport_api?
I found where is the problem. I enabled the NRF_CLI_UART_ENABLED in my own config.h file, not in the sdk_config.h.
I am struggling with the same. I had to comment out all NRF_LOG statements to build when I had my own UART. However, there is no NRF_CLI_UART related stuff in my sdk_config.h file.
The UART in my case is for communicating with another MCU. On the DK that UART is not used but I use button presses to simulate it.
I suppose the simplest solution is to conditional compile for DK or actual production device (where NRF_LOG cannot be used).