Forum Discussion
Altera_Forum
Honored Contributor
20 years agoUpgrading Nios Software - external flash
Dear all, I would like to upgrade my NIOS code by RS232. The NIOS runs from external memory. This is my procedure: - I transfer the .elf file to the .flash file by the instruction el...
Altera_Forum
Honored Contributor
20 years agoHi Karel,
> The question is: Is the routine always in internal memory or is it placed from > external flash to internal memory after the function call. In an earlier post you said you invoke ALT_LOAD_SECTION_BY_NAME(OnChipMem), which copies everything in the ".OnChipMem" section from its LMA to its VMA. So, your code should be where it needs to be. However, you should also call: alt_dcache_flush_all(); alt_icache_flush_all(); after loading the section. Otherwise, it's possible that some of code you intended to execute is still sitting in the dcache ... or some old code is still in the icache. Either way, you'll execute bogus instructions. Regards, --Scott