I need to make the tools produce this image, so it falls under this forum's topic.
To boot from MMC/SD, the card needs to have a file called MLO that has the following structure:
<length><loadaddress><image>
I want to produce the MLO file using CCS, without having to resort to external tools.
I'm having trouble coming up with a way to do this, though.
It seems to me that I should be able to create a linker command file that would do this, since the two things I need to know are available at link time:
<length> is at the end of my text/const/data area, where bss starts, and the load address is the same as the start address (0x40200000).
Currently, I've defined a GROUP in my linker command file to hold .text, .const and .data (the .bss section isn't part of the output).
I have tried to create a section called ".mlo" and use the .retain assembler directive to make a section that sits at the first two words of the output file, but then use a load address for all the other sections so that they will link as though the base address of the image is 0x40200000. However, .retain results in an assembler error. Aarti, if you read this, I'd like to know why your instructions to use .retain don't work.
Thanks.