This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using CLI and LOG over RTT simultaneously with SDK 15.

Hi all, I'm using nrf52832 with SDK15 in my project. For debugging purposes I need both CLI and LOG modules enabled with RTT as a transport. I followed this manual to setup putty on PC ( infocenter.nordicsemi.com/.../lib_cli.html. LOG module alone works ok but if I enable CLI I notice that many log messages are lost. I tried to adjust buffers sizes without noticeable result.  sdk_config.h holds several settings but I didn't find any description or example how to use them together to make LOG and CLI work together without data loss.

NRF_LOG_ENABLED 1
NRF_LOG_BUFSIZE 512
NRF_LOG_BACKEND_RTT_ENABLED 0

NRF_CLI_ENABLED 1
NRF_CLI_RTT_ENABLED 1
NRF_CLI_LOG_BACKEND 0
NRF_CLI_CMD_BUFF_SIZE 128
NRF_CLI_PRINTF_BUFF_SIZE 23

SEGGER_RTT_CONFIG_BUFFER_SIZE_UP 1024

So question is how to setup the project with this defines to make LOG and CLI work together without data loss?

Thanks

Parents
  • Hi,

    Please check peripheral CLI example. It has configured 3 backends at the same time: uart, USB and RTT. You will be able to use console and log over RTT.

    There is problem with debugging (stepping/traps) due to used version of app timer (v2).

    If you would like to use traps and stepping you need to change app timer to version 1.

  • Thank you jakub, I will try this example on. About debugging, do you mean jtag step by step code execution and breakpoints? Can you link me to description what exect behaviour during debugging with app timer 2?to cange to app timer 1 I need just to set define or port piece of code fromprevious sdk version?

  • Hi,

    Yes you are not able to step application and work with breakpoints. I apologize but I do not remember details regarding root cause. I kow it was related to the fact that App Timer v2 is using RTC instead of casual timer. When application hits a breakpoint there is some problem with synchronization.

    App Timer v1 sources are still available within SDK15. I think you need to only change source file of app timer in your project.

Reply
  • Hi,

    Yes you are not able to step application and work with breakpoints. I apologize but I do not remember details regarding root cause. I kow it was related to the fact that App Timer v2 is using RTC instead of casual timer. When application hits a breakpoint there is some problem with synchronization.

    App Timer v1 sources are still available within SDK15. I think you need to only change source file of app timer in your project.

Children
Related