Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
P&E GDB Server for Kinetis - Eclipse Plugin
Craig H. Dec 23, 2014 at 09:06 AM (09:06 hours)
Staff: Takao Y.

  • When I try to connect to my Kinetis K10 I get a port error.  I've attached the error message below.  I was able to connect with the windows gui just fine.  Yes I've closed that program before trying and even tried rebooting.  Can anyone help me with this?


    P&E GDB Server, Version 5.13.02.00
    Copyright 2014, P&E Microcomputer Systems Inc, All rights reserved

    Loading library C:\Temp\luna\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.6.201409261701\win32\gdi\unit_ngs_arm_internal.dll ... Done.

    Command line arguments: -device=K10DN128 -startserver -singlesession -serverport=7224 -interface=USBMULTILINK -speed=5000 -port=USB1 -USE_CYCLONEPRO_RELAYS=0 -FORCE_MASS_ERASE=0
    Device selected is k10dn128
    User Specified Hardware Selection : Interface=USBMULTILINK and Port=USB1
    Connecting to target.
    Error opening selected communication interface

    Error - Port not found.



    Can not enter background mode.



    Unable to initialize PEDebug.

    PE-ERROR: Failed to Initialize Target
    Server running on 127.0.0.1:7224




    Comments

  • Greetings,

    From the error message, the GDB server cannot find your multilink. A few things to check:

    1) Make sure no other software is running because it could be busy occupying the multilink port. The multilink can only be used on one software at a time.

    2) Double check your debug configurations within KDS. Make sure it detects your multilink.


    Takao Yamada

  • After a bunch of restarting everything I got past the port issue but now it says the gdb server is starting but the status in the lower right hand corner says Launching PE Plugin:(99%) and just stays there.  I can't abort it and if I close eclipse (I'm using eclipse Luna release) It then will give me an error saying the port is already in  use and I have to restart my computer.

    Here is the console output:

    P&E GDB Server, Version 5.13.02.00
    Copyright 2014, P&E Microcomputer Systems Inc, All rights reserved

    Loading library C:\luna\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.6.201409261701\win32\gdi\unit_ngs_arm_internal.dll ... Done.

    Command line arguments: -device=K10DN128 -startserver -singlesession -serverport=7224 -interface=USBMULTILINK -speed=5000 -port=USB1 -USE_CYCLONEPRO_RELAYS=0 -FORCE_MASS_ERASE=0
    Device selected is k10dn128
    User Specified Hardware Selection : Interface=USBMULTILINK and Port=USB1
    Connecting to target.
    P&E Interface detected - Flash Version 6.10

    Device is K10DN128.

    Mode is In-Circuit Debug.

    'Kinetis' is a registered trademark of Freescale.

    (C)opyright 2012, P&E Microcomputer Systems, Inc. (www.pemicro.com)
    API version is 101

    Server running on 127.0.0.1:7224

  • Greetings,

    Alright, at least it is a step forward. I would advise updating your KDS plugin from P&E. To do this, go to Help -> Install New Software. Then from the dropdown box select PEMicro website and check the checkbox for PEMicro software. Go through the install wizard and see if your situation improves.


    Takao Yamada

  • Ok I did that but same result - it gets stuck at launching PE Plugin (99%)

    console output:
    P&E GDB Server, Version 5.13.02.00
    Copyright 2014, P&E Microcomputer Systems Inc, All rights reserved

    Loading library C:\luna\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.8.201411191655\win32\gdi\unit_ngs_arm_internal.dll ... Done.

    Command line arguments: -device=K10DN128 -startserver -singlesession -serverport=7224 -interface=USBMULTILINK -speed=5000 -port=USB1 -USE_CYCLONEPRO_RELAYS=0 -FORCE_MASS_ERASE=0
    Device selected is k10dn128
    User Specified Hardware Selection : Interface=USBMULTILINK and Port=USB1
    Connecting to target.
    P&E Interface detected - Flash Version 6.10

    Device is K10DN128.

    Mode is In-Circuit Debug.

    'Kinetis' is a registered trademark of Freescale.

    (C)opyright 2012, P&E Microcomputer Systems, Inc. (www.pemicro.com)
    API version is 101

    Server running on 127.0.0.1:7224

  • Greetings,

    Just so I understand your setup better...

    1) Are you on Windows or Linux?

    2) Do you have any custom hardware like custom ribbon cables, adapters, or other unique setup between the multilink and your target?

    3) Are you using JTAG or SWD? Make sure to select the correct interface within debug configurations. Currently it looks like you are using SWD.

    4) Have you tried using Codewarrior, and if so does it work fine there?

    5) What is the exact chip part number you are trying to program?

    6) Within KDS, create a new project and do not change any code or settings. Just within debug configurations make sure the multilink shows up and the correct Kinetis part is selected. With no other changes, does it work? I want to know if maybe this is a settings issue within KDS.


    Takao Yamada

  • 1) I am using Windows.  I am also not using KDS I am just using plain eclipse Luna with your plugin.

    2) I do not have any hardware between the multilink and my hardware. The cable plugs into a 10 pin connector on my hardware

    3) My connector is a 10 pin cortex header. Looks like both should be available on the pins. I tried unselecting SWD but got the same result.

    4) Yes, codewarrior works but there I am using there debug driver

    5) MK10DN128VLF5

    6) The correct Kinetis part was selected but had the same results

  • Greetings,

    Now it all makes sense. For the longest time I thought you were using KDS, not plain Eclipse. KDS is also Luna-based Eclipse so I disregarded your original mention of it.

    Yes, currently we do have a bug in our GDB plugin where it hangs at 99%. We are currently looking at workarounds to this issue. Once I test out this workaround, then I will let you know what you need.


    Takao Yamada

  • Ok thank you

  • Greetings,

    I was not able to reproduce this on my end. I have a Luna eclipse with P&E's GDB server. I was able to debug my project without hanging at 99%.

    Previously we saw this 99% issue with earlier versions of our plugin. Try downloading our GDB server again and see if you get past the 99% issue:
    www.pemicro.com/gdb


    Takao Yamada

  • Did you use the gdb server with windows gui or the eclipse plug in?  I can get the gui version to work but not the eclipse plug in.

  • Greetings,

    I used the eclipse plugin. Note, that simply installing the GDB server does not mean your Eclipse has the ARM GNU toolchain. If you had Codewarrior or KDS, then that would not be a problem.

    First, go to your debug configurations and within debugger tab and check to make sure your GDB server executable is pointing to:
    .\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.6.201409261701\win32\pegdbserver_console.exe

    Then for GDB client settings, you need to have the executable pointing to an arm-none-eabi-gdb.exe. Here is where I got mine:
    https://launchpad.net/gcc-arm-embedded/+download


    Takao Yamada

  • It looked like I had a newer version installed: 1.1.8.201411191655 as you can see in the output in one of my previous posts.  I uninstalled this one and install what is on the website so now I have the same version as you 1.1.6.201409261701 but I am still getting stuck at 99%.

    I am using KDS_1.1.1\toolchain\bin\arm-none-eabi-gdb.exe gdb client

  • Greetings,

    If you have KDS, then you should try getting it working in KDS since it should work out of the box.

    For Eclipse, when you go to debug configurations, on the left column do you have your project under "GDB PEMicro Interface Debugging"? Does this option exist?


    Takao Yamada

  • I have other issues with KDS as it does not support all there processors.  

    Yes, I do have the GDB PEMicro Interface Debugging option.

  • Greetings,

    Alright, I did this test 3 times and I found the solution. I will be documenting this soon so that future people get this correct the first time. I want to thank you for bringing up our lack of documentation of this subject and we will be better about it.

    You need 3 things to get this working on a new Kepler or Luna Eclipse:

    1) P&E GDB server
    Download here:
    http://www.pemicro.com/gdb
    OR point to this link within "install new software" in eclipse:
    http://www.pemicro.com/eclipse/updates

    2) ARM Toolchain
    Download here:
    https://launchpad.net/gcc-arm-embedded/+download
    OR get it from KDS or Codewarrior if already on your machine.
    CW = ./Cross_Tools/arm-none-eabi-gcc-x_x_x/bin/arm-none-eabi-gdb.exe
    KDS = ./toolchain/bin/arm-none-eabi-gdb.exe

    3) GNU ARM Eclipse plugin
    Download here:
    http://sourceforge.net/projects/gnuarmeclipse/
    OR point to this link within "install new software" in eclipse:
    http://gnuarmeclipse.sourceforge.net/updates

    Here are a few websites you could read about DIY setup by our friend Erich Styger here:
    http://mcuoneclipse.com/2013/12/23/diy-free-toolchain-for-kinetis-part-7-gnu-arm-eclipse-plugins/

    http://mcuoneclipse.com/2014/09/11/pe-eclipse-update-site-for-gnu-arm-eclipse-plugins/


    Takao Yamada

  • Thank you for helping me.  I really appreciate your responsiveness.  I'm trying to download the GNU ARM Eclipse plugin and I am getting the following error:

    An error occurred while collecting items to be installed
    session context was:(profile=epp.package.cpp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
    No repository found containing: osgi.bundle,org.eclipse.emf.emfstore.common,1.4.0.v20140912-0421

    Any idea why? I've tried both pointing to the link with "install new software" and downloading it and pointing the install to the downloaded files.

  • Greetings,

    After some google searching, I found that this could be a problem if your Eclipse is located in a protected directory like C:\program files (x86). My eclipse is sitting right on my C drive. Try moving your eclipse there and attempt again.


    Takao Yamada

  • I got it working.  I don't know what was wrong with my eclipse installation but I started from scratch with a new installation and everything worked fine.  Thank you very much for all your support you've been very helpful.

Add comment


   Want to comment? Please login or create a new PEMicro account.







© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement