STM32 dev the easy way
A while ago I bought an STM32 dev board from China on eBay, as it seemed to have so much more than the official Discovery boards coming with:
- A 2.4″ LCD with touch screen input
- 4 Pushbuttons (and a Reset button)
- 4 LEDs
- 2 Variable resistors
- A Micro SD slot
- A buzzer
- 2 USB sockets
- A whole bunch of GPIO pins
In sum a whole bunch of awesome stuff. Sadly sometimes when things look too good to be true they are. After waiting ages for it to arrive I discovered that most of the documentation was in Chinese. It ran a pretty little demo app, but I didn’t know where to start with programming it. I put it on the shelf in the hope that one day something would show up to help, though realistically I expect it to gather dust – maybe I’d have a go at using the LCD for another project.
Zizzle to the rescue
At the end of October I saw a piece on the Dangerous Prototypes blog ‘Tutorial: STM32 boards and TFT LCD touchscreens‘, which linked back to Zizzle’s ‘STM32 LCD touch screen demo‘. I downloaded the VirtualBox image containing the tools and sample code, but didn’t do anything with it as I didn’t feel like I had the time. I shouldn’t have worried; when I finally got around to trying it yesterday I was up and running in minutes – watching the YouTube guides and clicking along in my own virtual machine. Another few minutes and I had customised menus on the touch screen:
It was also pretty straightforward to get debug messages from printf into a console.
Why this works
Setting up tool chains for embedded devlopment is fiddly, but virtual machines make a great container for all of that effort. I’m now starting to wish that I’d had a go using a Linux VM for Andrei’s ‘STM32F3 Discovery + Eclipse + OpenOCD‘, but I thought it would be much harder to get USB devices working in the VM than it turned out to be (NB Andrei has since done a Windows version of his instructions).
Putting a complete tool chain in a VM image makes it super easy to get going with a dev board, especially when accompanied with good quality videos explaining how things work. Thanks Zizzle :)
Filed under: making | Leave a Comment
Tags: ebay, LCD, STM32, touch screen, VirtualBox, VM