Target doesn't halt

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

  • Target doesn't halt

    Hi,
    I have a i.MX53QSB. I am using JLINK's EDU version to connect to it. I am using the Linux version of the gdb server (V4.4a)

    Following is my question:
    My gdbinit file first connects to the target and then tries to reset it to put in a known state.
    eg. .gdbinit
    set remotetimeout 5
    target remote localhost:2331
    monitor reset

    The last command should reset the board and halt it at the first instruction (if my understanding is correct). Instead the JLinkGDBServer gives out the following warnings:

    WARNING: CPU not halted after Reset, halting using Halt request
    WARNING: CPU could not be halted

    The board continues to boot without halting.

    Where do I look for the problem?
  • Hi,

    Yes, the i.MX53 was also tested when implementing Cortex-A8 support.
    Out of the head I see two reasons why the reset could fail like this:

    a) The reset pin available to J-Link (on pin 15 of the JTAG connector) is NOT wired to the reset pin of the CPU. So J-Link is unable to perform a reset.
    b) Toggling the reset pin also resets the debug logic (this is not intended but the case on some board designs) which makes it impossible to halt the CPU immediately after reset.

    Could you let me know the exact eval board you are using (maybe also posting a link to it)?


    Best regards
    Alex
    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.
  • Update:
    Looking at the Schematic from MCIMX53QSBRM (The Hardware Reference manual for I.MX53QSB) - Page 105, I see that the JTAG_nSRST pin is connected to the RESET (bar on top) pin of the CPU. So (1) is definitely not the case.

    I have contacted a FreeScale rep to ask about whether SRST is connected to TRST internally. I'll update this thread as soon as I know more.

    Thanks,
    Jitesh
  • Hi Jitesh,
    We have tried to reproduce this here with the following setup:
    • J-Link GDB Server
    • GNU GDB 7.3.1
    • J-Link EDU
    • i.MX535 QuickStart Board with a PCIMX535DVV1B on it (Cortex-A8)
    We do not see any problem here, see attached pictures.


    Best regards

    Erik
    Images
    • gdb_server.gif

      13.04 kB, 668×331, viewed 1,378 times
    • JLink_gdb_server.gif

      17.48 kB, 710×527, viewed 1,404 times
    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.
  • I tried to reproduce your setup on the Linux version of the package I have. Didn't work.
    So, I switched to windows and was able to reset the board with it halting on the first instruction. Thanks for that.

    However, I have hit another roadblock. When I set a Hardware Breakpoint to an address, the board hits the breakpoint (I know the board is halted on the breakpoint because it turns unresponsive). However, the GDBserver doesn't catch this halt. It still report the target as running.

    Please see attached screenshots.

    GDBClient.jpg: It shows that I set the breakpoint at the first instruction of the Linux Kernel ("monitor setbp 0x70008000"). The board is then restarted via "monitor go" and the kernel starts to boot.
    SerialTerminal.jpg: It shows the kernel has halted at the appropriate breakpoint.
    GDBServer.jpg: At this point, note that the server still reports the target as "Running".

    Dumping registers at this point via "gdb> monitor regs" yeilds garbage values for registers. I suspect the JLINK connection is lost?


    This same thing happens even when the breakpoint is set to a uboot address, so the kernel shouldn't be at fault here.
    It would probably be easier for you to reproduce this once, since we have a similar environment now. Let me know whether it is reproducible.

    Thanks,
    Jitesh
    Images
    • GDBClient.jpg

      181.69 kB, 676×1,050, viewed 1,064 times
    • GDBServer.jpg

      63.07 kB, 550×405, viewed 1,131 times
    • SerialTerminal.jpg

      91.01 kB, 821×480, viewed 1,199 times
  • Hi Jitesh,

    We need to take a look at this.
    Please understand that we can not give this highest priority since:
    a) There are currently some high priority projects that need to be finished first
    b) This is not a support forum


    Best regards
    Alex
    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.