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

Do I need to buy a Segger external debugger to get debug trace in Segger embedded studio?

Hello Nordic,

I hope you can help me. I'm using an NRF52840 DK development board. 

I followed the instructions on this video to enable debug trace in Segger embedded studio (https://www.youtube.com/watch?v=uP8RYgYGRvI)

When I debug I do not see any trace output. My build configuration is set to debug. 

I googled and found this page (https://devzone.nordicsemi.com/nordic/b/blog/posts/debugging-nrf52-series-devices-using-trace) which says

  • IMPORTANT: To use trace you need to have an external debugger that supports trace (trace won't work using the on-board debugger on our development kits). www.segger.com/jlink-debug-probes.html (see debug probes with built-in trace memory). IAR and ULink also offer debuggers that support trace and work with our devices.

The Segger debug probes are over $500.

I then found this page (https://devzone.nordicsemi.com/nordic/b/blog/posts/programming-and-debugging-custom-nrf5x-devices) which says 

  • When developing applications on a nRF5x Development Kit, you can program it by simply connecting it to your PC with a USB cable. This is possible because the Development Kit has an on-board debug unit supporting the JLINK debug interface.

I do not understand what I need to do to get debug trace in Segger embedded studio. 

My sdk_config.h has 

  • #define NRF_LOG_BACKEND_RTT_ENABLED 1
  • #define NRF_LOG_ENABLED 1

Thanks for your help,

-Jason

Parents
  • Yes if you want to use actual trace you need a Segger external debugger which supports trace. Trace uses a separate set of lines from the ARM microprocessor. Not many people actually need to use trace however. 

     Your second quote has nothing to do with the first, note that doesn't even mention 'trace'. You can program it using the onboard JLink just as it says you can but the onboard debugger does not support the trace outputs just as your first quote says. 

    None of that has anything at all to do with what you have enabled in your sdk_config.h, RTT, which is Real Time Terminal which allows a log output via any JLink device which then appears in the terminal pane of SES. It doesn't use the trace pins, it has nothing to do with trace. This is probably what you actually wanted in the first place, just use the logging macros with those defines enabled and the log will go to SES. 

Reply
  • Yes if you want to use actual trace you need a Segger external debugger which supports trace. Trace uses a separate set of lines from the ARM microprocessor. Not many people actually need to use trace however. 

     Your second quote has nothing to do with the first, note that doesn't even mention 'trace'. You can program it using the onboard JLink just as it says you can but the onboard debugger does not support the trace outputs just as your first quote says. 

    None of that has anything at all to do with what you have enabled in your sdk_config.h, RTT, which is Real Time Terminal which allows a log output via any JLink device which then appears in the terminal pane of SES. It doesn't use the trace pins, it has nothing to do with trace. This is probably what you actually wanted in the first place, just use the logging macros with those defines enabled and the log will go to SES. 

Children
Related