Hi Chris.
Chris Liechti escreveu:
Ricardo Wiggers wrote:
I'd like to know how to define a new section like infomemnobits. To
be more specific, I'm working with an 149 and would like to use a
portion of flash to user storage (0x1100 to 0x7fff). I've managed to
reduce the text section to start at 0x8000 and to create a flashdata
section where I wanted, but I also wanted it not to be loaded. Could
someone give me a hint on how to do it?
there are different ways to achieve that goal.
- just use a pointer to a char array in that mem range
- place a array in that memeory area: char data[55] __asm__("0x1100")
- i think you can define sections on the command line
- or provide your own linker script like i have done in the
CVS/jtag/funclets folder of the mspgcc.sf.net CVS repository.
starting with an original F149 script should be easy. you fint it on
your disk: mspgcc/msp430/lib/ldscripts/msp430x149.x
the -T linker option allows to specify your own file.
I think I wasn't clear. What I've done is exactly to create a custom
linker script based on the original F149 script. It's working, allocates
correctly and I can read and program without any problems. What I
couldn't achieve is to have this section not loaded with the program,
like it works with the infomemnobits section. I really don't need it to
initialize the whole memory to zeros everytime I reload the program for
debug.
Thanks a lot,
Ricardo.
note:
the first flash segment at 0x1100 is only 256 bytes large, the
following 512B. thats no problem but in some cases you need to know
what you are doing.
Thanks, I'm aware of that.
chris