Skip to content
This repository was archived by the owner on Mar 25, 2019. It is now read-only.
This repository was archived by the owner on Mar 25, 2019. It is now read-only.

Cannot point to OpenOCD home on Ubuntu 16.04 Desktop and CLion 2017.3 #59

Closed
@belussi

Description

@belussi

Expected Behavior

User can point to OpenOCD home directory on Linux

Actual Behavior

Getting "OpenOCD Home is invalid" when pointing to OpenOCD home.
image

Directory content:

total 3292
lrwxrwxrwx 1 kamil kamil      17 gru  4 21:15 libftdi1.so -> libftdi1.so.2.2.0
lrwxrwxrwx 1 kamil kamil      17 gru  4 21:15 libftdi1.so.2 -> libftdi1.so.2.2.0
-rw-r--r-- 1 kamil kamil  150728 lis 10 12:31 libftdi1.so.2.2.0
lrwxrwxrwx 1 kamil kamil      25 gru  4 21:15 libhidapi-hidraw.so -> libhidapi-hidraw.so.0.0.0
lrwxrwxrwx 1 kamil kamil      25 gru  4 21:15 libhidapi-hidraw.so.0 -> libhidapi-hidraw.so.0.0.0
-rw-r--r-- 1 kamil kamil   26632 lis 10 12:31 libhidapi-hidraw.so.0.0.0
-rw-r--r-- 1 kamil kamil   31744 lis 10 12:31 librt-2.24.so
lrwxrwxrwx 1 kamil kamil      13 gru  4 21:15 librt.so -> librt-2.24.so
lrwxrwxrwx 1 kamil kamil      13 gru  4 21:15 librt.so.1 -> librt-2.24.so
lrwxrwxrwx 1 kamil kamil      16 gru  4 21:15 libudev.so -> libudev.so.1.6.5
lrwxrwxrwx 1 kamil kamil      16 gru  4 21:15 libudev.so.1 -> libudev.so.1.6.5
-rw-r--r-- 1 kamil kamil  131344 lis 10 12:31 libudev.so.1.6.5
lrwxrwxrwx 1 kamil kamil      19 gru  4 21:15 libusb-0.1.so -> libusb-0.1.so.4.4.4
lrwxrwxrwx 1 kamil kamil      19 gru  4 21:15 libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
-rw-r--r-- 1 kamil kamil   28872 lis 10 12:31 libusb-0.1.so.4.4.4
lrwxrwxrwx 1 kamil kamil      19 gru  4 21:15 libusb-1.0.so -> libusb-1.0.so.0.1.0
lrwxrwxrwx 1 kamil kamil      19 gru  4 21:15 libusb-1.0.so.0 -> libusb-1.0.so.0.1.0
-rw-r--r-- 1 kamil kamil  139744 lis 10 12:31 libusb-1.0.so.0.1.0
-rwxr-xr-x 1 kamil kamil 2842912 lis 10 12:31 openocd

Steps to Reproduce the Problem

  1. Create OpenOCD configuration for new project.

Specifications

  • Plugin Version: 0.8.alpha
  • CLion version: 2017.3
  • OpenOCD version: 0.10.0
  • GDB Version: n/a
  • STM32CubeMX version: n/a
  • Toolchain: n/a
  • Platform: Ubuntu 16.04 Desktop
  • Hardware configuration:

Activity

elmot

elmot commented on Dec 14, 2017

@elmot
Owner

OpenOCD requires both bin and share/openocd/scripts folders in the structure. Most probably your OpenOCD setup is not complete. How does it look like on my Windows:

+---bin
+---drivers
|   +---FTDI CDM v2.08.28 Certified
|   |   +---amd64
|   |   +---i386
|   |   \---Static
|   |       +---amd64
|   |       \---i386
|   +---ST-Link
|   |   +---amd64
|   |   \---x86
|   +---WinUSB
|   |   +---amd64
|   |   \---x86
|   \---WinUSB_Mini
+---QuickSetup
\---share
    \---openocd
        +---contrib
        |   +---libdcc
        |   +---loaders
        |   |   +---checksum
        |   |   +---debug
        |   |   |   \---xscale
        |   |   +---erase_check
        |   |   +---flash
        |   |   |   +---at91sam7x
        |   |   |   +---fm4
        |   |   |   +---fpga
        |   |   |   +---kinetis
        |   |   |   +---kinetis_ke
        |   |   |   \---xmc1xxx
        |   |   \---watchdog
        |   +---remote_bitbang
        |   +---rpc_examples
        |   +---rtos-helpers
        |   \---xsvf_tools
        +---OpenULINK
        \---scripts
            +---board
            +---chip
            |   +---atmel
            |   |   \---at91
            |   +---st
            |   |   +---spear
            |   |   \---stm32
            |   \---ti
            |       \---lm3s
            +---cpld
            +---cpu
            |   \---arm
            +---fpga
            +---interface
            |   \---ftdi
            +---target
            +---test
            \---tools

On *nix it should look very similar way

belussi

belussi commented on Dec 14, 2017

@belussi
Author

Hi,
Thanks for your reply.
I'm using standard ARM-MCU-Eclipse plugin installation and I see that 'scripts' directory is located directly under OpenOCD home directory. There is no 'share' at all.

kamil@kamil-Latitude-E7450:~/workspace/same70-base$ ls /opt/gnu-mcu-eclipse/openocd/0.10.0-5-20171110-1117/ bin contrib doc gnu-mcu-eclipse info licenses man OpenULINK README.md scripts

I have created it manually and it worked.

elmot

elmot commented on Dec 14, 2017

@elmot
Owner

Sorry, my plugin does not support that (yet?). Since you use ubuntu, try to install standard openocd distribution via sudo apt-get install openocd

elmot

elmot commented on Dec 14, 2017

@elmot
Owner

@belussi, looks like you are trying to use this stuff with Microchip MCUs. Please let me know if you gain any success or not.

belussi

belussi commented on Dec 14, 2017

@belussi
Author

Flashing seems to working fine. But I get this when trying to debug:

Error during pretty printers setup: Undefined info command: "pretty-printer". Try "help info".
Some features and performance optimizations will not be available.
info pretty-printer
Undefined info command: "pretty-printer". Try "help info".
Debugger connected to
tcp:localhost:3333

It seems to be python module, so I will try to install it.

elmot

elmot commented on Dec 14, 2017

@elmot
Owner

Looks like you are using very old gdb. Try version 8 or at least 7.

belussi

belussi commented on Dec 18, 2017

@belussi
Author

Hi,

My SAME70 seems to be working fine with your plugin.

mintisan

mintisan commented on Jan 2, 2018

@mintisan

It works for me with the directory you mentioned, thanks. @elmot

I used openocd binary from https://github.com/runtimeco/openocd-binaries for macOS, http://gnutoolchains.com/arm-eabi/openocd/ for Windows.

reopened this on Jan 4, 2018
elmot

elmot commented on Jan 4, 2018

@elmot
Owner

I got several requests to fix this through private channels.

mintisan

mintisan commented on Jan 5, 2018

@mintisan

What else do you need except for openocd binary file? Why need the structure completely?

elmot

elmot commented on Jan 5, 2018

@elmot
Owner

Bunch of scripts.

keatis

keatis commented on Jan 9, 2018

@keatis

Some unofficial packages do not have share/ folder, but have scripts/right at top level.

As a workaround on Windows, just copy whole scripts/ folder to OPENOCD_HOME/share/openocd, so that there's OPENOCD_HOME/share/openocd/scripts/board folder. Or make a link (i didn't try this).

On *nix just make a symlink with smth like

cd OPENOCD_HOME && mkdir -p share/openocd && cd $_ && ln -s ../../scripts
added this to the 1.0.beta2 milestone on Apr 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @belussi@elmot@keatis@mintisan

        Issue actions

          Cannot point to OpenOCD home on Ubuntu 16.04 Desktop and CLion 2017.3 · Issue #59 · elmot/clion-embedded-arm