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

NRF_LOG printing through RTT does not print

Hi,

I have just recently started to develop an NRF52832 chip with Keil uVision 5.

My setup is the following:

PCA10028 Development kit connected to Feather NRF52832 bluefruit LE with SWD cable to debug pins

SDK 12.3.0

I have managed to develop and flash to the chip successfully during the course of one week without problems, but I haven't managed to get printing to the J-Link RTT viewer to work yet.

I am using the NRF_LOG functions to print simple test strings but nothing shows up on the RTT viewer. What I've done so far:

- Modified the sdk_config.h: (NRF_LOG_BACKEND_SERIAL_USES_RTT 1 , and NRF_LOG_ENABLED 1)

- With the J-Link RTT viewer: connected to USB port of Development kit successfully (SWD 4000 kHz). See picture below.

- Flashed a simple blink program just for testing NRF_LOG functionality (blinking works as it should, but no printing):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
int main(void)
{
NRF_LOG_INIT(NULL);
char string_on_stack[] = "stack";
NRF_LOG_INFO("%s",nrf_log_push(string_on_stack));
NRF_LOG_DEBUG("TESTING");
/* Configure board. */
bsp_board_leds_init();
uint32_t err_code;
while(true){
for (int i = 0; i < LEDS_NUMBER; i++)
{
NRF_LOG_INFO("%s",nrf_log_push(string_on_stack));
bsp_board_led_invert(i);
nrf_delay_ms(500);
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I have followed the SDK documentation and tutorials trying to troubleshoot the problem without success. I am a beginner so I suspect I am missing something trivial.