[bootlin/training-materials updates] master: slides/buildroot-appdev: add slide about CMake toolchain file (22d36131)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat May 29 17:00:36 CEST 2021


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

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

commit 22d3613161bbfc70377758d361dfde9eb50f4b12
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date:   Thu May 20 21:19:26 2021 +0200

    slides/buildroot-appdev: add slide about CMake toolchain file
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>


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

22d3613161bbfc70377758d361dfde9eb50f4b12
 slides/buildroot-appdev/buildroot-appdev.tex | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/slides/buildroot-appdev/buildroot-appdev.tex b/slides/buildroot-appdev/buildroot-appdev.tex
index 46f58328..82f6c604 100644
--- a/slides/buildroot-appdev/buildroot-appdev.tex
+++ b/slides/buildroot-appdev/buildroot-appdev.tex
@@ -100,6 +100,27 @@ $ ./configure --host=arm-linux
   \end{itemize}
 \end{frame}
 
+\begin{frame}[fragile]{Building code for Buildroot: CMake}
+  \begin{itemize}
+  \item Buildroot generates a {\em CMake toolchain file}, installed in
+    \code{output/host/share/buildroot/toolchainfile.cmake}
+  \item Tells {\em CMake} which cross-compilation tools to use
+  \item Passed using the \code{CMAKE_TOOLCHAIN_FILE} {\em CMake} option
+  \item \url{https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html}
+  \item With this file, building {\em CMake} projects outside of
+    Buildroot is easy:
+    \begin{block}{}
+{\scriptsize
+\begin{verbatim}
+$ cmake -DCMAKE_TOOLCHAIN_FILE=.../buildroot/output/host/share/buildroot/toolchainfile.cmake .
+$ make
+$ file app
+app: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked...
+\end{verbatim}}
+\end{block}
+\end{itemize}
+\end{frame}
+
 \begin{frame}{Building during development}
   \begin{itemize}
   \item Buildroot is mainly a {\em final integration} tool: it is




More information about the training-materials-updates mailing list