In the previous article we have prepared the environment with Eclipse for cross building for BeagleBone
Now we shall configure Eclipse and BeagleBone to debug the code directly on BeagleBone.
On BeagleBone install gdbserver
1 |
sudo apt-get install gdbserver |
On the Debian system with Eclipse install gdb-multiarch
1 |
sudo apt-get install gdb-multiarch |
From Eclipse access to Run-> Debug Configurations
Double-click C++ Remote Application to set parameters
At the next window, create a new ssh connection with the New button
Enter the parameters for the connection
Set the remote destination folder for the file and execution management; with the browse button choose where to copy the files, and with the field “Commands to execute before application” will give execute permissions to the file
In our case we create a folder esempi under /root on the BeagleBone where to debug remotely
Set the multarch debugger in the Debugger Tab and other startup parameters and gdb command line settings
Set the port of the remote debug server installed on BeagleBone in the Gdbserver Settings Tab
Create .gdbinit files in the project folder with the command
To start debugging run the configuration we set
Eclipse connects with BeagleBone and performs remote debugging opening the Debug Perspective