Preparing the Build System for Debugging - 2020.2 English

PetaLinux Tools Documentation Reference Guide (UG1144)

Document ID
UG1144
Release Date
2020-11-24
Version
2020.2 English
  1. Change to the project directory:
    $ cd <plnx-proj-root>
  2. Add the following lines in <plnx-proj-root>/project-spec/meta-user/conf/user-rootfsconfig:
    CONFIG_myapp-dev
    CONFIG_myapp-dbg
  3. Run petalinux-config -c rootfs on the command console:
    $ petalinux-config -c rootfs
  4. Scroll down the user packages Configuration menu to Debugging:
    Filesystem Packages   ---> 
    PetaLinux Package Groups --->
    apps   ---> 
    user packages   --->
    PetaLinux RootFS Settings  --->
  5. Select user packages.

    [X] myapp-dbg

    [ ] myapp-dev

  6. Select myapp-dbg. Exit the myapp sub-menu.
  7. Exit the user packages sub-menu, and select Filesystem Packages > misc > gdb.
  8. Select gdb, and ensure that the GDB server is enabled:

    [ ] gdb

    [ ] gdb-dev

    [X] gdbserver

    [ ] gdb-dbg

  9. Exit the menu and select <Yes> to save the configuration.
  10. Rebuild the target system image. Add the below line in <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf.
RM_WORK_EXCLUDE += "myapp"

For more information, see Build System Image.