[ABANDONED] Eclipse: cannot download to target. OpenOCD fails

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

  • [ABANDONED] Eclipse: cannot download to target. OpenOCD fails

    I have been pulling my hair out (which I can ill-afford) trying to get my j-link Pro to download firmware to my target board.
    I am using WICED which is derived from Eclipse.

    I developed some working software that sends telemetry to Azure IoT hub using a Broadcom Eval board.
    Now I need to move onto the actual hardware which has a SWD interface. Segger recognized the WiFi module so I know that is working.


    I installed the Segger J-link plug-in into WICED (eclipse). The configurations window shows J-link features under the debugger and the Startup tabs.


    The make target references the WiFi module ( Telemetry-CEL_WB4343WF3SP2 JTAG=jlink download )

    The program compiles and links without error.
    But when it comes time to download it to the target board I get the now infamous:
    "**** OpenOCD failed - ensure to have installed the driver from the drivers directory ..." error message.

    The drivers directory only has one entry and it is BCM9WCE1EVAL which is the Eval board that I used successfully. This is a bit suspicious as I don't know how to (or if I need to) include a driver entry for my CEL module.

    My .gdbinit file looks like this...
    shell start /B ./tools/OpenOCD/Win32/openocd-all-brcm-libftdi.exe -f ./tools/OpenOCD/Jlink.cfg -f ./tools/OpenOCD/stm32f4x.cfg -f ./tools/OpenOCD/stm32f4x_gdb_jtag.cfg -l build/openocd_log.txt

    The first entry in the openocd_log.txt looks like this....
    Open On-Chip Debugger 0.9.0-00029-gafd5db2-dirty (2015-05-29-18:47)
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    adapter speed: 1000 kHz
    adapter_nsrst_delay: 100
    Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
    jtag_ntrst_delay: 100
    Warn : target name is deprecated use: 'cortex_m'
    jtag_init
    Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
    Error: Cannot find jlink Interface! Please check connection and permissions.

    I've been at this for almost a week and it is frustrating fighting my tools rather than using them to do my job.


    I've heard rumors that J-link does not work with openOCD. Is this so? Is there a work-around?

    Any thought would be gratefully received.

    Bill
  • Hi Bill,


    in order to use OpenOCD with J-Link you need to use a tool like Zadig in order to overwrite the J-Link driver with the WinUSB driver (select Options -> List all devices in case you cannot find your J-Link in the drop-down menu).
    After this has been done, you will need to rollback to the SEGGER J-Link driver in case you want to use SEGGER tools like J-Link Commander.

    Please note the following:
    • We cannot provide support for third party IDEs like eclipse
    • There is a bug that causes Full-Speed-USB J-Links (V9 and older, J-Link Pro V3 and older) to not work correctly with OpenOCD. (We need to look into this, but at the moment, we assume that has to be fixed on OpenOCD side)
      Workaround is to downgrade the J-Link firmware using J-Link 5.12j or older (segger.com/downloads/jlink/Setup_JLink_V512j.zip) by using the "exec invalidatefw" command in J-Link Commander. Although there are known issues, downgrading the J-Link firmware is not recommended and happens at your own risk.
    • Do you need to work with OpenOCD, or would the GNU ARM eclipse plugin be an option for you?
      gnuarmeclipse.github.io/
      segger.com/IDE_Integration_Eclipse.html


    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.
  • Hello Forum,

    the issue regarding OpenOCD + J-Link models with Full Speed USB (V9 and older) has been fixed with the firmware "J-Link V9 compiled Sep 1 2016 18:29:50" or later, which is included in V6.00i or higher of the J-Link software & documentation pack.

    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.