Hello!
I am having trouble to get an executable less than 16kB, and need some help.
The program must start at 0x3C000 and have a size of less than 16kB.
I can compile without error if I make the program start at 0x3B000 and make it have a bigger size but at the end, I see that after optimizations (-O3), I have a program that uses less than 16kB.
But if I make the program start at 0x3C000 with a size of 16kB, the linker returns me an error before making optimizations : .\_build\bootloader_release.axf: Error: L6985E: Unable to automatically place AT section bootloader_settings_arm.o(.ARM.__AT_0x0003FC00) with required base address 0x0003fc00. Please manually place in the scatter file using the --no_autoat option.
Does it mean that the program can't be created if it doesn't fit into the allocated memory before any code size optimization? If so, optimization is useless.
I'm waiting for your feedback, Cyril
But if I make the program start at 0x3C000 with a size of 16kB, the linker returns me an error before making optimizations :
why not just fool the linker and let it 'believe' you have more than 16kb, the result after opt will be less
Does it mean that the program can't be created if it doesn't fit into the allocated memory before any code size optimization? If so, optimization is useless. you are in a situation exotic enough to make that a likely undiscovered glitch in the linker and since the above suggestion will take care of it, no biggie
Erik