aboutsummaryrefslogtreecommitdiff
path: root/2019-installfest/nuttx-stm23/pres.tex
blob: 310acefcc359cc27f37046cec79763ad9c2a4006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
\documentclass[aspectratio=169]{beamer}
\usetheme{metropolis}
\usepackage{lmodern}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{color}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{epstopdf}
\usepackage{amsmath}
\usepackage{minted}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
}
\usepackage{pdflscape}
\definecolor{omnia}{rgb}{0, 0.635, 0.886}

\title{Nuttx na STM32}
\author{Karel Kočí}
\date{3.3.2018}

\begin{document}

\frame{\titlepage}

\begin{frame}[fragile]
	\frametitle{NuttX?}
	\includegraphics[width=60px]{NuttX_logo.png}
	\begin{itemize}
		\item RTOS pro 8-bit až 32-bit
		\item Vyvíjen Gregory Nuttem
		\item Poprvé vydán v roce 2007
		\item Posix a ANSI standardy + podobné API jako VxWorks
		\item Dobré vrstvení (arch, board, config, app / lower, upper drivers)
		\item Open-source
	\end{itemize}
	\url{https://nuttx.org}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Proč?}
	\begin{itemize}
		\item Posix a standardní API
		\item Jednotná implementace
		\item Velký výběr z driverů
		\item Easy to hack
		\item Dobře dokumentovaný kód
		\item Dobře konfigurovatelný
		\item Široká podpora architektur i prototypových desek
		\item Podpora ELF
	\end{itemize}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Na čem?}
	 \begin{columns}[T]
		 \begin{column}[T]{5cm}
			stm32f103-minimum

			(Blue Pill)
			\begin{itemize}
				\item STM32F103C8
				\item Flash: 64KB (128KB)
				\item RAM: 20KB
				\item Clock: 72MHz
				\item Micro-USB, LED
				\item Cena: \textasciitilde 50Kč
			\end{itemize}
		 \end{column}
		 \begin{column}[T]{5cm}
			\includegraphics[width=6cm]{STM32_Blue_Pill_perspective.jpg}
		 \end{column}
     \end{columns}
	 \vspace{0.5cm}

	\url{https://wiki.stm32duino.com/index.php?title=Blue_Pill}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Co potřebujeme?}
	\begin{itemize}
		\item Blue Pill
		\item ST-link (v2)
		\item USB to TTL (serial cable)
	\end{itemize}

	\begin{itemize}
		\item NuttX (\url{https://bitbucket.org/nuttx/nuttx})
		\item NuttX apps (\url{https://bitbucket.org/nuttx/apps})
		\item Kconfig (NuttX tools: \url{https://bitbucket.org/nuttx/tools})
		\item Toolchain: arm-none-eabi (\url{https://crosstool-ng.github.io/})
		\item OpenOCD
	\end{itemize}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Clone me.. tool me..}
	\begin{verbatim}
git clone https://bitbucket.org/nuttx/nuttx
git clone https://bitbucket.org/nuttx/apps
git clone https://bitbucket.org/nuttx/tools
\end{verbatim}

	\begin{verbatim}
cd tools/kconfig-frontends
autoreconf -fi
./configure --disable-shared --enable-static \
	--enable-frontends=kconf,conf,mconf \
	--prefix=$HOME/.local 
make install
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Konfigurace a build}
	\begin{enumerate}
		\item Vygeneruj výchozí konfiguraci
		\item Použij mconf pro doladění
	\end{enumerate}

	\begin{verbatim}
./tools/configure.sh stm32f103-minimum/nsh
make menuconfig
\end{verbatim}

	\begin{verbatim}
make -j$(nproc)
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Nahrání do pilulky}

	\begin{verbatim}
openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg \
	-f /usr/share/openocd/scripts/target/stm32f1x.cfg

telnet localhost 4444
> reset halt
> program nuttx.bin 0x08000000 verify
> reset run
\end{verbatim}

	\begin{verbatim}
NuttShell (NSH)
nsh> 
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Vlastní aplikace}
	Přečtěte si: apps/README.txt (Předvedu třetí metodu)
\end{frame}

\begin{frame}[fragile]
	\frametitle{Dokumentace k přečtení}
	\begin{enumerate}
		\item nuttx/configs/stm32f103-minimum/README.txt
		\item nuttx/Documentation/NuttxUserGuide.html
		\item nuttx/Documentation/NuttShell.html
		\item nuttx/Documentation/NuttxPortingGuide.html
	\end{enumerate}
\end{frame}

\begin{frame}
	\Large Děkuji za pozornost.

	\url{git.cynerd.cz}
\end{frame}

{
\setbeamercolor{background canvas}{bg=omnia}
\begin{frame}
	\pagecolor{yellow!30!orange}
	\center \color{white} \Huge play.turris.cz
\end{frame}
}

\end{document}