Wednesday 15 October 2008

First steps with STM32

A while ago, a contractor who was working with us mentioned this eval kit called the STM32 Primer as a way to get started with ARM CPUs, I duly ordered a couple of them (they're only around £25, and it's always handy to have a spare!). When they turned up, I plugged one in and played the little Pac-Man game that came installed - not bad. Then I looked at the sample C code that came with the dev kit, baulked and promptly put them away and forgot about them. Bear in mind that I have, for some reason, always preferred programming micros (both PIC and AVR) in assembler, this seemed way too complicated. Now, what with the nights drawing in and the weather getting wetter, I decided to get them off the shelf, and discipline myself to get them doing something. After a bit of scrabbling round for reference docs, I was pleasantly surprised that they aren't actually that bad and have even started writing some code to control an LED array (more on this when it's nearer completion). So If, like me you're a bit of a stickler for assembler for your micros, I'd recommend giving these, or any one of the many microcontroller C compilers a try, I think you'll be impressed.

For starters, of course there's the RIDE 7 IDE, which drives the GNU C compiler for STM32, a minimal, but useable version of this comes with the STM32 Primer.

If you like working with AVRs, there's the open source WinAVR - a windows port of the GNU C compiler for AVR.

For PICs, there are also GCC ports, but I've never used them so can't quote any off the top of my head. However, one commercial one, the trial of which I've used briefly, called Mikro C. It does a good job, and makes all the USB features in the PIC18F2550 (for example) much easier to implement.

If you fancy programming PICs and AVRs in BASIC, Vladimir Soso has written pretty damn good compilers and simulators for both these architectures (virtual peripherals, like LCDs, LEDs, switches and scopes are included). I use these myself, and would wholeheartdly recommend them. You can find his site here.

Okay, that's it for the techy stuff here. Have fun!