[bootlin/training-materials updates] master: sysdev/beagleplay: add app dev and debug lab (4ee30a4f)

Michael Opdenacker michael.opdenacker at bootlin.com
Mon Aug 7 16:25:55 CEST 2023


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/4ee30a4f9929a1dba2881b42bcc6549393da13d6

>---------------------------------------------------------------

commit 4ee30a4f9929a1dba2881b42bcc6549393da13d6
Author: Clément Ramirez <clement.ramirez at bootlin.com>
Date:   Thu Jul 13 16:33:02 2023 +0200

    sysdev/beagleplay: add app dev and debug lab


>---------------------------------------------------------------

4ee30a4f9929a1dba2881b42bcc6549393da13d6
 .../sysdev-application-development-and-debugging.tex     | 16 +++++++++-------
 mk/embedded-linux-beagleplay.mk                          |  1 +
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex b/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
index 35a1a2f4..51c79e31 100644
--- a/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
+++ b/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
@@ -51,9 +51,9 @@ $ export PATH=$HOME/__SESSION_NAME__-labs/integration/buildroot/output/host/bin:
 \normalsize
 
 Let's try to compile the application:
-
-\bashcmd{$ arm-linux-gcc -o nunchuk-mpd-client nunchuk-mpd-client.c}
-
+\begin{bashinput}
+$ %\ifdefstring{\labboard}{beagleplay}{aarch64-linux-gcc}{arm-linux-gcc}% -o nunchuk-mpd-client nunchuk-mpd-client.c
+\end{bashinput}
 The compiler complains about undefined references to some symbols in
 {\em libmpdclient}. This is normal, since we didn't tell the compiler
 to link with this library. So let's use \code{pkg-config} to query the
@@ -64,7 +64,7 @@ automatically knows where to look, so it already knows the right paths
 to find \code{.pc} files and their sysroot.}:
 
 \begin{bashinput}
-$ arm-linux-gcc -o nunchuk-mpd-client nunchuk-mpd-client.c \
+$ %\ifdefstring{\labboard}{beagleplay}{aarch64-linux-gcc}{arm-linux-gcc}% -o nunchuk-mpd-client nunchuk-mpd-client.c \
 $(pkg-config --libs libmpdclient)
 \end{bashinput}
 
@@ -164,8 +164,10 @@ Then, on the target side, run the program under \code{gdbserver}.
 
 \ubootcmd{=> gdbserver localhost:2345 /root/nunchuk-mpd-client}
 
-On the host side, run \code{arm-linux-gdb} (also found in your toolchain):
-\bashcmd{$ arm-linux-gdb nunchuk-mpd-client}
+On the host side, run \ifdefstring{\labboard}{beagleplay}{\code{aarch64-linux-gdb}}{\code{arm-linux-gdb}} (also found in your toolchain):
+\begin{bashinput}
+$ %\ifdefstring{\labboard}{beagleplay}{aarch64-linux-gdb}{arm-linux-gdb}% nunchuk-mpd-client
+\end{bashinput}
 
 \code{gdb} starts and loads the debugging information from the
 \code{nunchuk-mpd-client} binary (in the \code{appdev} directory)
@@ -217,7 +219,7 @@ Following the details in the slides, configure your shell on the
 target to get a \code{core.xxx} file dumped when you run
 \code{nunchuk-mpd-client} again.
 
-Once you have such a file, inspect it with \code{arm-linux-gdb} on
+Once you have such a file, inspect it with \ifdefstring{\labboard}{beagleplay}{\code{aarch64-linux-gdb}}{\code{arm-linux-gdb}} on
 the host, set the \code{sysroot} setting, and then generate
 a backtrace to see where the program crashed.
 
diff --git a/mk/embedded-linux-beagleplay.mk b/mk/embedded-linux-beagleplay.mk
index cf1f5ba5..a31bd6e8 100644
--- a/mk/embedded-linux-beagleplay.mk
+++ b/mk/embedded-linux-beagleplay.mk
@@ -60,3 +60,4 @@ EMBEDDED_LINUX_BEAGLEPLAY_LABS = setup \
 		sysdev-thirdparty-beagleplay \
 		sysdev-buildroot \
 		sysdev-system-integration \
+		sysdev-application-development-and-debugging




More information about the training-materials-updates mailing list