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)
- Install Eclipse, either through apt or the website. Make sure you get the one for C/C++ development or you might be missing bits.
- Install openOCD. I used the version in ubuntu 13.10 it seemed to work pretty well.
- Install GDB hardware debugging into Eclipse. Using the Eclipse package manger
- 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/
- Add this PPA: sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
- 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.
- sudo apt-get update
- sudo apt-get install apt-src
- sudo apt-src install gcc-arm-none-eabi
- sudo apt-get remove texinfo
- wget http://launchpadlibrarian.net/125194117/texinfo_4.13a.dfsg.1-10ubuntu4_amd64.deb
- dpgk -i texinfo_4.13a.dfsg.1-10ubuntu4_amd64.deb
- cd gcc-arm-none-eabi-4-8-2013q4
- fakeroot ./debian/rules binary
- 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.