lpcware

Optimization issues

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by wdawson61 on Fri Aug 26 08:46:21 MST 2011
Linux build v 4.05 (bld 113)
LPC1758 custom hardware

Hi. 
I'm trying to dig into why a rather large application ~ 128k runs fine with no optimization but starts having issues when ANY compiler optimizations are enabled.

Its actually a bi-directional parallel interface to a DSP implemented using GPIOs that breaks.  I've looked at the GPIO signals with a scope but they don't appear to be changed significantly between the optimized and non-optimized versions of running code.  2 of the GPIOs are triggering interrupts to the LPC1758 when data is sent / acknowledged by the DSP. I'm not really using any wait loops other than sticking a few no-ops here and there to  stretch some signals.  But again, they don't appear to be distorted between the optimized and non-optimized versions.

Any thoughts on how to nail this down would be greatly appreciated!! 

-Wade

Outcomes