Im working on an embedded project and I'm currently using an Olimex P- Lpc2138 board. After having the device misbehave badly, I decided to try something simpler - to control the leds on the development board.
After seeing what happened, I realized that something is very wrong.
Even very simple code which just turns on and off the leds repetitively, doesn't work correctly - sometimes the PLL would fail to lock, sometimes loops don't work and cause he code not to run at all...
I compile the code with -O0 optimizations usually, but oddly enough sometimes when I try other types of optimization, some work better in making the leds work correctly.
Obviously I'm getting very frustrated over this, and I'm starting to lose hope... - I can't even get dbg in eclipse to debug the code!
I will be glad to provide any other information which might help resolve this, I just don't really know what might be needed - please tell me if theres anything else you need to know, and I will promptly provide the info.
Thanks in advance, Kosta