Chips msp430

From DiLab
Jump to: navigation, search


MSP430 MCU GCC toolchain can be found here:

To install it for Ubuntu 11.10 or higher:
sudo apt-get install gcc-msp430
You might also be interested in these debugger packages:
sudo apt-get install gdb-msp430 mspdebug


The documentation supplied with mspgcc is very comprehensive and describes the MCU in great detail. Can be found here This could be very good introductory material for this MCU.


Tmote Sky sensor module is equipped with MSP430 F1611 MCU. According to mspgcc docs on how to decode MSP430 part numbers (

F1611 - stands for:

  • F - Flash ROM,
  • 16xx - Like 14x, but adding 2xDAC12, 3xDMA, brownout reset and I2C,
  • xx11 - 48K ROM, 10K RAM

Manufacturers page for this MCU -

Key documents about this MCU:

Software Notes

Word align requirement

Msp430 is a 16-bit processor. Note, that it requires certain 16-bit register and memory transfer operation source also to be 16-bit word aligned in the memory. I.e., the address must be divisible by 2.

In some cases automatic word-alignment of 16-bit words might create unexpected surprises. For example, the following structure is really 10 bytes long, instead of 8. This might hurt you if you try to fit it with a packet that has less than 10 bytes for the payload space.

   struct {
       uint16_t w1;
       uint8_t  b1;
       uint16_t w2;
       uint8_t  b2;
       uint16_t w3;

If you don't want that to happen, use __attribute__((packed)). With it correct (but slower!) code will be generated for accessing unaligned member variables.

So, watch out!