Sunday, 30 November 2008

Servo Board V2 Firmware

I have spent today fighting gdb and gdb-proxy in an attempt to update the firmware for the PWM board (Servo board). I spent the first two hours going 'aargh' because msp430-gdb kept issuing me with missing data stack errors and empty symbol tables. Eventually from looking at last years code i was able to view work out what was wrong. Weirdly, adding a static variable into my code (which was only assigned to once) was enough to solve my problem, however this makes no sense why.

The reason the firmware needed upgrading is because we have put a beefier MSP micro-controller on the board, subsequently the board layout has changed. Once I got my head around both the motor controllers i2c routines and the old pwm firmware i began merging bits of code together. After a suitable amount of time, anger, coffee, realisation of how stupid i was being and more coffee, I managed to get the new board to seep all the servo pins back and forth, demonstrating that this part of the board works.

Enjoy the video - I did!




Some Photos:


The new servo board. The two LEDs indicate both power supplies are connected. The third LED which isn't illuminated, should be, however due to some primate-like soldering skills, there appears to be a short.


The servos in motion.


The MSP430 programmer. I mounted it on an old credit card to make the wiring a little more secure. Despite it looking horrible, it actually works surprisingly well. Honest.

3 comments:

Rob said...

Good work on getting it going :-)

"Weirdly, adding a static variable into my code (which was only assigned to once) was enough to solve my problem, however this makes no sense why."

This is a well known bug in msp430-gdb. Googling the error spewed by msp430-gdb tells you what to do (searching the mspgcc list using gmane will show you that 10^8 people have seen this before!).

Rob

Chris said...

Yeah, it was pretty well documented and once I googled it the answer dropped out pretty quick. Although at first I assumed that I'd done something stupid elsewhere :(.

Gavin said...

Glad you got it working - will have to pop round and see it in person sometime :) Gimme a shout when you need another primate for soldering ;)