I'm compiling some code for an ATmega32 with avr-gcc 3.4.5 and I'd like to partition the Flash as follows:
vectors, .text, & variable initialization: 0000-35FF
To get the four custom sections in Flash, I added the following parameter to my link command:
This is almost perfect. The code for these sections show up exactly where they should. The main code and vector table are in the right place. My variables in .data and .bss end up in the right part of RAM too.
The initialized variables in .data are initialized by copying the data from Flash to RAM with the LPM command. Those constants are located in SOME SECTION. I'm assuming this region has a name, but I don't know what it is. My web searches have been fruitless. Anyhow, gcc has placed these constants at the end of my last section (update2_nrww) and this is NOT where I want them.
What is the simplest way to move this data to the end of my .text and to make sure it gets located within 0000-35FF?
Thanks in advance. I've had a million questions so far (this is my first AVR project) and thanks to these forums, this is the first one I haven't been able to answer myself by reading your posts!