On Mon, 08 Dec 2014 14:33:15 +0000 Nicholas Clifton <ni...@redhat.com> wrote:
> ... > Previously there was an implicit > assumption that the executable would be stored in the ROM of the > system and that at program startup there would have to be an explicit > copying of data from the ROM image into RAM. With the current linker > scripts there is an assumption that the executable is stored > externally, and it is brought into system memory before execution > begins. With this scenario there is no need to copy data between ROM > and RAM as the data is just loaded directly into RAM. > The weird thing here is, that although the .data segment holding static initialization for global variables is being loaded into RAM (such implying some sort of external loading mechanism) the .text and .rodata segments containing program code and constants are still stored in the ROM segments. Having data in RAM would make sense under the premise that program code is also stored volatile and loaded into memory my means of a debugger, another program or other external means. (afaik one of the advertised features of the new toolchain version is execution from RAM on msp430, isn't it?) But since the default linker file still have their code in ROM that would mean 1 either the program is stored externally, but then it would have to flash/erase/overwrite the ROM section as well as copy its initialization data to RAM in order to execute - that makes no sense 2 or the program is stored in ROM to begin with, but then it needs to magically have its RAM contents appear out of thin air after any sort of reset - that also makes no sense 3 or its simply silently assumed that static initialization of global variables is an unneeded feature no longer supported by msp430gcc - but even then the compiler would have to at least issue a warning whenever it encounters a thus rendered non-functional static variable assignment and not silently ignore it which causes countless of existing embedded applications to show undetermined behavior when executed to me the change to the TI linker scripts simply makes no sense cheers Eric -- Eric Price TTI GmbH - TGU Smartmote Pfaffenwaldring 4 D-70569 Stuttgart Tel.: +49 0711 - 6856 5369 Fax.: +49 0711 - 6856 6818 E-mail: pr...@smartmote.de Homepage: http://www.smartmote.de ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users