- Change to the project
directory:
$ cd <plnx-proj-root>
- Add the following lines in <plnx-proj-root>/project-spec/meta-user/conf/user-rootfsconfig:
CONFIG_myapp-dev CONFIG_myapp-dbg
- Run
petalinux-config -c rootfs
on the command console:$ petalinux-config -c rootfs
- Scroll down the user packages Configuration menu to Debugging:
Filesystem Packages ---> PetaLinux Package Groups ---> apps ---> user packages ---> PetaLinux RootFS Settings --->
- Select user packages.
[X] myapp-dbg
[ ] myapp-dev
- Select myapp-dbg. Exit the myapp sub-menu.
- Exit the user packages sub-menu, and select .
- Select gdb, and ensure
that the GDB server is enabled:
[ ] gdb
[ ] gdb-dev
[X] gdbserver
[ ] gdb-dbg
- Exit the menu and select <Yes> to save the configuration.
- 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.