Ok, you faced with a problem when even number of static variables (bytes) 
defined.
This been fixed a while ago and if you rebuild msp430-libc, you get rid of 
this problem.
Alternatively, you can define a dummy char variable and have fun.

cheers,
~d


On Friday 05 December 2003 03:39, Christopher Sadler wrote:
> 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/
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

-- 
/*****************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild     UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  State Polytechnical Univ.
      (_Y_.)'  ._   )  `._ `. ``-..-'   Radio-Physics Departament
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,  Russia
   (il),-''  (li),'  ((!.-'             +7 (812) 5403923, 5585314
 *****************************************************************/


Reply via email to