mspgcc and C for the MSP430 FAQ


Table of Contents
Using C to program a small MCU produces slow bulky programs, doesn't it?
I still have resort to some assembly language for things like interrupt routines, and controlling the lower power modes, right?
I will still need to use some assembly language somewhere, won't I?
This thing is free, so it's second rate. Right?
Where's the IDE? Development tools are worthless without an IDE.
Without a IDE project manager it is a pain to compile code. What do I do?
But I know from the past that the GNU GCC compiler is not the world's most efficient. Right?
The mspgcc manual doesn't really describe the GNU tools. Why?
I've used the IAR compiler to program an MSP430, and it has a few nice features to access the special features of the MSP430. What does mspgcc have?
IAR provide a function to get a frame address of a function, allowing you more control. Does mspgcc have anything similar?
When I link my files with msp430-ld it keeps saying "undefined reference to `__stop_progExec__'". What's up?
I need to place a chunk of data in its own page in flash memory, so I can erase and reprogram that page without erasing anything else. How can I do that?
I want to jump from some arbitrary places to my exception handling code, to deal with fatal error conditions. Is it possible to do this with mspgcc?
I keep loosing communication with the target processor, when using msp430-gdbproxy and a FET tool. Is mspgcc buggy?
Some assembly language instructions seems to keep changing. Whats up?
I think I found a bug in mspgcc. What do I do?
I am getting link errors about missing multiply routines. What is wrong?
I have well tested code, developed with another compiler, that gives trouble with mspgcc. My main program changes a global variable OK. However, inside an interrupt routine, the variable appears to have a different value. If I change the variable in that interrupt and return, the variable sometimes reverts to its value before the interrupt occured. Is mspgcc buggy?

This FAQ discusses a range of common issues related to programming the MSP430. More specifically, to programming the MSP430 in C. Most specifically to programming the MSP430 using the mspgcc toolchain.

Using C to program a small MCU produces slow bulky programs, doesn't it?

You've been programming 8051s for too long. :-)

Seriously, an MCU like the MSP430 programs well in C. You can always beat the efficiency of any compiler if you try really hard in assembly language. However, you do have to make a real effort to get substantially better performance on good modern MCUs, not just the MSP430, when using a good C compiler.