[bootlin/training-materials updates] master: buildroot: put stm32 stuff into common (7b194f34)

Clément Léger clement.leger at bootlin.com
Thu Oct 13 11:56:05 CEST 2022


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

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

commit 7b194f34091b223e941ef6a7daf91d6033c11575
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Thu Oct 13 11:55:51 2022 +0200

    buildroot: put stm32 stuff into common
    
    This will be reused by the debugging labs.
    
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


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

7b194f34091b223e941ef6a7daf91d6033c11575
 common/stm32-prepare.tex                           | 43 +++++++++++++++++++++
 .../buildroot-basic-stm32.tex                      | 44 +---------------------
 2 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/common/stm32-prepare.tex b/common/stm32-prepare.tex
new file mode 100644
index 00000000..71c5a58f
--- /dev/null
+++ b/common/stm32-prepare.tex
@@ -0,0 +1,43 @@
+\section{Prepare the STM32MP1 Discovery Kit 1}
+
+The STM32M1 Discovery Kit 1 is powered via a USB-C cable, which you
+need to connect to the \code{CN6} (also labeled \code{PWR_IN})
+connector.
+
+In addition, to access the debug serial console, you need to use a
+micro-USB cable connected to the \code{CN11} (also labeled
+\code{ST-LINK}) connector.
+
+Once your micro-USB cable is connected, a \code{/dev/ttyACM0} device
+will apear on your PC. You can see this device appear by looking at
+the output of \code{dmesg} on your workstation.
+
+To communicate with the board through the serial port, install a
+serial communication program, such as \code{picocom}:
+
+\begin{bashinput}
+sudo apt install picocom
+\end{bashinput}
+
+If you run \code{ls -l /dev/ttyACM0}, you can also see that only
+\code{root} and users belonging to the \code{dialout} group have read
+and write access to this file. Therefore, you need to add your user to
+the \code{dialout} group:
+
+\begin{bashinput}
+sudo adduser $USER dialout
+\end{bashinput}
+
+{\bf Important}: for the group change to be effective, in Ubuntu 18.04, you have to
+{\em completely reboot} the system \footnote{As explained on
+\url{https://askubuntu.com/questions/1045993/after-adding-a-group-logoutlogin-is-not-enough-in-18-04/}.}.
+A workaround is to run \code{newgrp dialout}, but it is not global.
+You have to run it in each terminal.
+
+Now, you can run \code{picocom -b 115200 /dev/ttyACM0}, to start
+serial communication on \code{/dev/ttyACM0}, with a baudrate of
+\code{115200}. If you wish to exit \code{picocom}, press
+\code{[Ctrl][a]} followed by \code{[Ctrl][x]}.
+
+There should be nothing on the serial line so far, as the board is not
+powered up yet.
diff --git a/labs/buildroot-basic-stm32/buildroot-basic-stm32.tex b/labs/buildroot-basic-stm32/buildroot-basic-stm32.tex
index 520bad46..61e8bf79 100644
--- a/labs/buildroot-basic-stm32/buildroot-basic-stm32.tex
+++ b/labs/buildroot-basic-stm32/buildroot-basic-stm32.tex
@@ -266,49 +266,7 @@ make 2>&1 | tee build.log
 While the build is on-going, please go through the following sections
 to prepare what will be needed to test the build results.
 
-\section{Prepare the STM32MP1 Discovery Kit 1}
-
-The STM32M1 Discovery Kit 1 is powered via a USB-C cable, which you
-need to connect to the \code{CN6} (also labeled \code{PWR_IN})
-connector.
-
-In addition, to access the debug serial console, you need to use a
-micro-USB cable connected to the \code{CN11} (also labeled
-\code{ST-LINK}) connector.
-
-Once your micro-USB cable is connected, a \code{/dev/ttyACM0} device
-will apear on your PC. You can see this device appear by looking at
-the output of \code{dmesg} on your workstation.
-
-To communicate with the board through the serial port, install a
-serial communication program, such as \code{picocom}:
-
-\begin{bashinput}
-sudo apt install picocom
-\end{bashinput}
-
-If you run \code{ls -l /dev/ttyACM0}, you can also see that only
-\code{root} and users belonging to the \code{dialout} group have read
-and write access to this file. Therefore, you need to add your user to
-the \code{dialout} group:
-
-\begin{bashinput}
-sudo adduser $USER dialout
-\end{bashinput}
-
-{\bf Important}: for the group change to be effective, in Ubuntu 18.04, you have to
-{\em completely reboot} the system \footnote{As explained on
-\url{https://askubuntu.com/questions/1045993/after-adding-a-group-logoutlogin-is-not-enough-in-18-04/}.}.
-A workaround is to run \code{newgrp dialout}, but it is not global.
-You have to run it in each terminal.
-
-Now, you can run \code{picocom -b 115200 /dev/ttyACM0}, to start
-serial communication on \code{/dev/ttyACM0}, with a baudrate of
-\code{115200}. If you wish to exit \code{picocom}, press
-\code{[Ctrl][a]} followed by \code{[Ctrl][x]}.
-
-There should be nothing on the serial line so far, as the board is not
-powered up yet.
+\input{../common/stm32-prepare.tex}
 
 \section{Preparing the SD card}
 




More information about the training-materials-updates mailing list