# Programming MSP430G2553 with Raspberry Pi 2

So, i want to program a msp430g2553 microcontroller with raspberry pi 2. Since i don't want to use any IDE i would like to do it with clean C and terminal, without any external libraries like wiringPi etc. , just the microcontrollers one.

My questions are:

• Can i do this with common interfaces like I2C or SPI?
• Or should i use the JTAG interface to do this?

This is the first microcontroller that i am trying to program.I've seen that you can program an ATtiny85 with raspberry over SPI. Does all the microcontrollers have this functionalities or it is device specific.

• See also electronics.stackexchange.com/questions/149704/… : this stuff is very device-specific. – pjc50 Mar 2 '16 at 11:31
• You mean directly instead of using a programmer via usb? – Passerby Mar 2 '16 at 11:35
• Yes, I want to do it directly without any external programmer device. Just by wiring the raspberry pi and the msp430. – Aleksander Dashov Mar 2 '16 at 11:40
• If mspdebug has been ported to the R-Pi, then I'd look at the EZ-430 or the G2553's Launchpad as a sub-\$10 adapter between USB and the MSP430's SBW interface (a 2-wire subset of JTAG). – Brian Drummond Mar 2 '16 at 14:54

msp430-gcc -Wall -mmcu=msp430g2553 -o foo.elf some.c files.c and.c headers.h

This requires the packets msp430-gcc,-binutils,-mcu,-libc and python-msp430-tools to be installed. You will need to connect RST and TEST lines to DTR and RTS as described in slau319 or this related answer.