-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathquickstart.html
More file actions
431 lines (312 loc) · 22.5 KB
/
quickstart.html
File metadata and controls
431 lines (312 loc) · 22.5 KB
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2. Quick start — Wookey 0.9.0 documentation</title>
<link rel="shortcut icon" href="_static/wookey.ico"/>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="3. Demo examples" href="demo.html" />
<link rel="prev" title="1. WooKey project" href="target.html" />
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> Wookey
<img src="_static/wookey_w.png" class="logo" alt="Logo"/>
</a>
<div class="version">
0.9
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Table of Contents</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="target.html">1. About the WooKey project</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Quickstart</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#pre-requisites">2.1. Pre-requisites</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#install-the-dependencies">2.1.1. Install the dependencies</a></li>
<li class="toctree-l3"><a class="reference internal" href="#fetch-the-project-files">2.1.2. Fetch the project files</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#build-the-firmware">2.2. Build the firmware</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#set-the-environment">2.2.1. Set the environment</a></li>
<li class="toctree-l3"><a class="reference internal" href="#configuration">2.2.2. Configuration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#build-the-binary-files">2.2.3. Build the binary files</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#flash-the-firmware">2.3. Flash the firmware</a></li>
<li class="toctree-l2"><a class="reference internal" href="#execute-the-new-firmware">2.4. Execute the new firmware</a></li>
<li class="toctree-l2"><a class="reference internal" href="#debug">2.5. Debug</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#read-the-usart-with-minicom">2.5.1. Read the USART with <em>minicom</em></a></li>
<li class="toctree-l3"><a class="reference internal" href="#debug-with-gdb">2.5.2. Debug with <em>gdb</em></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#going-further">2.6. Going further</a></li>
<li class="toctree-l2"><a class="reference internal" href="#troubleshooting">2.7. Troubleshooting</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="demo.html">3. Demo applications</a></li>
<li class="toctree-l1"><a class="reference internal" href="architecture.html">4. Wookey architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="ewok/index.html">5. EwoK kernel</a></li>
<li class="toctree-l1"><a class="reference internal" href="libs.html">6. Libraries</a></li>
<li class="toctree-l1"><a class="reference internal" href="drivers.html">7. Drivers</a></li>
<li class="toctree-l1"><a class="reference internal" href="javacard/index.html">8. Javacard Applets</a></li>
<li class="toctree-l1"><a class="reference internal" href="tataouine.html">9. Tataouine SDK</a></li>
<li class="toctree-l1"><a class="reference internal" href="hard.html">10. Hardware</a></li>
<li class="toctree-l1"><a class="reference internal" href="publi.html">11. Publications</a></li>
<li class="toctree-l1"><a class="reference internal" href="roadmap.html">12. Roadmap</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Wookey</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>2. Quick start</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="quick-start">
<span id="quickstart"></span><h1><a class="toc-backref" href="#id1">2. Quick start</a><a class="headerlink" href="#quick-start" title="Permalink to this headline">¶</a></h1>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#quick-start" id="id1">Quick start</a><ul>
<li><a class="reference internal" href="#pre-requisites" id="id2">Pre-requisites</a><ul>
<li><a class="reference internal" href="#install-the-dependencies" id="id3">Install the dependencies</a></li>
<li><a class="reference internal" href="#fetch-the-project-files" id="id4">Fetch the project files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#build-the-firmware" id="id5">Build the firmware</a><ul>
<li><a class="reference internal" href="#set-the-environment" id="id6">Set the environment</a></li>
<li><a class="reference internal" href="#configuration" id="id7">Configuration</a></li>
<li><a class="reference internal" href="#build-the-binary-files" id="id8">Build the binary files</a></li>
</ul>
</li>
<li><a class="reference internal" href="#flash-the-firmware" id="id9">Flash the firmware</a></li>
<li><a class="reference internal" href="#execute-the-new-firmware" id="id10">Execute the new firmware</a></li>
<li><a class="reference internal" href="#debug" id="id11">Debug</a><ul>
<li><a class="reference internal" href="#read-the-usart-with-minicom" id="id12">Read the USART with <em>minicom</em></a></li>
<li><a class="reference internal" href="#debug-with-gdb" id="id13">Debug with <em>gdb</em></a></li>
</ul>
</li>
<li><a class="reference internal" href="#going-further" id="id14">Going further</a></li>
<li><a class="reference internal" href="#troubleshooting" id="id15">Troubleshooting</a></li>
</ul>
</li>
</ul>
</div>
<p>This section describes how to build and execute the ‘blinky’ demo
on a STM32F407 Discovery board. It summarises informations thoroughly detailed
here:</p>
<ul class="simple">
<li><a class="reference internal" href="tataouine/dependencies.html#dependencies"><span class="std std-ref">Dependencies</span></a></li>
<li><a class="reference internal" href="tataouine/build.html#build"><span class="std std-ref">Configuring and building a new firmware</span></a></li>
<li><a class="reference internal" href="tataouine/flash.html#flash"><span class="std std-ref">Flashing a new firmware</span></a></li>
</ul>
<div class="section" id="pre-requisites">
<h2><a class="toc-backref" href="#id2">2.1. Pre-requisites</a><a class="headerlink" href="#pre-requisites" title="Permalink to this headline">¶</a></h2>
<div class="section" id="install-the-dependencies">
<h3><a class="toc-backref" href="#id3">2.1.1. Install the dependencies</a><a class="headerlink" href="#install-the-dependencies" title="Permalink to this headline">¶</a></h3>
<p>To compile and to run the project, some dependencies need to be installed.
Please check the <a class="reference internal" href="tataouine/dependencies.html#dependencies"><span class="std std-ref">Dependencies</span></a> section to fetch them.</p>
</div>
<div class="section" id="fetch-the-project-files">
<h3><a class="toc-backref" href="#id4">2.1.2. Fetch the project files</a><a class="headerlink" href="#fetch-the-project-files" title="Permalink to this headline">¶</a></h3>
<p>Once the dependencies are installed, create a working directory and then fetch
the project with <code class="docutils literal notranslate"><span class="pre">repo</span></code></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="n">wookey</span>
<span class="n">cd</span> <span class="n">wookey</span>
<span class="n">repo</span> <span class="n">init</span> <span class="o">-</span><span class="n">u</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">wookey</span><span class="o">-</span><span class="n">project</span><span class="o">/</span><span class="n">manifest</span><span class="o">.</span><span class="n">git</span> <span class="o">-</span><span class="n">m</span> <span class="n">wookey</span><span class="o">.</span><span class="n">xml</span>
<span class="n">repo</span> <span class="n">sync</span>
</pre></div>
</div>
<p>For the discovery board, it is possible to test some basic apps with another
manifest file</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="n">disco407</span>
<span class="n">cd</span> <span class="n">disco407</span>
<span class="n">repo</span> <span class="n">init</span> <span class="o">-</span><span class="n">u</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">wookey</span><span class="o">-</span><span class="n">project</span><span class="o">/</span><span class="n">manifest</span><span class="o">.</span><span class="n">git</span> <span class="o">-</span><span class="n">m</span> <span class="n">disco407</span><span class="o">.</span><span class="n">xml</span>
<span class="n">repo</span> <span class="n">sync</span>
</pre></div>
</div>
<div class="admonition danger">
<p class="first admonition-title">Danger</p>
<p class="last">Nightly built versions are still unstable and are for developping purposes</p>
</div>
</div>
</div>
<div class="section" id="build-the-firmware">
<h2><a class="toc-backref" href="#id5">2.2. Build the firmware</a><a class="headerlink" href="#build-the-firmware" title="Permalink to this headline">¶</a></h2>
<div class="section" id="set-the-environment">
<h3><a class="toc-backref" href="#id6">2.2.1. Set the environment</a><a class="headerlink" href="#set-the-environment" title="Permalink to this headline">¶</a></h3>
<p>Set the needed environment variables by sourcing the <code class="docutils literal notranslate"><span class="pre">setenv.sh</span></code> script</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">.</span> <span class="n">setenv</span><span class="o">.</span><span class="n">sh</span>
</pre></div>
</div>
</div>
<div class="section" id="configuration">
<h3><a class="toc-backref" href="#id7">2.2.2. Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h3>
<p>List the predefined configuration profiles</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">defconfig_list</span>
</pre></div>
</div>
<p>To configure the Wookey board firmware, please use one of the following</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">boards</span><span class="o">/</span><span class="n">wookey</span><span class="o">/</span><span class="n">configs</span><span class="o">/</span><span class="n">wookey2_graphic_ada_hs_defconfig</span>
<span class="n">make</span> <span class="n">boards</span><span class="o">/</span><span class="n">wookey</span><span class="o">/</span><span class="n">configs</span><span class="o">/</span><span class="n">wookey2_production_defconfig</span>
</pre></div>
</div>
<div class="admonition hint">
<p class="first admonition-title">Hint</p>
<p class="last">During the Wookey project development, various revisions of the hardware
design have emerged. The current stable public version is refered to as wookey2.
Nonetheless, we still provide config files and sources compatible with the previous revisions.
Hence, if you use any hardware referenced upto wookey 1.4 on the board, use wookey prefixed defconfig instead (This will not be the case if you use the publicly available OpenHardwae design)</p>
</div>
<p>When using the Disco target, two demo examples are described in section <a class="reference internal" href="demo.html#demo"><span class="std std-ref">Demo examples</span></a>.
To build the <em>blinky</em> project, choose the <code class="docutils literal notranslate"><span class="pre">disco_blinky_ada_defconfig</span></code> profile</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">boards</span><span class="o">/</span><span class="mi">32</span><span class="n">f407disco</span><span class="o">/</span><span class="n">configs</span><span class="o">/</span><span class="n">disco_blinky_ada_defconfig</span>
</pre></div>
</div>
</div>
<div class="section" id="build-the-binary-files">
<h3><a class="toc-backref" href="#id8">2.2.3. Build the binary files</a><a class="headerlink" href="#build-the-binary-files" title="Permalink to this headline">¶</a></h3>
<p>Then, you can launch the compilation</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="flash-the-firmware">
<h2><a class="toc-backref" href="#id9">2.3. Flash the firmware</a><a class="headerlink" href="#flash-the-firmware" title="Permalink to this headline">¶</a></h2>
<p>Once the firmware is built, you can flash a target board using the procedure
described in <a class="reference internal" href="tataouine/flash.html#flash"><span class="std std-ref">Flashing a new firmware</span></a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">openocd</span> <span class="o">-</span><span class="n">f</span> <span class="n">tools</span><span class="o">/</span><span class="n">stm32f4disco1</span><span class="o">.</span><span class="n">cfg</span> <span class="o">-</span><span class="n">f</span> <span class="n">tools</span><span class="o">/</span><span class="n">ocd</span><span class="o">.</span><span class="n">cfg</span>
</pre></div>
</div>
<p>If you build the discovery board demo profile, use</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">openocd</span> <span class="o">-</span><span class="n">f</span> <span class="n">tools</span><span class="o">/</span><span class="n">stm32f4disco1</span><span class="o">.</span><span class="n">cfg</span> <span class="o">-</span><span class="n">f</span> <span class="n">tools</span><span class="o">/</span><span class="n">ocd_demo</span><span class="o">.</span><span class="n">cfg</span>
</pre></div>
</div>
</div>
<div class="section" id="execute-the-new-firmware">
<h2><a class="toc-backref" href="#id10">2.4. Execute the new firmware</a><a class="headerlink" href="#execute-the-new-firmware" title="Permalink to this headline">¶</a></h2>
<p>Press the black <em>reset button</em> to reset the board. You should see the
leds blinking. When the blue button is pressed, the blinking pattern changes.</p>
</div>
<div class="section" id="debug">
<h2><a class="toc-backref" href="#id11">2.5. Debug</a><a class="headerlink" href="#debug" title="Permalink to this headline">¶</a></h2>
<div class="section" id="read-the-usart-with-minicom">
<h3><a class="toc-backref" href="#id12">2.5.1. Read the USART with <em>minicom</em></a><a class="headerlink" href="#read-the-usart-with-minicom" title="Permalink to this headline">¶</a></h3>
<p>The demo examples are compiled with output traces sent to <strong>USART1</strong>.
This USART uses GPIOs <strong>PB6</strong> (TX, transmit) and <strong>PB7</strong> (RX, receive).
You can connect a USB-to-TTL converter to read those outputs from your host.
At least, you must connect the <strong>PB6</strong> pin to the receive part of the
USB-to-TTL converter.</p>
<p>On Linux, the device <code class="docutils literal notranslate"><span class="pre">/dev/ttyUSB0</span></code> should be automatically created after the
USB-to-TTL is succesfully connected.
Then, you can use <code class="docutils literal notranslate"><span class="pre">minicom</span></code> to read the messages from the USART and to have
some insight about what’s happening</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">minicom</span> <span class="o">-</span><span class="n">c</span> <span class="n">on</span> <span class="o">-</span><span class="n">D</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">ttyUSB0</span>
</pre></div>
</div>
</div>
<div class="section" id="debug-with-gdb">
<h3><a class="toc-backref" href="#id13">2.5.2. Debug with <em>gdb</em></a><a class="headerlink" href="#debug-with-gdb" title="Permalink to this headline">¶</a></h3>
<p>To debug the new firmware, launch <code class="docutils literal notranslate"><span class="pre">arm-eabi-gdb</span></code></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">arm</span><span class="o">-</span><span class="n">eabi</span><span class="o">-</span><span class="n">gdb</span>
</pre></div>
</div>
<p>Then, inside GDB, execute the following commands</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">target</span> <span class="n">extended</span><span class="o">-</span><span class="n">remote</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">:</span><span class="mi">3333</span>
<span class="n">mon</span> <span class="n">reset</span> <span class="n">halt</span>
<span class="n">symbol</span><span class="o">-</span><span class="n">file</span> <span class="n">build</span><span class="o">/</span><span class="n">armv7</span><span class="o">-</span><span class="n">m</span><span class="o">/</span><span class="mi">32</span><span class="n">f407discovery</span><span class="o">/</span><span class="n">kernel</span><span class="o">/</span><span class="n">kernel</span><span class="o">.</span><span class="n">fw1</span><span class="o">.</span><span class="n">elf</span>
<span class="n">b</span> <span class="n">main</span>
<span class="n">c</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="going-further">
<h2><a class="toc-backref" href="#id14">2.6. Going further</a><a class="headerlink" href="#going-further" title="Permalink to this headline">¶</a></h2>
<p>Read the <a class="reference internal" href="demo.html#demo"><span class="std std-ref">Demo examples</span></a> section that roughly describes the user code
executed by the tasks. You can adapt it to run your own examples.</p>
</div>
<div class="section" id="troubleshooting">
<h2><a class="toc-backref" href="#id15">2.7. Troubleshooting</a><a class="headerlink" href="#troubleshooting" title="Permalink to this headline">¶</a></h2>
<p>If you any problem while trying to build a new demo firmware, be sure that you
have carefully read the following:</p>
<ul class="simple">
<li><a class="reference internal" href="tataouine/dependencies.html#dependencies"><span class="std std-ref">Dependencies</span></a></li>
<li><a class="reference internal" href="tataouine/build.html#build"><span class="std std-ref">Configuring and building a new firmware</span></a></li>
<li><a class="reference internal" href="tataouine/flash.html#flash"><span class="std std-ref">Flashing a new firmware</span></a></li>
<li><a class="reference internal" href="tataouine/debug.html#debug"><span class="std std-ref">Debugging and logging</span></a></li>
</ul>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="demo.html" class="btn btn-neutral float-right" title="3. Demo examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="target.html" class="btn btn-neutral" title="1. WooKey project" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2019, ANSSI
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.9.0',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>