This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2400 Erratic code execution

Hi

Recently my ARM LPC2478 MDK-ARM project has reached a point where if I add one extra line of code I see all kinds of RAM corruption and sometimes the DABT_handler being called. If I remove that line of code everything is all OK again. The corruption is noticable as text on a LCD corrupting between frame updates even though it is just being copied from Flash to external RAM.

The extra line of code can be totally irrelevant, for example adding a line to draw a bitmap to an LCD can cause erractic code behaviour even if that line of code never gets executed.

Right now I can only get it to work and execute correctly with level -O3 optimisation, any level below that is now causing problems. My on board 512K flash is pretty full up but I have moved some bitmap files into an external Flash but the problem is still the same.

I am using about 4Mbytes of DDR external RAM out of 32Mbytes total. I have tried doubling the stack and heaps but still the same problem. I also tried reducing the overall external RAM bandwidth but still the same problem.

Does anyone know if there are limits on say the individual C module lengths? I saw a very similar problem a few days back when I tried using sprintf function with %f. Could this be due to a larger library being linked and also taking the code over some limit which I have again reached?

Could this be a compiler error? For information I am using a lot of C modules with unbounded arrays to hold bitmaps, fonts and sound effect. Could this be part of the problem?

I would appreciate any suggestions you can think of as this problem has totally stopped development.

Thanks in advance.

0