Hi, I downloaded the msp430-gcc from the TI homepage. There is an example program called blink.c. It is very short and very simple, as follows:
#include <msp430.h>
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1DIR |= 0x01; // Set P1.0 to output direction
for(;;) {
volatile unsigned int i; // volatile to prevent optimization
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
i = 10000; // SW Delay
do i--;
while(i != 0);
}
return 0;
}
That's all. The problem is that from this tiny program msp430-gcc produces a 13.1 kByte long .out file, although I used the -O3 switch and didn't use the -g switch on the compiler to produce the shortest code.
I want to program an MSP430F1132 which has only 8 kByte program memory. What can I do to make the output files shorter with msp430-gcc?
Stefan