My next step was to get my LaunchPad working with my Raspberry Pi via the USB port. After a bit of playing around and installing a few programs, I managed to get it to work. Below is how I got a program written, compiled and programmed onto the LaunchPad from the Raspberry Pi.
First you have to install a few programs with apt-get.
$sudo apt-get install binutils-msp430You might have to run
$sudo apt-get install gcc-msp430
$sudo apt-get install msp430mcu
$sudo apt-get install mspdebug
$sudo apt-get install msp430-libc
$sudo apt-get updatebefore installing the modules.
Next run mspdebug to make sure that there are no errors. If there are no errors type exit to close the debugger.
$sudo mspdebug rf2500Now that you have everything installed, we need to create the program. I use nano text editor to write my program.
$sudo nano button_ISR.c
This program uses the two LED's and one push button on the LaunchPad. When the button is pressed, an interrupt is generated and then the LED's are toggled.
Close nano saving the changes.
The program then needs to be compiled.
$sudo msp430-gcc -mmcu=msp430g2553 -g -o BUTTON_ISR button_ISR.cThe program should compile without any errors and now you are able to run the debugger.
$sudo mspdebug rf2500Now program the device
prog BUTTON_ISRand run the program
runCTRL+c will stop the program running and exit will close the debugger.
In the next post I will show you how to communicate between the TI LaunchPad and Raspberry Pi via hardware UART and the USB connection.
Greg