[SOLVED] Bad JTAG comm followed by total SoC reset while stepping, on JLink 6.34b

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Bad JTAG comm followed by total SoC reset while stepping, on JLink 6.34b

    Target: M4, SoC iMX7D

    V6.34b I can get the target hard locked followed by JLink resetting entire SoC ..
    Exact steps I'm not sure of, but it's single stepping a piece of code.


    When stepping, suddenly I get many cannot access memory ... errors. After which I have to kill my JLinkGDBServer.
    A subsequent attempt to re-connect to target leads to JLinExe or GDBServer giving error:

    ****** Error: Bad JTAG communication: Write to IR: Expected 0x1, got 0xf (TAP Command : 10) @ Off 0x5.
    Could not find core in Coresight setup

    ..

    This is followed then by full SoC reset (duuh!!), while JLinkExe exits with :
    Cannot connect to target.

    Immediate re-connect attempt after SoC reset works, but .. This is annoying as my whole system is dead and need full reboot of cores.



    :thumbdown:

    The post was edited 1 time, last by v01d ().

  • So the output from SeggerGDBServer when it happens

    Reading all registers
    Performing single step...
    ERROR: Could not read FreeRTOS thread count from target.
    Reading all registers
    Read 4 bytes @ address 0x202122D0 (Data = 0x00000000)
    Removing breakpoint @ address 0x202104CC, Size = 2
    Removing breakpoint @ address 0x2021229A, Size = 2
    Reading 64 bytes @ address 0x20007FC0

    WARNING: Failed to read memory @ address 0x00000000 <-------- I don't know why it's reading at this address, it's outside of scope of the firmware ...
    Reading 12 bytes @ address 0x00000000
    WARNING: Failed to read memory @ address 0x00000000
    WARNING: Failed to read memory @ address 0x00000000
    Reading 20 bytes @ address 0x1FFF83FC
    WARNING: Failed to read memory @ address 0x1FFF83FC
    Reading 156 bytes @ address 0x1FFF8414
    WARNING: Failed to read memory @ address 0x1FFF8414
    Reading 348 bytes @ address 0x1FFF84B4
    WARNING: Failed to read memory @ address 0x1FFF84B4
    WARNING: Failed to read memory @ address 0x00000000
    WARNING: Failed to read memory @ address 0x00000000
    WARNING: Failed to read memory @ address 0x00000000
    Reading 64 bytes @ address 0x202122C0
    Reading 64 bytes @ address 0x20212300
    Reading 64 bytes @ address 0x20212340
    Reading 64 bytes @ address 0x202104C0
    Reading 64 bytes @ address 0x20210480
    Reading 64 bytes @ address 0x20210440
    Reading 64 bytes @ address 0x20212280
    Reading 64 bytes @ address 0x20212240

    Setting breakpoint @ address 0x202104CC, Size = 2, BPHandle = 0x0000 And it's gone somewhere here, with not return. Dunno which breakpoints are being set, as I only have 2 ... So which bkpt resources have ran out?
    WARNING: No more breakpoint resources left
    ERROR: Failed to set breakpoint at 0x202104CC
    Setting breakpoint @ address 0x2021229A, Size = 2, BPHandle = 0x0000
    WARNING: No more breakpoint resources left
    ERROR: Failed to set breakpoint at 0x2021229A
    <--- huh? that was my first bkpt it hit to begin with .. Anyway, abort from here as it's not moving

    Only 2 breakpoints I have set (one temporary), so I don't quite understand what breakpoints it's ran out of .. :
    Num Type Disp Enb Address What
    2 breakpoint keep y 0x2021229a in main() at xxxx main.cpp:26
    breakpoint already hit 2 times
  • Hello,

    Thank you for your inquiry.
    What GDBClient are you using in your setup?
    Keep in mind that all memory ready, breakpoints etc. will be issued by the Client and not GDBServer. GDBServer is only forwarding what the Client is asking and J-Link is executing exactly that.
    Depending on how efficiently the Client handles BPs it is possible that they get used in the background for other "features".
    We suggest getting in contact with the GDB Client support.

    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: segger.com/ticket/

    Or you can contact us via e-mail.
  • SEGGER - Nino wrote:

    Hello,
    ...
    Keep in mind that all memory ready, breakpoints etc. ..
    We suggest getting in contact with the GDB Client support.
    ....
    Best regards,
    Nino

    Hi Nino,

    Please help me out :
    How many 'hardware' breakpoints are supported with JLink Plus for the target (iMX7) ?
    How many with JTrace Pro Cortex?

    Why do I get those Warnings : "WARNING: No more breakpoint resources left" ? Is this trace about un-available hardware breakpoints?
    All I had set through gdb was soft ones, and those should be unlimited with JLink (as far as i know.. .)

    How can I get a list of currently used/available hardware breakpoints with Jlink? (Not Gdb )
  • Hello,

    v01d wrote:

    How many 'hardware' breakpoints are supported with JLink Plus for the target (iMX7) ?
    How many with JTrace Pro Cortex?
    As many as the specific core architecture/CPU implementation allows. For more information consult the CPUs user guide or the CPU vendor.

    v01d wrote:

    Why do I get those Warnings : "WARNING: No more breakpoint resources left" ? Is this trace about un-available hardware breakpoints?
    For some reason J-Link can't set a BP at that address. One reason could be that no HW BPs are remaining or the memory can't be accessed at thgt time. In what kind of memory are you trying to set the BP?
    More information about unlimited BP can be found on our website or in the J-Link user guide: segger.com/products/debug-prob…nology/flash-breakpoints/


    v01d wrote:

    How can I get a list of currently used/available hardware breakpoints with Jlink? (Not Gdb )
    J-Link Control Panel->Breakpoints, the control can be accessed with either Ozone or Embedded Studio under "view".

    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: segger.com/ticket/

    Or you can contact us via e-mail.