cancel
Showing results for 
Search instead for 
Did you mean: 

ARM CortexM3 Compiler - Optimization

rajkrishna
Associate
Posted on January 12, 2010 at 05:53

ARM CortexM3 Compiler - Optimization

2 REPLIES 2
rajkrishna
Associate
Posted on May 17, 2011 at 13:37

Any issue with CortexM3 compiling for Zero optimization?

The same code can be run with o1,o2 or o3 but cannot run with o0.

Any hints?

Thnx in advance.

st3
Associate II
Posted on May 17, 2011 at 13:37

There is not just one ''ARM CortexM3 Compiler'' - You need to state which specific compiler and version you are using!

Quote:

The same code can be run with o1,o2 or o3 but cannot run with o0.

It is almost certainly a flaw in your source code; ie, it is relying upon something that it shouldn't, but which just happens not to fail with o1,o2 or o3.

Usually it's the other way around - stuff works for no (or low) optimisation, but fails at higher optimisation.

You need to do some debuggin to determine precisely what is (or is not) happening - ''doesn't run'' tells next to nothing:

Check your use of volatile.

Check for timing issues.

Also check memory alignment issues.

Are you sure that this isn't a symptom of an underlying hardware fault?

[ This message was edited by: st7 on 12-01-2010 10:24 ]