Forum Discussion
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