At 19:28 4-4-2009 -0700, Peter Jansen wrote: > >Hi Nico, > > >> 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. > >One thing this does it force a re-compile the msp430-gcc whenever TI bring out a new device with different memory etc. What about specifing the processor group? eg from the t-msp430 file
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. >> - 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. >> - 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. Nico Coesel >--------------------------------------------------------------------------- --- >_______________________________________________ >Mspgcc-users mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/mspgcc-users > >
