[ABANDONED] emIde + Jlink not halting on breakpoints

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

  • [ABANDONED] emIde + Jlink not halting on breakpoints

    Hi, I'm debugging the CC2538 olatform using emIDe with JLinkGdbServer + JLink EDU probe.

    I can stop the execution and see CPU registers and memory without problems, but the cpu is never halted when it reaches any of the breakpoints I set on emIDE.

    Im using the latest verions of emIDE (2.20) and Jlink (5.12i).

    Am I doing something wrong setting breakpoints on emIDE or is it another problem?

    Should I define the breakpoints somehow differently?

    Nelo Huerta.
  • Hi Nelo,

    Should I define the breakpoints somehow differently?

    No, you are doing it the right way.
    Could you provide me with your emIDE project for reproduction purposes? (most convenient way: .zip the folder containing the .emp file and upload it here in the forum)

    Best regards,
    Niklas
    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.
  • Hi Nelo,

    The Contiki 3.0 src i downloaded did not really fit the project.
    However, during Testing emIDE recognized that the device was halted on a breakpoint and also indicated the "correct" current line in src.

    If you open the J-Link control panel (green J-Link icon in the tray area of the taskbar, next to the clock) and open the tab "Breakpoints" during a debug session, are there breakpoints present?
    Could you try manually setting a breakpoint via right click in the Breakpoint view?

    Best regards,
    Niklas
    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.
  • Well my Contiki system is a bit tuned so ofc it shouldnt work off the shelf but it is nice that you could at least execute it.
    In the control panel in the Breakpoints tab I see no breakpoints. If I set a breakpoint manually setting the address the GDB Server indicates when I place it in src, nothing happens, the system is not halted but if I break the debugger from emIDE I see the program is obviously passing through it.

    Thanks for your time

    Nelo Huerta
  • Hi Nelo,

    (I assume you can not or do not want to send me the complete source.)

    Can you try to create a stripped down version of the project which can also used to reproduce the issue?
    Preferably just a main.c with some simple loops etc.
    If the issue can be reproduced with the simple project, you can provide us with the complete project so that we can find and fix the issue.

    Best regards,
    Niklas
    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 guess Im doing something wrong when setting breakpoints from the J-link Control panel.

    This is the log from the GDB server when I toogle a breakpoint IN THE SAME code line in src:

    Debugger requested to halt target...
    ...Target halted (PC = 0x00200506)
    Reading all registers
    Read 4 bytes @ address 0x00200506 (Data = 0xFEB5F001)
    Starting target CPU...
    Debugger requested to halt target...
    ...Target halted (PC = 0x00202278)
    Reading all registers
    Read 4 bytes @ address 0x00202278 (Data = 0x782B4D2B)
    Starting target CPU...
    Debugger requested to halt target...
    ...Target halted (PC = 0x0020050A)
    Reading all registers
    Read 4 bytes @ address 0x0020050A (Data = 0x2861E7FA)
    Starting target CPU...
    Debugger requested to halt target...
    ...Target halted (PC = 0x00202282)
    Reading all registers
    Read 4 bytes @ address 0x00202282 (Data = 0x78334E2A)
    Read 4 bytes @ address 0x00202282 (Data = 0x78334E2A)
    Starting target CPU...

    I was assuming the read address was the one I had to add into the Control Panel - >Set Code Breakpoint, but this address as can be seen in the log is changing everytime I toogle the breakpoint, so I dont even know how to set a breakpoint corresponding with a point in my code.

    Still don't know why the breakpoints in emIDE are not halting the debugger, I guess I'm missing something
  • Hi,

    regarding the project size, i see 4 options:

    1) Try to reproduce the issue with a small project
    2) Compress the project as much as possible (7z-Ultra-LZMA2-256MB-273) , split it and upload it in 1MB parts (1 click with 7z)
    3) Upload it somewhere else (dropbox etc) and provide us with a Link

    4) I can ask our admin department if they can provide you with a temporary ftp account, but this usually takes same time.

    Best regards,
    Niklas
    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.
  • Hi,


    thanks for providing the project.
    Unfortunately, neither does the source files suit the binary nor can I rebuild the binary.
    The Makefile seems to be incomplete. What did you use to build the project?


    Best regards,
    Niklas
    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.
  • Hi again,
    when I download and extract the zip I can compile the project.
    Contiki uses its own build system composed by several chained makefiles.
    In order to compile a Contiki system on windows it is necessary to use the make.exe from Cygwin, maybe that's the problem.

    Maybe I should test a non Contiki project, but we bought the J-Link to debug our Contiki projects.
  • Hi Nelo,


    Maybe I should test a non Contiki project, but we bought the J-Link to debug our Contiki projects.

    I would also suggest to test it with a simple project. This will make it simpler to locate the cause of this issue.

    Best regards,
    Niklas
    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.