Hi,

> in the new x5xx family a lot of the memory mapping of the peripherals
> has changed.
> In particular, the watchdog is now defined as:
> 
> #define __MSP430_WDT_A_BASE__   0x150           // msp430x54xx.h
> #define WDTCTL_             __MSP430_WDT_A_BASE__ + 0x0C  /* Watchdog
> timer control register */    // wdt_a.h
> 
> In the libgcc.S file there is:
> 
> #if defined(L__low_level_init)
> /*****************************************************************
> * Initialize peripherial, particularly disable watchdog
> * can be overwriten
> *****************************************************************/
>     .section .init3, "ax", @progbits
> 
>     .global    __low_level_init
>     .weak   __low_level_init
> 
>     .func   __low_level_init
> 
> __low_level_init:
>     mov     #0x5a80, &0x120
> 
>     .endfunc
> #endif
> 
> where the watchdog address 0x120 is hardcoded. This is correct for
> every MSP except for the newer x5xx family.
> Is there anyone knowing the internals of the GCC who can fix or
> suggest how to fix this ?
> Parametrizing would be best, maybe with two different __low_level_init
> functions that are linked against depending on the processor family.

One way to fix it might be like the __stack, __data_start_rom are done with the 
ldscripts, this would mean a fix in libgcc.S and the binutils ldscript builder

You could hand 'patch' this by changing the ldscripts your using.

Ill have a go at implementing it, any other idea?

Regards,

Peter Jansen



      Enjoy a safer web experience. Upgrade to the new Internet Explorer 8 
optimised for Yahoo!7. Get it now.

Reply via email to