Optimization problems

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

Optimization problems

607 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanJames on Wed Jun 26 02:15:03 MST 2013
Hi,

I have a small project that I have written to test the Watchdog Reset (see earlier post).

I have noticed that if I compile the code (for Release) with optimization None (-O0) then the processor fails to Reset after a Power Cycle if however I compile for size (-Os) then the processor resets correctly.

I have two ways of detecting whether the processor reset i) bytes are transmitted of the UART and ii) I toggle an IO pin in the SysTickhandle every millisecond.

If anything I would have expected problems with optimization ON not OFF!!

Processor is LPC1224

Any ideas anyone?

Thanks,

Ian James
0 Kudos
Reply
1 Reply

584 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Jun 26 07:30:15 MST 2013
Maybe the slower execution speed of you code when compiled for -O0 (= no optimisation) means that you are no longer meeting the restrictions for feeding the watchdog?

Regards,
CodeRedSupport
0 Kudos
Reply