How-to manual Installing a toolchain for Cortex-M3/STM32 on Ubuntu
How-to manual Installing a toolchain for Cortex-M3/STM32 on Ubuntu
How-to manual Installing a toolchain for Cortex-M3/STM32 on Ubuntu
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
C<strong>on</strong>tents<br />
1 About................................................................4<br />
2 Hardware..........................................................4<br />
3 Software...........................................................4<br />
4 Basic <str<strong>on</strong>g>to</str<strong>on</strong>g>ols........................................................5<br />
4.1 OpenOCD.................................................5<br />
4.1.1 Download, build and install.............5<br />
4.1.2 Install JTAG device..........................6<br />
4.1.3 C<strong>on</strong>figure..........................................7<br />
4.2 Serial bootloader....................................10<br />
4.2.1 stm32flash......................................10<br />
4.2.2 Flash loader dem<strong>on</strong>stra<str<strong>on</strong>g>to</str<strong>on</strong>g>r..............10<br />
4.3 GCC <str<strong>on</strong>g>to</str<strong>on</strong>g>olchain........................................11<br />
4.3.1 Download.......................................11<br />
4.3.2 Installati<strong>on</strong>......................................11<br />
5 Basic projects.................................................12<br />
5.1 0001_Test_Blink....................................12<br />
5.1.1 Compile..........................................12<br />
5.1.2 Flash and run..................................14<br />
5.1.3 Debug.............................................14<br />
5.1.4 Make & Flash.................................15<br />
5.2 0002_Test_Template..............................17<br />
5.2.1 Librarys..........................................17<br />
5.2.1.1 Install StdPeriph_Lib_V3.5.0. 17<br />
5.2.1.2 Install USB library and<br />
StdPeriph_Lib_V3.6.1.........................17<br />
5.2.1.3 C<strong>on</strong>tent....................................18<br />
5.2.2 Basic Makefiles..............................18<br />
5.2.2.1 Comm<strong>on</strong> Makefile..................18<br />
5.2.2.2 Libs Makefile..........................19<br />
5.2.3 Linker Script...................................20<br />
5.2.4 Startup Code...................................23<br />
5.2.5 Final steps.......................................27<br />
5.2.5.1 Source main.c.........................27<br />
5.2.5.2 Source Makefile......................28<br />
5.2.5.3 Final Makefile.........................28<br />
5.2.6 Build project...................................29<br />
5.2.7 Flash, run and debug......................29<br />
6 Additi<strong>on</strong>al Tools.............................................30<br />
6.1 Doxygen.................................................30<br />
6.2 Git...........................................................30<br />
6.3 Terminal emulati<strong>on</strong>................................30<br />
7 IDE.................................................................31<br />
7.1 Eclipse....................................................31<br />
7.1.1 Install..............................................31<br />
7.1.2 Create project.................................32<br />
7.1.3 C<strong>on</strong>figure workspace......................32<br />
7.1.4 C<strong>on</strong>figure project............................32<br />
7.1.5 C<strong>on</strong>figure external <str<strong>on</strong>g>to</str<strong>on</strong>g>ols.................33<br />
7.1.6 C<strong>on</strong>figure debugger........................33<br />
7.1.6.1 Hardware reset........................33<br />
7.1.6.2 Software reset.........................34<br />
7.1.7 First steps........................................34<br />
7.1.8 Hints...............................................35<br />
8 Bugs and Workarounds..................................35<br />
8.1 GCC <str<strong>on</strong>g>to</str<strong>on</strong>g>olchain........................................35<br />
8.2 IDE -eclipse............................................35<br />
9 To do's............................................................36<br />
10 Credits and Reference..................................36<br />
11 Revisi<strong>on</strong> his<str<strong>on</strong>g>to</str<strong>on</strong>g>ry...........................................36<br />
12 Appendix......................................................37<br />
12.1 <str<strong>on</strong>g>Cortex</str<strong>on</strong>g>-<str<strong>on</strong>g>M3</str<strong>on</strong>g>............................................37<br />
12.1.1 Intro's............................................37<br />
12.1.2 Architecture..................................37<br />
12.1.3 MCU ............................................37<br />
12.2 Links.....................................................38<br />
Page 3 of 38