Cross Remote Debug for Raspberry PI
The cross compilation must be operational
see : [Cross compile for raspberry PI]
Download the appropriate eclipse package for your platform (eclipse-cpp)
-
Install SD card with Raspbian Linux into the Raspberry Pi.
-
Enable sshd (SSH server) on Raspberry Pi (run raspi-config from console).
-
Assign static IP address to Raspberry Pi by editing /etc/network/interfaces with nano. Example configuration:
auto lo iface lo inet loopback iface eth0 inet static address 192.168.1.50 netmask 255.255.255.0 gateway 192.168.1.1 allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp
-
Using putty or an unix terminal connect to the raspberry through ssh (ssh ip_of_rapsberry)
-
Enter the following commands in terminal:
mkdir remote-debugging cd remote-debugging touch .gdbinit
-
Find gdbserver in the Raspberry tools (installed in Linux host)
(....)/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/debug-root/usr/bin/gdbserver
-
copy it to the raspberry
scp path/to/gdbserver pi@<raspberryip>:/home/pi/remote-debugging
- Make sure /home/pi/remote-debugging/gdbserver has exec permissions on the Raspberry Pi (chmod +x /home/pi/remote-debugging/gdbserver).
-
generate project for Eclipse
sh cmake_linux.sh e
-
open Eclipse
-
Uncheck the menu "Project->Build Automatically".
-
Import Eclipse project
- File -> Import
- Choose General -> "Existing Projects into Workspace"
- Browse for "trunk/projects" folder; then the project will be found
- Finish
-
Build all
http://www.gurucoding.com/en/raspberry_pi_eclipse/raspberry_pi_remote_access_in_eclipse.php
Yadoms -- The ultimate house automation solution