Forum Discussion
Altera_Forum
Honored Contributor
16 years agoIs there a way to translate the nios C files to hex files?
Hi, My project is connecting between PC app to altera device. I want to add option in my app to update the altera's software. for that I need to write the altera's software into a flas...
Altera_Forum
Honored Contributor
16 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.