Transfer variables through SWD with Segger J-Trace without using SWO interface

debuggingmicrocontroller

I have a Cortex-M0 NXP LPC1114 custom board connected to the debugger J-Trace for Cortex-M from Segger.

The Cortex-M0 is a very limited MCU (and cheap!) and doesn't have a SWO port so I cannot use the very useful printf SWO redirection.

I need to transfer a global variable value from a debugging/running firmware to the computer and access this value in a software developed in C#, using only J-Trace comunications. I cannot use the Cortex-M0 UART since it's being used with another peripheral.

Is it possible to transfer variables values through J-Trace and capture those values and use them?

Link to the LPC1114 datasheet.

Link to the LPC1114 user's manual.

Best Answer

If you take a look at the device manual Chapter 27 (page 451) you will see that this device supports SWD ( Serial Wire Debug ) which is a 2-wire alternative of a JTAG interface. Using this interface you can access all memories, registers and peripherals of the target. I recommend that you look after OpenOCD application and GDB debugging. To have an idea of what I'm talking about I found this link that can give you a head start.