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

Issue with CR when using CLI and RTT logger

Hi

I have a project that uses several protocols, including UART and USB CLI

As such, I had to move the nRF logger to work on RTT, so that everything could work properly

My issue is that if I get the RTT logger working, my CLI printing break (they are going diagonally instead of as new lines)

I investigated and found the issue was related to the define NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED in sdk_config.h

according to nrf_log not working on SES, I need to set the define to 0 for RTT prints to work correctly

however, according to cli new line problem, I need to set the define to 1 for CLI prints to look correct

I tried changing the syntax of my CLI prints, but I think some of the formatting is tied to the CLI functions in the SDK, which I don't want to change

Is there any way to get both a functioning RTT logger in SES, as well as organized prints in my CLI interface, in the same project?

Any and all help will be appreciated

Thanks in advance

Aviv