> No, the differences in the memory map are covered by the ld files. Only
> when the CPU core itself is different a recompile of the compiler would be
> required.
> 
> >dir  | build option |  core  |  hwmul
> ># -------+--------------+--------+--------
> >#  msp1  |   430x110    |  430*  |    - 
> >#  msp2  |   430x147    |  430*  |  16x16
> >#  msp3  |   430x2232   |   430  |    -
> >#  msp4  |   430x233    |   430  |  16x16
> >#  msp5  |   430x2416   |  430X  |    -
> >#  msp6  |   430x2616   |  430X  |  16x16
> >#  msp7  |   430x4783   |   430  |  32x32
> >#  msp8  |   430x47166  |  430X**|  32x32
> >
> >The section starts can also be specified to the compiler, to be passed to
> the linker with the -mtext=, -mdata= compiler options.
> 
> No, the compiler should not be bothered with the memory layout. That is a
> linker issue and should be controlled through the ld file.

So would changing the compiler option to --mmcu=msp[12345678] to select the 
correct code to compile fix that? This is quite an easy change in gcc.
 
> >> - 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.
> >
> >I don't see where to do this within the existing tool chain, Maybe only
> msp430-libc?
> >Also I don't see the need, all devices are initialized the same (if you
> have re-locatable code), 
> 
> The devices are not initialized the same since addresses of pheripherals
> seem to be different. If a device specific startup.S is used inside the
> user project, the msp430-libc can stay clean which I think is important
> since there are 8 different libc versions already.

This can be done now with the --nostartfiles if you want to do it like that, 
there is also for the linker -T script to specify the script if you want.

> >> - Have the user specify the proper ld file to the linker.
> >
> >The watchdog is enabled by PUC to timeout in SMCLK/32768, so could
> interrupt the BSS clear or DATA section copy, this should be made clear by
> the doco. 
> >
> >Where in the current code is the WDT disabled?
> >
> >Can we force all the device specific configuration into the msp430-libc,
> which is quite simple to re-compile?
> 
> In normal circumstance you want one libc and no reason to recompile it.
> Having several different libraries which do almost the same is a very bad
> thing especially if you are working together with other programmers.
> 
> Another good reason the have starup.S inside the project is that the user
> can choose to modify startup.S and not disable the watchdog, but feed it
> during clearing of bss.

This can be done now by pasting the bits of the startup secions from 
msp430-libc into one startup.S file.

So about all that I can see to be done is

1. Maybe make it so --mmcu=msp[12345678] can be specified to the compiler. And 
make a default linker file for each of these.

2. Simplify the gcrt0.S, making one for each msp configuration (although maybe 
this is not needed, and the same could be used for all msp's, need to check)

3. Document the --nostartfiles and -T script option to the linker.

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