I am trying to get Trace information recorded with an Ozone project running on a GigaDevice GD32F303ZK MCU using a J-Trace Pro Cortex-M (S/N: 752001773). However when I try to look at the instruction Trace window data, all it shows is "No Data".
I have successfully performed the "Ozone — Trace Tutorial" from Segger's website using that J-Trace unit and the Segger Cortex-M Trace Reference Board V1.2, so the J-Trace and Ozone installation check out OK. Also, general debugging (stepping, breakpoints, looking at data, etc) all works fine with either JTAG or SWD configured.
So I'm wondering if there's an initialization step I haven't set up or configured correctly. I'd like to eliminate that possibility before I go to the EE about a possible problem on the board (this is the first time we have tried to get trace data from this project).
The reference manual for the somewhat similar STM32F103ZE chip says this about the trace pins:
(I don't see anything similar mentioned in the GD32F303ZK reference, but I think the GD32 behavior for the trace pin initialization is likely to be the same as the STM32).
The only thing I see in the Trace Reference board's project about initializing trace is a line in the .jdebug project file, "Project.SetTraceSource ("Trace Pins");", and I have that same line in the project file for my GD32 board.
Is there some initialization I'm neglecting that will enable the Trace Data?
This is what is displayed in the Ozone Console window:
Display All
Thanks for any suggestions.
I have successfully performed the "Ozone — Trace Tutorial" from Segger's website using that J-Trace unit and the Segger Cortex-M Trace Reference Board V1.2, so the J-Trace and Ozone installation check out OK. Also, general debugging (stepping, breakpoints, looking at data, etc) all works fine with either JTAG or SWD configured.
So I'm wondering if there's an initialization step I haven't set up or configured correctly. I'd like to eliminate that possibility before I go to the EE about a possible problem on the board (this is the first time we have tried to get trace data from this project).
The reference manual for the somewhat similar STM32F103ZE chip says this about the trace pins:
By default, these pins are NOT assigned. They can be assigned by setting the TRACE_IOEN and TRACE_MODE bits in the MCU Debug component configuration register. This configuration has to be done by the debugger host.
(I don't see anything similar mentioned in the GD32F303ZK reference, but I think the GD32 behavior for the trace pin initialization is likely to be the same as the STM32).
The only thing I see in the Trace Reference board's project about initializing trace is a line in the .jdebug project file, "Project.SetTraceSource ("Trace Pins");", and I have that same line in the project file for my GD32 board.
Is there some initialization I'm neglecting that will enable the Trace Data?
This is what is displayed in the Ozone Console window:
Source Code
- Debug.Start();
- Device "GD32F303ZK" selected.
- TotalIRLen = 9, IRPrint = 0x0011
- JTAG chain detection found 2 devices:
- #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP
- #1 Id: 0x790007A3, IRLen: 05, Unknown device
- DPv0 detected
- Scanning AP map to find all available APs
- AP[1]: Stopped AP scan as end of AP map has been reached
- AP[0]: AHB-AP (IDR: 0x24770011)
- Iterating through AP map to find AHB-AP to use
- AP[0]: Core found
- AP[0]: AHB-AP ROM base: 0xE00FF000
- CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
- Found Cortex-M4 r0p1, Little endian.
- FPUnit: 6 code (BP) slots and 2 literal slots
- CoreSight components:
- ROMTbl[0] @ E00FF000
- [0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
- [0][1]: E0001000 CID B105E00D PID 003BB002 DWT
- [0][2]: E0002000 CID B105E00D PID 002BB003 FPB
- [0][3]: E0000000 CID B105E00D PID 003BB001 ITM
- [0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
- [0][5]: E0041000 CID 00000000 PID 00000000 ???
- Connected to target device.
- Reset: Halt core after reset via DEMCR.VC_CORERESET.
- Reset: Reset device via AIRCR.SYSRESETREQ.
- Elf.GetBaseAddr(); // returns 0x8041800
- Target.ReadU32 (0x08041800); // returns 0x4, data is 0x20000530
- Target.SetReg ("SP", 0x20000530);
- Elf.GetEntryPointPC(); // returns 0x80774B4
- Target.SetReg ("PC", 0x80774B4);
- J-Link: Flash download: Bank 0 @ 0x08000000: Skipped. Contents already match
- Elf.GetBaseAddr(); // returns 0x8041800
- Target.ReadU32 (0x08041800); // returns 0x4, data is 0x20000530
- Target.SetReg ("SP", 0x20000530);
- Elf.GetEntryPointPC(); // returns 0x80774B4
- Target.SetReg ("PC", 0x80774B4);
- Executed J-Link command "SelectTraceSource=1"
- Startup complete (PC=0x08076DEA)
- Debug.Continue();
Thanks for any suggestions.