Menu

#41 Debugging with J-Link

Version 1.x
closed
None
5
2014-03-25
2014-02-27
erikS
No

Hello,
I have some problems in debugging with J-Link. Sometime it works and sometime not.
The first question: is there a manual for the J_link GDB plug-in available? I would be interested to try some settings to make the system more stable. What for example can I enter in the "Type" field which is two time available in the the startup page?

The next question: What is the best place to install a script file for the J_Link device. I would like to have a delay of 100ms between Jtag reset and start of transfers. This is perfect working at my other recent debugging (RDI) solution.

Best regards Erik

Related

Support requests: #41

Discussion

  • Liviu Ionescu (ilg)

    is there a manual for the J_link GDB plug-in available?

    please refer to the pages in the project web; if you have questions not answered there, just let me know and I update the.

    What for example can I enter in the "Type" field

    this is explained in the SEGGER J-Link manual

    What is the best place to install a script file

    you can add any commands either before or after loading the elf, you have two large windows in the interface

    I would like to have a delay of 100ms between Jtag reset and start of transfers.

    generally if you need to insert a delay, there is something wrong.

    if you are debugging complex cores, like Cortex-A, with multi-stage bootloaders, sometimes you can cheat with delays, but they are highly unreliable.

     
  • Liviu Ionescu (ilg)

    • status: open --> accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • erikS

    erikS - 2014-03-01

    Hello, here the log for starting a debug session:
    For me it seems ok. But the what I see the first in the debug perspective
    seems a bit confuse to me. The PC is set correct but I get a empty window
    "no sorce available for 0x0". Normally I would await no to see a little arrow
    pointing to the "Reset_Handler" label.(see attachment)

    SEGGER J-Link GDB Server V4.80g Command Line Version

    JLinkARM.dll V4.80g (DLL compiled Feb 13 2014 20:50:02)

    -----GDB Server start settings-----
    GDBInit file: none
    GDB Server Listening port: 2331
    SWO raw output listening port: 2332
    Terminal I/O port: 2333
    Accept remote connection: localhost only
    Generate logfile: off
    Verify download: on
    Init regs on start: on
    Silent mode: off
    Single run mode: on
    ------J-Link related settings------
    J-Link script: none
    Target interface: JTAG
    Host interface: USB
    Target endian: little
    Target interface speed: 0kHz

    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link ARM V8 compiled Nov 25 2013 19:20:08
    Hardware: V8.00
    SAM-ICE found !
    S/N: 28013812
    OEM: SAM-ICE
    Feature(s): RDI, GDB
    Checking target voltage...
    Target voltage: 3.35 V
    Listening on TCP/IP port 2331
    Connecting to target...
    J-Link found 1 JTAG device, Total IRLen = 4
    JTAG ID: 0x0792603F (ARM9)
    Connected to target
    Waiting for GDB connection...Connected to 127.0.0.1
    Reading all registers
    Read 4 bytes @ address 0x00000000 (Data = 0xE59FF060)
    Target interface speed set to 30 kHz
    Select auto target interface speed (8000 kHz)
    Flash breakpoints disabled
    Downloading 776 bytes @ address 0x00300000 - Verified OK
    Downloading 1068 bytes @ address 0x00300308 - Verified OK
    Writing register (PC = 0x00300284)
    Writing register (CPSR = 0x000000f3)
    Read 4 bytes @ address 0x00300284 (Data = 0x4A074906)
    Read 2 bytes @ address 0x00300286 (Data = 0x4A07)
    Read 2 bytes @ address 0x00300288 (Data = 0x4B07)
    Read 2 bytes @ address 0x0030029A (Data = 0xF000)
    Read 4 bytes @ address 0x00300280 (Data = 0xEAFFFFFE)
    Read 4 bytes @ address 0x00300280 (Data = 0xEAFFFFFE)
    Read 4 bytes @ address 0x00300280 (Data = 0xEAFFFFFE)
    Read 4 bytes @ address 0x00300280 (Data = 0xEAFFFFFE)
    Read 4 bytes @ address 0x00300280 (Data = 0xEAFFFFFE)
    Read 4 bytes @ address 0x00300280 (Data = 0xEAFFFFFE)

     
  • Liviu Ionescu (ilg)

    I'm not used to your configuration, are you trying to run something from RAM? If so, you need to disable the pre-run reset.

     
  • Liviu Ionescu (ilg)

    did you fix the problem?

     
  • erikS

    erikS - 2014-03-04

    More or less. The little problem what I have found was the following. In the startup tab of the plugin is a continue checkbox. If this checkbox is unchecked the image will be load in the target and the 0x0 " no source available" windows is poping up. In this moment the state seems not corect. But if I press only one time F6(step) I see a correct picture with the little arrow at the correct position. With checked continue checkbox this very first incorrect state is invisible. I now can good live with this behaivor.

     
  • Liviu Ionescu (ilg)

    sorry, but I can not follow you and can not reproduce the problem.

    debugging arm9 cores is tricky, and, since you probably run in ram, mandates to disable the secondary reset.

     
  • erikS

    erikS - 2014-03-18

    What I have done is the first time. Manually reset the board and worked with none of the both resets. This was working fine. With the first reset set it was not working. Then I wrote a script which overwrite the initTarget procedure of jlink. Simple manually reset the both lines NRST and NTRST for 10ms. So I work wiht this script and none of the resets and be happy.

     
  • Liviu Ionescu (ilg)

    ok, glad you found a solution.

    is there any open issue? or we can close this ticket?

     
  • erikS

    erikS - 2014-03-18

    OK,close it.

     
  • Liviu Ionescu (ilg)

    • status: accepted --> closed
     
  • Liviu Ionescu (ilg)

    I forgot to tell you, the new beta version sets the CWD to the project folder, so if you put a custom script in the project, you should be able to point gdb to it with a portable relative path.

     
    • erikS

      erikS - 2014-03-25

      what do you mean with this? What I do is set the path under Debugger Tab
      -> Other Options -> -s -scriptfile C:/Scripts/myJLinkScript
      This path is not a gdb path but a jlink path. Do you mean I could save
      the absolute path in any way. That would be nice.

      Am 18.03.2014 13:32, schrieb Liviu Ionescu (ilg):

      I forgot to tell you, the new beta version sets the CWD to the project
      folder, so if you put a custom script in the project, you should be
      able to point gdb to it with a portable relative path.


      [support-requests:#41]
      http://sourceforge.net/p/gnuarmeclipse/support-requests/41/
      Debugging with J-Link

      Status: closed
      Group: Version 1.x
      Created: Thu Feb 27, 2014 04:38 PM UTC by erikS
      Last Updated: Tue Mar 18, 2014 12:30 PM UTC
      Owner: Liviu Ionescu (ilg)

      Hello,
      I have some problems in debugging with J-Link. Sometime it works and
      sometime not.
      The first question: is there a manual for the J_link GDB plug-in
      available? I would be interested to try some settings to make the
      system more stable. What for example can I enter in the "Type" field
      which is two time available in the the startup page?

      The next question: What is the best place to install a script file for
      the J_Link device. I would like to have a delay of 100ms between Jtag
      reset and start of transfers. This is perfect working at my other
      recent debugging (RDI) solution.

      Best regards Erik


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnuarmeclipse/support-requests/41/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support requests: #41

      • Liviu Ionescu (ilg)

        Other Options -> -s -scriptfile C:/Scripts/myJLinkScript

        if the script is located in the project, you can specify it with a relative name.

        if the script is located outside Eclipse, define a substitution variable to the path and specify the relative name to it.

        these aspects are very important if you set the debug configuration to be stored in the project, and you want to share the project with someone else.

         
  • Liviu Ionescu (ilg)

    Erik, please do not reply to the email notifications, use the web page