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.

  • 1
    \$\begingroup\$ See also electronics.stackexchange.com/questions/149704/… : this stuff is very device-specific. \$\endgroup\$
    – pjc50
    Mar 2, 2016 at 11:31
  • \$\begingroup\$ You mean directly instead of using a programmer via usb? \$\endgroup\$
    – Passerby
    Mar 2, 2016 at 11:35
  • \$\begingroup\$ Yes, I want to do it directly without any external programmer device. Just by wiring the raspberry pi and the msp430. \$\endgroup\$ Mar 2, 2016 at 11:40
  • 1
    \$\begingroup\$ 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). \$\endgroup\$
    – user16324
    Mar 2, 2016 at 14:54

1 Answer 1


You can flash it via serial port, as @pjc50 suggested. Here is a part of a makefile I used for a msp430 project:

msp430-gcc -Wall -mmcu=msp430g2553 -o foo.elf some.c files.c and.c headers.h
msp430-objcopy -O ihex foo.elf foo.hex
msp430-objdump -DS foo.elf > foo.lst    # produces an assembler listing, optional
python2 -m msp430.bsl.uart -e -p /dev/ttyUSB0 -PV foo.hex -r

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.