Hi.  I have been playing with malloc on the msp430F149
chip to see how it behaves, but I am getting a strange
error when I attempt to compile the code.  The error
is:

/mspgcc/bin/../lib/gcc-lib/msp430/3.2.3/../../../../msp430/lib/msp2/libc.a(malloc.o)(.text+0x1e):
In function `malloc':
/cygdrive/c/mspgcc-source/msp430/msp430-libc/src/stdlib/malloc.c:21:
internal error: unsupported relocation error

I have stripped the program down to something that
simply allocates a block of memory and then lets the
WDT reboot the chip:

#include "msp430x14x.h"
#include <stdlib.h>
#include <string.h>

int main(void)
{
        char *sixty_four;       
        WDTCTL = WDTHOLD + WDTPW;
        sixty_four = (char *) malloc (64);      
        WDTCTL = WDTPW + WDTCNTCL + WDTSSEL;    
        for (;;);
        return 0;
}

I am running mspgcc through Cygwin on a Win XP
machine.  Does anyone know what I am doing wrong?

Thanks,

Chris Sadler


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Reply via email to