tobyjaffey/bus-ninja

Should mention TI Launchpad port somehow ;-)

Opened this issue · 6 comments

Once I got bus-ninja more or less working on Arduino, I proceeded to look if something like that is available for Launchpad, because I'd like to do experimentation/rapid prototyping with RF modules, and I have 1 Arduino and 1 Launchpad. Well, I immediately came to http://blog.hodgepig.org/2010/09/10/575/ by yourself ;-). I guess, it would be nice to mention that a Launchpad port/work-alike exists right at the http://blog.hodgepig.org/busninja/ , it would for sure add value. Also, could you please import Launchpad code to github?

Thanks!

Some update: Ubuntu from 11.10 provides gcc-msp430 in main repositories. However, I found that it's broken wrt to -Wl,--gc-sections - it garbage-collects too much, including main(), producing 200-something bytes stub. Once I figure that out and disabled that option, I was astonished to behold how poor code density for msp430 with its 16-bitness. Even after I commented out unused function, I couldn't fit it into Launchpad 1.4's 2K of flash. So, I had to get rid of all uint32's and tweak some parsing funcs to make it fit. Then, command line worked fine via USB on Linux. Didn't have header soldered yet, so didn't try SPI so far.

Ok, Ubuntu Oneiric indeed has that bug, which since was fixed upstream and in Ubuntu Precise. http://pfalcon-oe.blogspot.com/2012/03/developing-for-ti-launchpad-msp430.html may have more info.

Imported the code, if you'd like to make improvements.
https://github.com/jobytaffey/spi-explorer

Thanks, just wonder is something like bus-ninja-msp430 would be better ;-).

In the meantime, I confirm that with binutils-msp430 from Ubuntu Precise your original code builds and fits into msp430g2231 out of the box. The changes I described above would still be useful to save code space to add more functionality (e..g to merge i2c code).

One thing I however hit on the road is that UART in spi-explorer doesn't work in duplex mode. This manifests itself as being unable to copy&paste command to repeat it - you get garbage instead. Then I tried msp430 UART routines touted as "duplex" (e.g., from TI itself) and found that they have the same issue either (at least if built with mspgcc which seem to produce pretty poor code). So, I'm currently rewriting UART routines in asm.

Oh, btw, why I didn't want to haste with importing code myself - can you please elaborate on the license? (like, add corresponding file to the repo). GPL would work at least for me ;-)

ISC/Simplified BSD tobyjaffey/spi-explorer@2774b62
Share and enjoy.