Forum Discussion
Altera_Forum
Honored Contributor
20 years agoThe "relocate" line in the .srec can point the image to your flash. This line starts with "r".
Then you can program the flash in different locations. The application receiving the image, GERMS, should translate this and copy your executable into flash. It sounds like you'll need to have some sort of loader application that comes up on startup that is built into your FW image. The FW will come up via CPLD on power up and then execute this code that then somehow knows which image to load (perhaps each FW image has a register that indicates which image to get???). We had everything in SDRAM so it we didn't have to parse out any memory sections. Our image was copied verbatim into the front section of SDRAM and then we jumped to our application. If you have multiple memory sections you'll need to get more elaborate. On our platform we have an "elf loader" that knows how to parse the sections out of an elf file. The elf loader has access to a C-style array that contains our target executable. Our boot code copies from flash into the middle of SDRAM and then jumps to the application there. That code is the elf loader which then parses the elf in the array and sets up the different sections of memory and then jumps to its entry point. You can find free elf parsers on the web. Hope this helps. Dez...