Forum Discussion
Altera_Forum
Honored Contributor
13 years agoNo as a matter of fact the altera bootloader can load several chunks of data at different memory addresses. Each chunk starts with a 8 byte header, 4 bytes with the destination address and 4 bytes with the chunk size. If the chunk size is 0 it means that the destination address is in fact the address to jump to to start the application. So what is flashed is actually a pre-digested version of the elf file.
To answer the OP, in the SREC file you need to read each line individually and decode it. Find out the line's destination address, decode the data from hexadecimal to binary and write it at the specified address.