[SOLVED] JLinkGDBServer - how to set target mcpu?

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

  • [SOLVED] JLinkGDBServer - how to set target mcpu?

    I am trying to debug my LPC4088 Quick start board from Embedded artists on my Linux Debian workstation using GDB.
    But when in terminal I start command JLinkGDBServer I get this:

    Source Code

    1. SEGGER J-Link GDB Server V6.30a Command Line Version
    2. JLinkARM.dll V6.30a (DLL compiled Jan 31 2018 18:14:14)
    3. -----GDB Server start settings-----GDBInit file: noneGDB Server Listening port: 2331SWO raw output listening port: 2332Terminal I/O port: 2333Accept remote connection: yesGenerate logfile: offVerify download: offInit regs on start: offSilent mode: offSingle run mode: offTarget connection timeout: 0 ms------J-Link related settings------J-Link Host interface: USBJ-Link script: noneJ-Link settings file: none------Target related settings------Target device: UnspecifiedTarget interface: JTAGTarget interface speed: 4000kHzTarget endian: little
    4. Connecting to J-Link...J-Link is connected.Failed to set device (Unspecified). Unknown device selected?ERROR : Failed to set device.
    5. Firmware: J-Link V9 compiled Jan 29 2018 15:41:50Hardware: V9.30S/N: 269300437OEM: SEGGER-EDUFeature(s): FlashBP, GDBChecking target voltage...Target voltage: 3.29 VListening on TCP/IP port 2331Connecting to target...ERROR: No CPU core or target device has been selected. Please make sure at least the core J-Link shall connect to, is selected.ERROR: Could not connect to target.Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...Shutting down...Could not connect to target.Please check power, connection and settings.



    So it looks like JLinkGDBServer can't identify my target MCPU. How can I manually specify it? Where in documentation is this described?

    Oh one more thing before I started JLinkGDBServer I opened JLinkExe and made sure that power is on using command power on perm.
    So program is executing on the board all the time. While in JLinkExe I could connect to the Cortex-M4 core using connect command. While
    connected I could read registers, halt the program using h and continue program using g. So if JLinkExe can connect why won't JLinkGDBServer?

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

  • Hello,

    Thank you for your inquiry.
    You need to specify a target device. How to is explained in the J-Link user manual in section J-Link GDB-Server.

    The GUI and CL version of GDB Server do the exact same thing. So all you need to do is to call the GBD Server with -device LPC4088 instead of -device Unspecified.
    The GUI version will show you how the generated parameter string for the CL looks like. So you can use the GUI version as reference.

    If you select only COrtex-M4 you might be able to connect but debugging will not work perfectly. You need to specify the exact device.

    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.
  • Thank you. I figured it out ! I just used command:

    Source Code

    1. JLinkGDBServer -USB -device cortex-m4

    and it now sucesfully creates GDB server. It is a good Idea to check the GUI for the parameters, but why don't you add man pages or --help for linux users. It would come handy. For examle users could type:

    Source Code

    1. JLinkGDBServer --help

    or

    Source Code

    1. man JLinkGDBServer

    and get all the help on the go. Searching PDF's is clumsy in my opinnion.
  • Hello,

    Don't use -device cortex-m4 if you want to debug. As I wrote before in my post:
    If you select only COrtex-M4 you might be able to connect but debugging will not work perfectly. You need to specify the exact device.

    So use -device LPC4088 instead.

    Otherwise you will get all kinds of unpredictable side effects.

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

    No problem. Great to hear that you are up and running again.
    We will consider this thread as closed now.

    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.