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

Using J-Link Virtual Com Port on 10028 DK w/ app_trace

I would like to see app_trace_log messages on a terminal window on my PC.

I did the following things:

  1. Added the define ENABLE_DEBUG_LOG_SUPPORT to my project in the C/C++ tab.
  2. Added a call to app_trace_init() in my main where all the other inits are called.
  3. Added the line app_trace_log("Connected\n\r") in the on_ble_evt() function in response to a connect (BLE_GAP_EVT_CONNECTED) event.
  4. I notice that app_trace_log is macro-defined to be replaced by printf.
  5. Rebuilt the project
  6. In J-Link Configurator, I enabled the virtual com port and cycled the power on the PCA10028.
  7. At this point I can see a new com port 3 in the device manager on my Win7 machine with the correct J-Link name.
  8. Fired up a tera term serial session with the following parameters: 38400 baud, 8-bit, no parity, no flow control, 1-bit stop.
  9. Started a debugging session and used nRF MCP to connect to the target.
  10. At this point I can see the connect event arrive and see app_trace_log get called.
  11. Nothing comes out on the terminal, though this might be because I'm single-stepping in the debugger.
  12. Stopped the debugger and reset the PCA10028.
  13. Reconnected to the PCA10028 using nRF MCP.
  14. Nothing comes out on the terminal.

Are there more steps I need to take to get this working?

Related