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

Printing in Eclipse IDE with GCC

I am using Eclipse IDE with GCC to compile and download to the Nordic DK board. Currently am using Segger RTT viewer to print. However, most of the time it is not able to print everything out. For example, a for loop from 0-31 to print each character in an array, but it is only able to print out certain random array[m] character.

  1. Is there a way to fix it to print out all the elements in an array?

  2. Can I use printf to see the printing in Eclipse IDE instead? If so, how do I do it? I tried printf but nothing is printed out (I think because it runs the jlink debugger, as per the Nordic tutorial on Developement with Eclipse and GCC).

Parents
  • I've run into similar issues when trying to print data in a loop with RTT and the logger library with SDK14 and GCC. I don't have a proper solution, but I was able to make things better by setting NRF_LOG_DEFERRED to 0 in sdk_config.h and putting short nrf_delay_ms(1) calls in my loops. Definitely not ideal, but I only needed to do it in code that won't be running in production, and it got me over a hump, so that's where I settled.

Reply
  • I've run into similar issues when trying to print data in a loop with RTT and the logger library with SDK14 and GCC. I don't have a proper solution, but I was able to make things better by setting NRF_LOG_DEFERRED to 0 in sdk_config.h and putting short nrf_delay_ms(1) calls in my loops. Definitely not ideal, but I only needed to do it in code that won't be running in production, and it got me over a hump, so that's where I settled.

Children
No Data
Related