[SOLVED] Instruction Trace window only displays "No Data"

  • 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:

    Quote

    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:


    Thanks for any suggestions.

  • Hello,

    Thank you for your inquiry.
    The behaviour is expected. The GD32F3 series does not have an ETM so the chip does not provide trace support.
    Quote from GigaDevice when we ran into a similar issue with the GD32F4 series:
    " Only the GD32F10x (HD, XD, CL lines) and GD32F20x include ETM function."

    Other Arm trace types are also not available.
    You could take a look at software tracing maybe:
    https://wiki.segger.com/General_inform…are_trace_types

    Best regards,
    Nino

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • The GD32F3 series does not have an ETM so the chip does not provide trace support


    Well I'll be damned. That's disappointing to say the least. The board started out with an STM32F103 design, then briefly moved to a GD32F103ZK design, then to the GD32F303ZK. I never noticed the ETM disappearing from the datasheet.

    Thanks for quickly setting me straight.

    The GD32F303xx datasheet does mention the Cortex-M4 on it does support these things:

    • Instrument Trace Macrocell (ITM)
    • Trace Port Interface Unit (TPIU)

    Do either of them provide anything like even a minimal trace capability that the J-Trace can use to some advantage? (I'm asking before I've even started researching what those things are, but I'd appreciate any pointers that might save me from wasting my time in a rabbit hole).

  • Hello,

    Technically SWO trace would be possible via ITM/TPIU (see linked Wiki article). However the datasheet does not mention any SWO pins.
    I recommend to contact Gigadevice Support as we have no additional information if SWO is available or not.

    If not, the only thing remaining is software tracing.

    Best regards,
    Nino

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!