I am able to successfully build, download, and run the SAMA5D2 Full demo from SRAM on my SAMA5D2 Xplained evaluation board. However, if I switch to run from DDRAM instead, I am able to build and download the Full demo, but it fails runtime checks.The first is the BlockTime test. If I change the bktALLOWABLE_MARGIN from 15 to 1000, the task checks will pass. Unfortunately, then the Dynamic task will fail. Based upon this information, I am assuming that there is an execution timing problem when running from DDRAM. It appears that the ICACHE and DCACHE are not enabled. Could this be the problem? Any samples to get the Full demo running from DDRAM on the evaluation board?
Have you tried enabling the caches? They will not have been enabled because they were not needed while running from internal RAM.
I tried to enable the caches by calling cp15_enable_icache(), but it generates an exception handled by the AbortHandler.
When the function is called, or when you execute the application after
the cache is enabled?
As soon as I attempt to return from the cp15_enable_icache() function.
Correction. It appears that the function returns, but fails a little bit later. I’m tacking down the specific code now…
Tracing down exact location that causes exception will take time. Once ICache is enabled, I cannot even single step at the C code level, nor do breakpoints work. I am having to single step at the ASM level, into every function, never over.
Digging deeper, I found a board_cfg_mmu() function as part of Atmel’s software support package library. It configures the MMU, then enables ICache, MMU, and finally DCache. I take it this is uncharted territory for the FreeRTOS demo on the SAMA5D2 Xplained evaluation board? Is it a bit strange, though, as the port includes IAR linker files and Debugger macro files for both SRAM and DDRAM configurations. And pointers would be welcomed.