gamersat678 1 Posted July 26, 2012 INTRODUCTION This guide's intent and purpose is to allow a user with minimal Linux experience to successfully setup an absolutely free development environment to program the STM32F0 microcontroller with full debugging capability. PREREQUISITES A Linux distro, I used Linux Mint 13 (Ubuntu works nicely too) An Internet connection At least 2gb of spare hard drive space Familiarity with terminal A STM32F0 Discovery Board! PART 1 – Install Codesourcy PART 2 – Install OpenOCD PART 3 – Install Eclipse PART 4 – Setup File Directory PART 5 – Setup Eclipse PART 6 – Configure the gdb/OpenOCD Hope you enjoy! Any questions, comments, feedback, feel free to sound off below.Also a STM32F4 guide is on its way. When it gets here depends on how much spare time I have.... Edit: Thanks bluehash! Guide is now hosted on arm-hq. v1-2 Downloads stm32f0_v2.doc 5 bluehash, Quiggers, OppaErich and 2 others reacted to this Share this post Link to post Share on other sites
bluehash 1,574 Posted July 26, 2012 Welcome to Arm-HQ gamer. I've bumped it to 2Mb.. you should be able to attach your guide here. Keep these coming and let other forums/people know too. Thanks! Share this post Link to post Share on other sites
OppaErich 25 Posted July 28, 2012 Dead end again. Part 4.9 Copy stm32f0-discovery-basic-template/board/ folder to... There is no board folder. oppa@siductionbox:~/git$ ls stm32f0-discovery-basic-template/ Device extra inc Libraries Makefile README.md src PART 6.1 Under Debug Configurations ensure your values match these There is no OpenOCD Debug oppa@siductionbox:~/git$ openocd -v Open On-Chip Debugger 0.5.0 (2011-08-09-08:45) Licensed under GNU GPL v2 For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html Share this post Link to post Share on other sites
gamersat678 1 Posted July 29, 2012 Errata: board folder does truly not exist. Was a leftover folder when I was trying to get everything working. Don't need it. Added a step to further clarify the creation of the custom run configuration OpenOCD Debug. Oppa hope this helps. 1 OppaErich reacted to this Share this post Link to post Share on other sites
OppaErich 25 Posted July 29, 2012 Oppa hope this helps. Thanks but nope. I'm using the Debian package of openocd and thought that may be the problem, so I tried to build openocd like you described but this is just another fail. oppa@siductionbox:~/git$ git clone http://repo.or.cz/r/openocd.git Cloning into 'openocd'... oppa@siductionbox:~/git$ ls openocd SimpleIDE-0-8-1 stlink stm32f0-discovery-basic-template oppa@siductionbox:~/git$ cd openocd oppa@siductionbox:~/git/openocd$ ls AUTHORS config_subdir.m4 guess-rev.sh NEWS-0.3.0 src AUTHORS.ChangeLog configure.ac HACKING NEWS-0.4.0 tcl bootstrap contrib jimtcl NEWS-0.5.0 testing BUGS COPYING Makefile.am NEWTAPS TODO ChangeLog doc NEWS README tools common.mk Doxyfile.in NEWS-0.2.0 README.Win32 uncrustify.cfg oppa@siductionbox:~/git/openocd$ ./configure --prefix=/usr --enable-maintainer-mode --enable-stlink^C bash: ./configure: Datei oder Verzeichnis nicht gefunden |-> file not found oppa@siductionbox:~/git/openocd$ ls doc fdl.texi INSTALL.txt Makefile.am manual openocd.1 openocd.texi oppa@siductionbox:~/git/openocd$ less doc/INSTALL.txt oppa@siductionbox:~/git/openocd$ less README oppa@siductionbox:~/git/openocd$ ./bootstrap + aclocal ./bootstrap: Zeile 27: aclocal: Kommando nicht gefunden. |-> command not found Share this post Link to post Share on other sites
OppaErich 25 Posted July 30, 2012 So, managed to get a bit further. To build openocd I had to install libusb-dev and automake. Now I've tried to compile the demo firmware of the STM32F0-Discovery board. Although stm32f0xx.h is there and even opened in eclipse: ../src/STM32F0-Discovery_FW_V1.0.0/Utilities/STM32F0-Discovery/stm32f0_discovery.h:38:23: fatal error: stm32f0xx.h: No such file or directory compilation terminated. I started debugging manually aaand: Open On-Chip Debugger 0.6.0-dev-00640-g40801d2 (2012-07-30-12:01) Licensed under GNU GPL v2 For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html Runtime Error: embedded:startup.tcl:47: Can't find ./boards/stm32f0discovery.cfg in procedure 'script' at file "embedded:startup.tcl", line 47 Edit: The last one was easy, the path is ./board/.. stm32f0xx not found was my fault, I forgot to add one iclude path. The next compiler run yelled core_cm0.h not found at me. I found it and added another include path. Now I get stm32f0xx_conf.h not found. Share this post Link to post Share on other sites
gamersat678 1 Posted July 31, 2012 Yep need the dev openocd as since v6 only includes stm32f0. No other version has it. Sorry for forgetting libusb-dev and automake. Those must have already been installed with my stm32f4 stlink installation. Make sure you have added the includes to both GNUC and assembly in step 5 part 4. Also make sure to "Copy stm32f0xx_conf.h from an example project in the STM32f0 firmware package to the Template/src/ folder" And you posted a screenshot of the debug configurations. Do you have a problem with configuring the debug configuration? Get any further? Share this post Link to post Share on other sites
OppaErich 25 Posted August 1, 2012 Well kinda, there are no more "xxx.h not found" but the demo from STM still does not build. Coocox seems to work for me but using windows sucks, sucks less than searching and adding include paths for hours though... Share this post Link to post Share on other sites
gamersat678 1 Posted August 5, 2012 What's the error message? With my guide there should be minimal folder/file movement and only 14 includes (7 GCC[4 workspace, 3 codesourcery], 7 Assem[4 workspace, 3 codesourcery]). Like I said, I was able to get it working in Linux, and I documented it along the way (guide=documentation). Share this post Link to post Share on other sites
memberXY 0 Posted February 5 hi, great tutorial! On 7/26/2012 at 2:30 AM, gamersat678 said: Edit: Thanks bluehash! Guide is now hosted on arm-hq can you provide us a link to the new location? thanks. Share this post Link to post Share on other sites