This will be more of a collector of observations and notes than anything actually useful or productive. I want to document these things so I’ll remember them. They may even be useful outside of my office. Who knows?
Regardless, here we go…
August 3, 2014
After getting excited by the thought of a full IDE for Launchpad development (I’m not usually an IDE guy, but they do come in handy when learning/debugging), I decided to install Code Composer Studio v.6 (CCS) on my Xubuntu MacBook. A few things:
The installer that you download from TI is a .bin file that must be made executable (chmod +x ccs_blahblahblah.bin) and then run to install CCS. You run the installer using sudo if it needs to go in for all users; otherwise, just run it as a regular user to install for just that user. I did the former thinking it was how it had to go in. Nope. If you do one and then decide to do the other instead, there is an uninstall_ccs script in the [ccs_root_dir]/ccsv6 directory. I may be off on the path, but it’s something like that.
Not long into part 2 of the Getting Started with the MSP430 workshop, I hit a snag: after building a hex file and before going into the debugger, CCS informed me that no “FET” could be found. No amount of jumper twiddling or driver installing fixed this. Reports on the Internet indicate that this is a known issue on Linux. Perturbed, I uninstalled CCS and decided to use what other Linux/MSP430 users endorse: MSPDebug. So I installed it on Linux, then I shut down and installed it on my MacBook Pro because why not. I use the MBP more than any other ‘puter and without CCS there’s no Windows-or-Linux limitation.
Turns out MSPDebug is already on my MBP because the first thing I did when I got my first Launchpad was install Energia, the fork of the Wiring/Arduino IDE that was customized for Launchpads. It’s buried in the /Application/Energia.app/blahblahblah subfolders but it is there. Seems a bit much to dig that deep just for MSPDebug, though, so Homebrew to the rescue:
brew install mspdebug
Sorted! We’re in business! I’ll use Energia to compile because it has mspgcc unless I’m mistaken, then for hardcore debugging I’ll switch to mspdebug rf2500 and be happy (rf2500 is the driver that the Launchpad’s built-in USB emulator requires).
Looks like MSPDebug is more than just a debugger, it can erase and flash the MSP430 as well like avrdude for AVRs. Too damn cool. I like command line power.
Did I say I’ll use Energia? Because I think I’d like to go full commando and use mspgcc instead if possible. I’d have to dig through Energia’s app tree to get to it, and even then compilation would probably fail. Homebrew to the rescue again:
brew tap wbennett/homebrew-mspgcc
brew install wbennett/mspgcc/msp430-binutils
brew install wbennett/mspgcc/msp430-gcc
brew install wbennett/mspgcc/msp430-libc
brew install wbennett/mspgcc/msp430-gdb
This is progress. Options are good. Dark chocolate is also good but options are good.
Only one thing could elevate this from good to awesome: having it work, like, at all. It looks like Homebrew’s msp430-gcc does not take the MCU from its -mmcu parameter and correctly forward it to msp430-ld. This leads to a memory.x linker script not being found, which then leads to failure and lots of desk biting.
Homebrew did not rescue me after all. Tomorrow, we try something else.
August 9, 2014
So, yeah, “tomorrow” was 6 days long. My bad.
Got rid of all the Homebrew stuff. I probably shouldn’t have done that, and I’ll probably bring it back just to satisfy my curiosity, but here we are. I left the installed version of mspdebug alone.
Installed mspgcc via osx-launchpad. It’s older than the version that installed with Homebrew (gcc 4.5 vs gcc 4.7). This time, we got some joy. I built and flashed a simple blink.c routine that I snagged from Al Gore’s Information Superhighway. The following commands were used:
msp430-gcc -mmcu=msp430g2533 -g -o blink.elf blink.c mspdebug rf2500 prog blink.elf
The last command is executed within mspdebug. Perhaps there’s a way to pass it on the command line. We’ll see.
I also installed mspgcc on my Windows laptop via Cygwin. What a beast. My fault, of course, as I installed the complete “devel” suite. Still, BEAST. I haven’t gotten around to testing it. Now that I have something going on my MacBook, I can stop dinking with Windows, at least for a while.
More updates as they come in…