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

printf (App trace) not outputting to uart

Hi all,

I am having a bit of a problem with the printf. I could not figure out what could be the problem. From what I search people seem to be getting it working with out any problem.

I am using the SDK 6.1 and using it on kepler eclipse. I set up everything correctly and trying to run the blue_app_hrs_c example from nrf6300 on a PCA10001 board. I have everything compiled and running on the board.

In this example, the program is using app_trace.h for logging of what is happening. This in turn uses printf to output everything. I added ENABLE_DEBUG_LOG_SUPPORT to the define list. So that will include the functions. I added a log at the beginning and added a uart command afterward.

APPL_LOG("Start Scaning");
simple_uart_putstring((const uint8_t *)" \n\rStart: ");

APPL_LOG is defined as app_trace_log which is then define as printf.

When I run the program the first message does not show up but the second one show up on the terminal. This makes me believe that the uart port is configured.

I looked at this post: here

which gave an example of retarget. This seem to be the same as app_trace.c & .h.
I tried using that one on the blue_app_hrs example and it still does not work. Same problem.

Any idea what to do next to get this working?

Thank you

Related