At 02:03 3-4-2009 -0700, you wrote:
>
>Hi Nico,
>
>Yep I would agree, its a mess, any plan no how to fix it? 

IMHO the steps are:
- compiler option for the CPU type. IIRC the differences between the
current devices (in respect to the instruction set) are the HW multiplier
and memory space.
- Remove the startup code from the C library and create a dedicated
startup.S for every device to keep things simple for starters. I guess this
could be automated.
- Have the user specify the proper ld file to the linker.


>----- Original Message ----
>> From: N. Coesel <[email protected]>
>> To: GCC for MSP430 - http://mspgcc.sf.net
<[email protected]>
>> Sent: Friday, 3 April, 2009 7:21:12 PM
>> Subject: Re: [Mspgcc-users] changes of the memory mapping for family x5xx
>> 
>> I've typed this before and I'll repeat it again: this issue again proves
>> that the close integration between processor families and the MSPGCC 
>> toolchain is a
>> bad idea. Most questions on this mailing list are about problems due to
this
>> close integration. IMHO the toolchain should have modes for architectural 
>> differences like
>> other GCC flavors have. This forces developers to 'tailor' the
>> toolchain to the controller they are using and eliminates questions about
>> 'unsupported' controllers. Also, initialisation of microcontroller 
>> pheripherals
>> shouldn't be done inside a C library at all. The low level initialisation 
>> should setup the stack, clear the RAM and jump to main. Have the developer 
>> choose what gets initialized and how. That's how its done on other 
>> architectures and probably for a good reason.
>> 
>> Nico Coesel
>> 
>> ----- Original Message ----- 
>> From: "Roberto Padovani" 
>> To: "GCC for MSP430 - http://mspgcc.sf.net";
>> 
>> Sent: Friday, April 03, 2009 9:01 AM
>> Subject: [Mspgcc-users] changes of the memory mapping for family x5xx
>> 
>> 
>> > Hi all,
>> >
>> > 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.
>> >
>> > R#
>> >
>> >
------------------------------------------------------------------------------
>> > _______________________________________________
>> > Mspgcc-users mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>> >
>> 
>> 
>>
------------------------------------------------------------------------------
>> _______________________________________________
>> Mspgcc-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
>
>      Yahoo!7 recommends that you update your browser to the new Internet
Explorer 8.Get it now.
>
>---------------------------------------------------------------------------
---
>_______________________________________________
>Mspgcc-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>

Reply via email to