Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updating numbered headings

...

  1. 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.

...

  1. 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
    ...
  2. Rebuild the project.

  3. 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:

  1. Open Run -> Debug Configurations -> C/C++ Remote Applications:

    image-20240620-110120.png
  2. Create a new configuration in C/C++ Remote Application by clicking + in the upper left part of the dialogue:

    image-20240620-110337.png
  3. In the Main tab, click Select other... to change Using GDB Automatic Remote Debugging Launcher.

  4. In the Select Preferred Launcher dialog, select Manual Remote Debugging Launcher and click OK.

    image-20240620-110457.png
  5. 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.

    image-20240620-110617.png
  6. Select the Connection tab and enter an IP address of you target and gdbserver connection port number. Click Apply.

    image-20240620-110706.png

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:

...