Debug using Eclipse fails

I tried to debug my first hello-world using Eclipse as described in the Getting Started Guide. (Quickstart Guide - Toradex) I followed the guide as described on a fresh Ubuntu 16.04.2 installation. Step 19 / 20 fails after starting the debug session in Eclipse with the following error message:

Error with command: ${GDB} --version
Cannot run program "${GDB}": Unknown reason

Eclipse console output:

Last login: Wed Jun  7 13:13:44 2017 from

gdbserver  :2345 /home/root/hello-world-debug;exit

root@apalis-imx6:~# gdbserver  :2345 /home/root/hello-world-debug;exit
Process /home/root/hello-world-debug created; pid = 1234
Listening on port 2345

In the terminal from where Eclipse was startet I get the following output:

Unable to find full path for "${GDB}"

I used that terminal to start Eclipse:

dpdev@dpdev:~/eclipse/cpp-neon/eclipse$ . /usr/local/oecore-x86_64/environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi
dpdev@dpdev:~/eclipse/cpp-neon/eclipse$ echo ${GDB}
dpdev@dpdev:~/eclipse/cpp-neon/eclipse$ ./eclipse

So environment variables are set and I can also start gdb with “${GDB}” from that terminal (after I quit Eclipse). Anything else I need to configure in Eclipse beside what is shown in the Getting Started guide?

I am using Ixora Carrier Board V1.0A with Apalis iMX6 Quad 2GB IT V1.1B running Image Apalis-iMX6_LXDE-Image 2.7.2 20170410 (installed with Toradex-Easy-Installer)

So I got it working. I followed the Ubuntu setup guide from here How to setup environment for Embedded Linux application development | Toradex Developer Center. The part from “Update and Upgrade Necessary Packages for Ubuntu”. I switched default shell from dash to bash.

But I also had to directly enter the GDB path in the Eclipse debug configuration (“arm-angstrom-linux-gnueabi-gdb” instead of ${GDB}).

Debugging was possible after that, but the CFLAGS from the environment-setup script are probably not really useful with optimization set to -O2, so I turned off optimization for Debug configuration.

Thanks for updating! Good point regarding CFLAGS.