At 10:27 15-04-05 +0200, you wrote: >Hi, > >> >> >i want to initialize unused flash with 0x00, 0xff >> >> >or another bit pattern. >> >> >How can i do this? >> >> > >> >> >> >> Depends on your upload procedure. >> > >> >that's the reason why i want the linker to do it because with different >> upload procedures >> >the password changes if not all IRVs are used. I had this problem several >> times. >> >Another reason is that the checksum of the flash content should not depend >> on the upload procedure. >> >Therefore i need a defined bit pattern in the unused parts. >> >And it should be a portable way. I think it can only be done by the linker >> or editing the file produced >> >by the linker. >> > >> >> I haven't read it thouroughly, don't know whether it will work, but it >> looks interesting enough to post: >> >> http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_node/ld_21.html >> >> Be aware though, filling the entire rom area results in large download >> files. It may be a good idea to only fill the interrupt vectors. It will >> take some tinkering in the ldscripts though. > >that's no problem because with 59.5 kB programs initializing the rest of 0.5 kB does not hurt.
That's true :-) >It seems that i have to change the section definitions by adding the =fill option. But i could not >find the definitions of the MSP430 sections. >Where are the definitions of the MSP430 sections? > In the mspgcc tree, there is a directory called ldscripts. These scripts define what the memory of the target looks like. However, I tried to use the fill (fill should be replaced by a value, for example: >text =0xa5a5), but for some reason it doesn't have an effect. Maybe Steve can shine some light on this? I did found out (by looking at the .a43 intel hex output) that the interrupt vectors are initialised with a default vector. Filling these will not have an effect at all because the entire section is already occupied. Nico Coesel
