Hello,
I can compile, flash and debug code for a GigaDevice GD32E505. Debug Probe is a ULINK Pro.
Now I want to use debug output via ITM. As soon as I enable the checkbox for "Trace Enable" I can't start the debugger anymore. Instead I get a Error Message:
ULINKpro - ARMv8-M ErrorCannot access Memory (@ 0xe0040010, Write, Acc Sice: 4 Byte)
I assume µVision tries to send configuration bytes to the target to enable the ITM debug output.
If I try to start the debugger a second time (without reset of the target) I get:
ULINKpro - ARMv8-M ErrorDevice could not be powered up
I assume with the first attempt the CPU crashed, and with the second attempt the target did not respond any more at all.
Maybe this is a CortexM33-specific problem and some setup code is required before µVision can send these configuration bytes?
Does anyone have in idea what else I could try?
generally speaking, only enable the option "Trace Enable" in Options for Target - Debug - Settings - Trace is not sufficient to really enable the trace on your target device. Enabling SWO or ETM trace usually involves initialization of trace pins, trace clock or changes on the DBGMCU_CR register etc.
This is usually done by a debug ini script or by the Debug Description feature built in the pdsc file of your DFP pack, as described in the 2.a and 2.b of
https://www.keil.com/support/man/docs/ulinkpro/ulinkpro_ctx_trace.htm
On the other hand, enabling "Options for Target - Debug - Settings - Log Debug Accesses" will generate an ULINKpro access log file, which will help you for the debug access issue.
Related:
"Trace Data Not Synchronized"
https://www.keil.com/support/man/docs/ulinkpro/ulinkpro_desynctracedata.htm
"Log Debug Accesses"
https://www.keil.com/support/man/docs/ulinkpro/ulinkpro_ctx_debug.htm