Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How do I print to USB port (NRF52 DK)?

I've seen variations on this question, but never quite been able to decipher a complete answer:

I've built an app for the NRF52DK based on the nRF5_SDK_15.0.0 "Hello World" example.

In the app, `printf()` prints on the Segger IDE console (which is pretty nifty!) and `NRF_LOG_INFO()` prints on the USB port.  I'm able to read the USB data using `screen /dev/cu.usbmodem1411 115200`, but of course each line of text has the logging preamble on it, such as:

   <info> app: 54397, 9896014

I'd like to print CSV-formatted data to the USB port without the logging preamble, e.g.:

   54397, 9896014

So my question: How do I configure the app so `printf()` prints to the USB port rather than to the Segger IDE console?  Or is there some other approach that will let me print formatted text without the logging preamble to the USB port?

Parents Reply Children
Related