Optimization problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Optimization problem

1,051 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Thu May 01 09:32:45 MST 2014
I was debugging a new firmware with FREERTOS, when I finished debug for the first time I removed the optimization from the project, and when I restarted the project it was no more working(it work at a very slow speed).

Then I re-set the optimization level to "debug"(The previous setting), but it is still not working. Now with or without optimization the MCU seems to go at a very slow clock speed, and I can't understand why.

Maybe someone has experienced the same problem
0 Kudos
Reply
4 Replies

1,039 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Sat May 03 10:37:55 MST 2014
Thanks.

I read the FAQ sometime ago, but by reading it again I found the problem and now it is working.
0 Kudos
Reply

1,039 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri May 02 01:11:20 MST 2014
Did you read the FAQ?
http://www.lpcware.com/content/faq/lpcxpresso/compiler-optimization

Especially the section on "Optimized code fails to execute correctly"?
0 Kudos
Reply

1,039 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by schisanoa on Fri May 02 00:40:40 MST 2014
I only changed the compiler optimization, but also if I set it back the board is still not working. If I replace the workspace with a backup everything come back working, until I change the compiler optimization.

I work with a MAC.
0 Kudos
Reply

1,039 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arw on Thu May 01 13:12:12 MST 2014
Hello,
Do you mean compiler optimization has caused the behavior change?  Or, are you switching between Debug and Release build configuration types?

In case you are switching between Debug and Release configurations, make sure that all of the startup code was included in the Release configuration so that clock setup is still performed by the initializing functions such as "SystemInit()". 

-AW
0 Kudos
Reply