
Le 19/11/2010 13:33, Sebastien Carlier a écrit :
Dear Wolfgang,
On 2010-11-19 12:11:12, Wolfgang Denk wrote:
In messagesebastien.carlier@f67ce90ecc8846695b88fb9ac74f99d56979b90a you wrote:
The used flash chips are so-called bootom boot sector types; using two chips in 16 bit config in parallel (to get a 32 bit bus) we see this flash layout:
Sector Start Addresses: 40000000 RO 40008000 RO 4000C000 RO 40010000 RO 40020000 RO 40040000 RO 40060000 E 40080000 E 400A0000 E 400C0000 E 400E0000 E 40100000 E 40120000 E 40140000 E 40160000 E 40180000 E 401A0000 E 401C0000 E 401E0000 E 40200000 E 40220000 E 40240000 E 40260000 E 40280000 E 402A0000 E 402C0000 E 402E0000 E 40300000 E 40320000 E 40340000 E 40360000 E 40380000 E 403A0000 E 403C0000 E 403E0000 E
So erase block sizes are 32 k, 16 k, 16 k, 64 k, 128 k, 128 k, 128 k, ...
Oh, I see. I wasn't aware that some flash chips had non-uniform sector sizes. It makes perfect sense not to waste much of a larger sector to store the environment. Thank you very much for clarifying!
The linker script squeezes as many as possible objects into the first 32 kB ssector, then creates a gap for the environment, and ten continues to place the remaining objects starting at offset 40010000.
Is it not possible to tell the linker to place a made-up 32 kB symbol within the text section at address 0x40008000? I am not familiar enough with ld to tell whether there are restrictions for setting the absolute address of a symbol that would disallow it in this case.
Regards,
You can force a symbol to reside at a given offset, but that will not make the linker "skip" that symbol when filling the output section, if that's what you meant.
If you read up the binutils doc, you'll see that ld fills output sections based on a "location pointer" (the "dot") that simply moves on with each input section added -- no skipping, and no jumping from one region to another either.
Amicalement,