On a whim I went out and added a STM32F3-Discovery Development board to a rs-online order. The board contains an STM32F303 ARM-Coretex M4 processor capable of ~70MHz and has four  5 MSPS ADCs, 12 Fast DACs, hardware DSP and FPU; making it an ideal candidate for building a software defined radio. Although before I could get to that I had to setup the tools needed to actually program the thing. Having never programmed an ARM chip before (well not bare metal anyway). Here are the steps that I went through to get it working. Most of which are taken from articles published here: http://engineering-diy.blogspot.com.au/2012/11/stm32f3-discovery-eclipse-openocd.html . I’m just collating them all together for reference.

Before we get into it, there are two tool chains one proprietary tool chain that is less well featured but slightly simpler to install and a free and open-source tool chain that has everything working and requires a little more effort to get going. I opted for the GCC tool chain as it was the only one which the FPU worked in.

So here are the steps (Some details are omitted for the minute)

  1. Install Eclipse, either through apt or the website. Make sure you get the one for C/C++ development or you might be missing bits.
  2. Install openOCD. I used the version in ubuntu 13.10 it seemed to work pretty well.
  3. Install GDB hardware debugging into Eclipse. Using the Eclipse package manger
  4. Get the gcc-arm-eabi tool chain addition for eclipse and add that to eclipse. It can be found here:  http://sourceforge.net/projects/gnuarmeclipse/
  5. Add this PPA: sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  6. Edit /etc/apt/sources.list.d/terry_guo-gcc-arm-embedded-saucy.list swapping sauce for ringtail. You will also need to uncomment the src line and comment out the binary package repository.
  7. sudo apt-get update
  8. sudo apt-get install apt-src
  9. sudo apt-src install gcc-arm-none-eabi
  10. sudo apt-get remove texinfo
  11. wget http://launchpadlibrarian.net/125194117/texinfo_4.13a.dfsg.1-10ubuntu4_amd64.deb
  12. dpgk -i texinfo_4.13a.dfsg.1-10ubuntu4_amd64.deb
  13. cd gcc-arm-none-eabi-4-8-2013q4
  14. fakeroot ./debian/rules binary
  15. sudo dpkg -i ../gcc-arm-none-eabi_4-8-2013q4-0raring9_amd64.deb

Then everything should be setup ready to go.

I’ll add a section in about testing it all once I’ve finished setting it up myself and testing it.