Just a wild guess based on the "z1" below: If you're using the Zolertia Z1
device, I believe the compiler they use is an mspgcc3 fork with support for
20-bit addresses.  If that's getting invoked at any point, you would see
relocation errors like this: mainline mspgcc does not support 20-bit
addresses.  Stick with their compiler for everything.

If you're not using the Z1, never mind.

Peter

On Wed, Jun 29, 2011 at 5:14 PM, Sergio Campamá <sergiocamp...@gmail.com>wrote:

> Hello,
>
> I am building a quite complex c program for the msp430, and when linking, I
> get a "warning: internal error: unsupported relocation error" in some, not
> all, obj files. The weird thing is that it generates an output elf file,
> but
> when loaded, it does nothing. Has anyone stumbled before with this thing?
>
> It mainly happens when there's some kind of pointer, like a function
> pointer
> or a regular pointer.
>
> As an example, this code
>
> void (*button_callback_1)() = NULL; //button callback is 0 by default
>
> void button_process_interrupt(uint8_t button)
> {
>    switch(button)
>    {
>        case BUTTON_1:
>            if (button_callback_1 != NULL) button_callback_1();
>            break;
>    }
> }
>
> void button_interrupt(uint8_t button)
> {
>    task_add(&button_process_interrupt, TASK_PRIORITY_LOW, button);
> }
>
> void button_register_callback_1(void (*callback)())
> {
>    button_callback_1 = callback;
> }
>
> generates the following errors:
>
> obj_z1/button.obj: In function `button_process_interrupt':
> button.c:(.text+0x8): warning: internal error: unsupported relocation error
> obj_z1/button.obj: In function `button_register_callback_1':
> button.c:(.text+0x48): warning: internal error: unsupported relocation
> error
>
> What could be happening? I didn't want to file a bug report until being
> sure
> this is a bug.
>
> Thanks for any help I can get. Best regards,
>
> --
> --------------------------------------
> Sergio Campamá
> sergiocamp...@gmail.com
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to