Forum Discussion
Altera_Forum
Honored Contributor
15 years agoelf2flash converts your compiled code into a flash compatible image. That said you can't perform write accesses to flash directly since there is a little bit of protocol involved. So if you tried to execute code directly from flash the writes performed to access r/w data, heap, and stack space will fail. The way the bootloader in flash works is it's a small code fragment that gets placed before your code starts, it copies the code from flash to main memory without performing any write accesses to the flash itself.
http://en.wikipedia.org/wiki/flash_memory has some more information about flash. Basically before you can write to flash you have to open the sector, erase it (usually), and then you can write to the sector. It's not like typical main memory where you can write directly to it unless you have an intelligent controller sitting in front of it to handle that overhead for you.