Garz & Fricke Yocto User Manual page 69

Embedded computer systems
Table of Contents

Advertisement

In this case
172.20.55.89
is used.
Now, recompile
myapp
and transfer it to the target (with
Note: For all the following steps the SDK environment has to be sourced.
!
$ source
/opt/guf/GUF-Yocto-jethro-9.0-r7707-0-sdk/environment-setup-imx6guf-guf-linux-gnuea
,
$ make
$ make clean
$ make
$ scp myapp root@172.20.55.89:/tmp/myapp
If necesary, stop the automatically started demo application. This can be done from the development host with
ssh:
$ ssh root@172.20.55.89 '/etc/init.d/qt-guf-demo stop'
Start the
gdbserver
on the device (again from the host through ssh):
$ ssh root@172.20.55.89 'gdbserver :2345 /tmp/myapp' &
Now, the gdbserver is waiting for the remote debugger to connect on the specified port 2345. The output should
look like this:
Process /tmp/myapp created; pid = 1266
Listening on port 2345
Start the remote debugger out of the
!
$ arm-guf-linux-gnueabi-gdb `find /opt/guf/GUF-Yocto-jethro-9.0-r7707-0-sdk/sysroots/
!
imx6guf-guf-linux-gnueabi/usr/src/debug/ -type d -printf '-d %p '` -d $PWD
,
myapp
,
The embedded find command assures that the debugger can access all SDK source codes that are eventually
accessed by the debug session (e.g. setpping into a library call). Every source path found in the specified
directory is passed to GDB with the
relative or absolute. This depends how they are passed to the compiler. So this is the only way to assure
that every source path of the whole Yocto BSP is known by the debugger and every source file is found when
referenced.
After executing GDB with the above command the GDB shell is entered.
Set the sysroot for the debugger, where it can find the linker and the system libraries:
!
(gdb) set sysroot /opt/guf/GUF-Yocto-jethro-9.0-r7707-0-sdk/sysroots/imx6guf-guf-
linux-gnueabi
,
!
(gdb) set auto-load safe-path /opt/guf/GUF-Yocto-jethro-9.0-r7707-0-sdk/sysroots/
imx6guf-guf-linux-gnueabi
,
Connect to the target device:
(gdb) target remote 172.20.55.89:2345
The output from the debugger should look like this:
Remote debugging using 172.20.55.89:2345
!
Reading symbols from /opt/guf/GUF-Yocto-jethro-9.0-r7707-0-sdk/sysroots/imx6guf-guf-
!
linux-gnueabi/lib/ld-linux-armhf.so.3...Reading symbols from /opt/guf/
,
!
GUF-Yocto-jethro-9.0-r7707-0-sdk/sysroots/imx6guf-guf-linux-gnueabi/lib/.debug
,
/ld-2.22.so...done.
,
GUF-Yocto-jethro-9.0-r7707-0
scp
in this case):
myapp
source directory:
option. The source pathes inside the ELF debug information may be
-p
i.MX6
User Manual
¡
¡
69

Advertisement

Table of Contents
loading

Related Products for Garz & Fricke Yocto

Table of Contents