Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Optimization problem

2006-01-17 by andersryl

Hi,

I have a weird problem (hmmm, what problems aren't weird?) regarding 
the optimization flag in GCC.

I use GNUARN 4.0.1, Eclipse 3.0.1 and an board from Olimex for my 
project. The Olimex-uC talks to a PC-app via UART 1. Work is 
progreesing but then I got a Data Abort interrupt indicating 
something was wrong.

So my idea was to try to debug the uC-code from Eclipse with OCD 
Remote. If I do it with the code compiled with -03 (as it shouldn't 
be according to James P. Lynch's excellent guide) it starts up 
alright and the app talks with the PC. But when I set a breakpoint 
and try to single-step through the code I get the error "Target 
request failed: Target is not responding (timed out).".

OK, so lets compile the code using -O0 as the Lynch-guide tells me. 
Now the application no longer talks to the PC-app at all. 
Indications tells me that the UART1 clock is wrong.

Anyone that has ideas on why less optimization can cause problems 
for me? I know that the -Ox are "aliases" for a bunch of 
optimization-flag but I haven't looked into them.

And maybe someone can tell me why I get the error message when 
debugging and compiling using -O3.

/Anders

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.