I have a simple MicroBlaze connected to external memory via the cache line.
I am preforming reads and writes to memory.
The application functions correctly.
However, it results in an endless loop (the application returns to the start and executes again)
What is the cause of this, and how can I address this issue?
Normally this is due to some data corruption on the stack.
When a function returns, it reads from the stack and does a rtsd r15, 8
if r15 is loaded with 0x0, it will jump to 0x8.
To address this, make sure that the stack is not overwritten, and that the cache is flushed correctly.
Make sure that the cache is cleared at the start of the application, and also flushed (if you are using writeback) at the end of the application.