Debugging the STM32F0-Discovery board with Nemiver
On GitHub there is a nice project template for the STM32F0-Discovery development board from STM:
I have added a debug target to the Makefile, now everything you have to do to debug your code on the hardware is to run:
[chris@thinkpad stm32f0-discovery-basic-template]$ make debug
Here are the results:
Here is my repository on GitHub which includes the modified Makefile and a debug_nemiver.sh script:
Tools to get it up and running under Linux:
- Any editor or IDE: QtCreator, Eclipse, Kate, vim, Netbeans, etc.
- GCC ARM Embedded Toolchain
- https://launchpad.net/gcc-arm-embedded/+download
- https://launchpad.net/gcc-arm-embedded/4.6/4.6-2012-q2-update/+download/gcc-arm-none-eabi-4_6-2012q2-20120614.tar.bz2
- Extract the archive and add it to the path, e.g. edit ~/.bashrc and add a line with the path to the extracted archive export PATH=$PATH:/home/chris/tools/gcc-arm-none-eabi-4_6-2012q2/bin
- Alternatives
- For flashing and debuging:
- https://github.com/texane/stlink
- Clone the Git repository and copy the udev rules to /etc/udev/rules.d:
- sudo cp 49-stlinkv* /etc/udev/rules.d
- sudo udevadm control --reload-rules
- Clone the Git repository and copy the udev rules to /etc/udev/rules.d:
- OpenOCD (install it from the Git repository git://git.code.sf.net/p/openocd/code, following https://github.com/christianjann/microcli-stm32f0-discovery#loading-the-image-on-the-board)
- Nemiver: http://projects.gnome.org/nemiver/
- https://github.com/texane/stlink
Future reading: Using nemiver for remote debugging on ARM microcontrollers.