...
Copy the binaries to the directory exported via NFS
4.1. Using NFS Share
This application note shows how to use NFS share to copy the binary to the target.
...
Add the following lines to
etc/rc
:Code Block % cd projects/rootfs % vi etc/rc ... sleep 2 mount -o nolock 192.168.0.103:/srv/homes/eclipse-workspace/ /mnt/nfs ...
Rebuild the project.
After loading the project to the target, the Eclipse workspace directory is mounted as
/mnt/nfs
:Code Block / # df Filesystem 1K-blocks Used Available Use% Mounted on 192.168.0.103:/srv/homes/eclipse-workspace/ 488645632 124968960 338781184 27% /mnt/nfs / # ls -la /mnt/nfs/c-example/Debug/ drwxrwxr-x 2 1005 1005 4096 Jun 11 2024 . drwxrwxr-x 4 1005 1005 4096 Jun 11 2024 .. -rw-rw-r-- 1 1005 1005 16 Jun 11 2024 app.d -rw-rw-r-- 1 1005 1005 52048 Jun 11 2024 app.o -rwxrwxr-x 1 1005 1005 41680 Jun 11 2024 c-example -rw-rw-r-- 1 1005 1005 1360 Jun 11 2024 makefile -rw-rw-r-- 1 1005 1005 402 Jun 11 2024 sources.mk -rw-rw-r-- 1 1005 1005 752 Jun 11 2024 subdir.mk / #
4.2. Adding Debug Configuration to the Project
Perform the following steps to add a debug configuration to the Eclipse project:
Open Run -> Debug Configurations -> C/C++ Remote Applications:
Create a new configuration in C/C++ Remote Application by clicking + in the upper left part of the dialogue:
In the Main tab, click Select other... to change Using GDB Automatic Remote Debugging Launcher.
In the Select Preferred Launcher dialog, select Manual Remote Debugging Launcher and click OK.
In the Debug Configuration window, switch to the Debugger tab and change GDB debugger to the full path to
arm-buildroot-uclinuxfdpiceabi-gdb
. Click Apply.Select the Connection tab and enter an IP address of you target and
gdbserver
connection port number. Click Apply.
DO NOT click Debug.
...
4.3. Debugging on the Target
To start debugging on the target, in the target console window, start gdbserver
with the application using the port number specified at Step 6 above:
...