I’ve been working on some bits of software that’ll allow the firmware of an MSP430 to be updated via I2C. This will allow us to upgrade the firmware in all of the Student Robotics boards via the web. The firmware updates will be shipped out in the zip archives that our web-based IDE spits out when teams program their robots.
I got this mostly working in early September but I’ve only just got around to cleaning it up and making it usable. I’ve written a utility called “flashb” that, when configured correctly, just takes the name of the board to program and the two binaries necessary for the flashing. Here’s a demonstration screencast of it working:
In that video I’m loading new firmware into the JointIO board. I have an OSIF plugged into my laptop that is in turn connected to the JointIO board. I’ve reflashed this thing at least 50 times today without any failures, which bodes well for deployment.
“Why two binaries?” I hear you say. Each of these binaries only uses half of the MSP430’s flash. The two binaries contain the same code but one is linked to reside in the top half of flash and the other resides in the bottom half. Only one of these is executing at one particular time whilst the other can be overwritten with a later firmware version. I went for this approach for two reasons. Firstly, I’m new to writing bootloaders and so I decided to do something simple that could easily be slotted in with our existing code. Secondly, I had already written some of the code to do this for the Formica robots.
There’s still a lot of room for improvement, but I’ve almost achieved something that’s shippable. The code for the Formica robots was written so that they could gradually receive new firmware whilst still operating. Student Robotics doesn’t place this constraint on the bootloader. The firmware could stop operating and jump to a small bootloader, which would erase all flash except for itself. For now we’re not doing that. The time to consider that will be when we run into code size issues.
As with all of the Student Robotics code, the source for these things can be found in the Student Robotics subversion repository. The JointIO firmware can be grabbed by doing this:
svn co http://svn.srobo.org/boards/jointio/firmware/trunk/
Similarly, the flashb code can be accessed like so:
svn co http://svn.srobo.org/slug/utils/flashb/trunk/
I rebuilt the mspgcc packages for Fedora 10:
- msp430-binutils 2.18
- msp430-gcc 3.2.3
- msp430-libc (from CVS on 2008-08-28)
- msp430-gdb 6.8
- msp430-gdbproxy 0.7 (includes udev rule).
Once again, you’ll find the specfiles and source RPMs in the same directory.
You can install them all by running:
su -c "rpm -Uvh http://users.ecs.soton.ac.uk/rds/rpm/mspgcc/msp430-binutils-2.18-1.fc10.i386.rpm \ http://users.ecs.soton.ac.uk/rds/rpm/mspgcc/msp430-gcc-3.2.3-1.20080827cvs.fc10.i386.rpm \ http://users.ecs.soton.ac.uk/rds/rpm/mspgcc/msp430-libc-0-1.20080828cvs.fc10.noarch.rpm \ http://users.ecs.soton.ac.uk/rds/rpm/mspgcc/msp430-gdb-6.8-1.fc10.i386.rpm \ http://users.ecs.soton.ac.uk/rds/rpm/mspgcc/msp430-gdbproxy-0.7.1-1.fc10.i386.rpm"
Update (13/02/2009): msp430-binutils is now in Fedora (as I wrote in this post).
Site by Rob Gilton. © 2008 - 2019