I am using nrf51 SDK v.12.1.
And I found NRF_LOG_INFO("BLINKY START\n");
where can I find this log?
Is this different from SEEGER_WriteString or something?
The output from NRF_LOG_xxx can be displayed in a terminal (if logging over UART) or in the J-link RTT viewer (logging over RTT).
The sdk_config.h file --> configuration wizard can be used to choose logging over UART or RTT.
As you can see in nrf_log_backend_serial.c, logging over RTT uses SEGGER_RTT_xxx functions.
Update: Use the configuration wizard tab in sdk_config.h to enable RTT and/or UART logging:
Thank u~ :^)
Im sorry but I have one more question. If I want to use RTT for debugging, how can configure sdk_config.h. And when I use RTT viewer, it doensn't show the result dynamically (for example, printing some string every second). Does RTT viewer work only when the program is loaded on the board?
The updated answer shows how to configure the sdk_config.h file to use the logging module. The RTT viewer should update real time, not only when the firmware is loaded..
I tried as you said, but it says error : ._build\nrf51422_xxac.axf: error: L6050U: The code size of this image (33560 bytes) exceeds the maximum allowed for this version of the linker. What is this problem?