Alperen Coskun wrote:
Hi all, I have a problem that I haven't solved so far. I'm using powerpc and virtex-4 platform. My project was working properly till I added a row that only assigns a value to a variable in one of the "isr" functions. And my code started to fail. I think it was working by chance so far :( I recognized that not only adding to "isr" function, it happens also in other parts. There is no compilation error. But when I download xxx.elf file that I generated, my program stops at one of the functions. (In fact it doesn't stop, it enters a loop in cyg_hal_default_exception_vsr at different places in asm code but generally in"sync" assembly code. It doesn't break the loop) The function which causes exception isn't always the same. It changes according to where and what I have added to the code. (the function I added a piece of code and the function that causes exception are not same. Also, although it doesn't enter the function that I have added a piece of code, it fails. for example, altough I add a code to isr function and no inetrrupt occurs, it fails.) I controlled all the code which may not give compilation error but may cause run-time error. (divide by zero).But even if there is something like that, it may exit from the exception subroutine and turn back. I'm not sure but, it may be from memory problem. I checked the memory layout but found nothing unlogical. I didn't understand which causes that problem. Is there anyone who encountered that problem before or could give any idea?
My guess is that you're getting some sort of exception, probably a DATA ACCESS error, in the ISR code. The PowerPC exception handlers sometimes don't manage to report this very well... The fact that you see it happen on 'sync' is just because of how the PowerPC works - most operations are queued/pipelined and the sync instruction forces pending operations to complete. Thus as illegal access may happen many instructions before the sync and you'll only see it on the sync instruction. You also might think about sharing some of the real code that you're having troubles with - general discussions are all well and good, but without details it's hard to help much. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
