Weird behavior in debuggin using XMD

I have implemented a base builder system for the Spartan3e starter kit where i have a TestApp_memory.c which is downloaded in blockram and works fine. Then i have another program also generated by the base system builder, TestAppPeripheral.c which i download to the extern memory with XMD which downloads fine and execute with con address. But when it tests interrupts in dosent catch any interrupts, so i wanted to debug the program to see if i could locate the problem (there is definitely some weird beheaviour since the interrupts sometimes work !!) But anyway, i wanted to debug the program using the debugger, i connected fine and started to debug, i placed a breakpoint at the start of the interrupt test, and i started debuggin. Now comes the weird beheaviour, the programtracer jumps back and forward and sometimes skips instructions. It evens jumps into a if statement which it cannot go into according to the data. So anyone have any ideer what is going on ? Maybe the base system builder code is rubish? Anyone have had trouble using interrupts and XMD together ?

Reply to
kislo
Loading thread data ...

To debug, it is always easier if you turn all optimising off. If you take a llok at the asseembler code, you will see that, when optimising, C instructions are translated into severla steps, and steps from some intsructions may be interleaved. Thta geives a better through put, but also lots of headaches to unaware programmers!

Best regrads,

Zara

Reply to
Zara

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.