[SOLVED] J-Link Debug Fails

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

  • [SOLVED] J-Link Debug Fails

    Folks,

    I am unable to use the Segger Jlink V9.3 to debug my embedded C code. I am able to program my MCU but when it tries to debug the Jlink crashes and MCU does not get properly restarted. I have tried two different J-links and both fail. I have used this setup for years and have not experienced this problem before. I even tried to back out the recent code that I added but the problem persists. I have been doing updates on this particular PCB for more than 4 days without any trouble. I do not have another board to try, no.

    Any ideas what is happening? The Segger JLink debugger is a key piece of equipment in my development toolkit.

    Thank you.

    Phil

    ----

    Here is the console error I am seeing:

    Source Code

    1. A problem internal to GDB has been detected,
    2. further debugging may prove unreliable.
    3. Quit this debugging session? (y or n) [answered Y; input not from terminal]
    4. /home/build/work/GCC-4-8-build/src/gdb/gdb/linespec.c:2445: internal-error: decode_line_full: Assertion `state->canonical_names[i].suffix != NULL' failed.
    5. A problem internal to GDB has been detected,
    6. further debugging may prove unreliable.
    7. Create a core file of GDB? (y or n) [answered Y; input not from terminal]
    Display All
  • Hi,
    Thank you for your inquiry.
    There is no such issue known to us.

    At first glance, this does not necessarily look like a J-Link related issue.

    What Device are you trying to debug exactly?
    Could you please send us a J-Link log file? How to enable:
    wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File
    Could you please provide us with step-by-step instructions on how to reproduce this issue?

    Best regards,
    Fabian
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.
  • Fabian,

    Thank you for your kind reply.

    Attached is the log file, per your request.

    I am using the Jlink within the Eclipse-based NXP Kinetis Design Studio, Version: 3.2.0. I use it to program NXP/Freescale Kinetis MCUs. I am connected with a 10-pin JTAG header. The Jlink is able to program the MCU without any problems but will not enter debug mode after programming.

    Regards,

    Phil
    Files
    • debug_jlink.log

      (265.4 kB, downloaded 50 times, last: )
  • Hi,
    From the logfile I can tell that you are using J-Link software that is actually pretty old.
    Could you please update the J-Link Software?
    You can find the latest version of the J-Link Software Pack here:
    segger.com/downloads/jlink#J-L…twareAndDocumentationPack

    By default, the J-Link DLL Updater is automatically executed at the end of the installation process.
    After the J-Link DLL Updater closes without warning, the J-Link files should be up to date.

    Does it work after the update?

    Best regards,
    Fabian
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.
  • Fabian,

    Unfortunately, no difference. I have attached an updated log file using the new drivers.

    Let me know if there is anything else I can do to track down this problem. For example, should I entirely remove the drivers and reinstall?

    Thank you, Fabian.

    Phil
    Files
    • debug_jlink.log

      (298.19 kB, downloaded 49 times, last: )
  • Fabian,

    I am trying to program a NXP/Freescale MK64FX512VLL12, Cortex M4, using KDS (Kinetis Design Studio, V3.2.0).

    I have used these Jlink debuggers for years with this IDE for years. BTW, this happens with two separate Jlink debuggers.

    Regards,

    Phil
  • Hello,

    I still not understand what exactly you expect from us (SEGGER).
    Following your description, you are using the Kinetis Design Studio (KDS) in the following combination:

    KDS -> GDB <-TCP/IP-> GDBServer -> J-Link

    KDS: Component from NXP
    GDB: Component from NXP or 3rd party
    GDBServer: Component from SEGGER
    J-Link: Component from SEGGER

    The J-Link log file is not indicating any error. GDB just closes the connection to GDBServer at some point.
    In your original post, you posted the following error:

    ph99004 wrote:


    Source Code

    1. A problem internal to GDB has been detected,
    2. further debugging may prove unreliable.
    3. [...]

    As GDB and GDBServer are separate processes, once cannot crash the other by buffer overflows or similar.
    As the message indicates, there happened something GDB internal that made GDB half-way crashing.
    So this is more a question for NXP than SEGGER.
    From the further log output of GDB I would say that the error happened when GDB tried to parse the debug info for:

    /home/build/work/GCC-4-8-build/src/gdb/gdb/linespec.c:2445: internal-error: decode_line_full: Assertion `state->canonical_names.suffix != NULL' failed.
  • Alex,

    Thank you. I am just looking for a resolution.

    The JLink is connected to the host pc via USB and not TCP/IP. The system works fine while in the programming stage but fails during debug stage.

    Regards,

    Phil
  • Hi Phil,

    USB:
    J-Link might be connected via USB but GDB and GDBServer communicate via TCP/IP with each other.

    Again: It is a problem in GDB. GDB is used by KDS to load the ELF file (your target application) and to interpret the debug information. During that interpretation, something goes wrong on the GDB side that causes it to half-way crash and being left in an unusable state.

    So if you are looking for a solution:
    It is still no SEGGER problem. You still need to get in touch with NXP regarding this, as they provide the GDB component with KDS.
    We cannot help with KDS here.

    All I can do is showing you an alternative:
    You can use KDS for building your project, but SEGGER Ozone for download & debug:
    segger.com/products/development-tools/ozone-j-link-debugger/
  • Hi Phil,

    Good to hear that you are up and running again.

    As this issue is resolved we will close this thread now.

    Best regards,
    Fabian
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.