Upgrade of GNU ARM compiler in KDS breaks working application

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

Upgrade of GNU ARM compiler in KDS breaks working application

392 Views
kerrycalvert
Contributor I

I have an app built with KDS with v1.12.1.20150228115 GNU ARM C  .  When I upgrade to the latest release of KDS, this app will panic in gdb, with a lot of read register errors. When starting, GDB never makes it to the main() function and suspends the app. Could it be a compile/link error driven by configuration settings?  It seems like the vector table in the image is misplaced or corrupted, but I do not see any configuration options in the IDE to address this.  Maybe this is configured in the code itself and there is some incompatibility between the versions of the compiler/linker?

Labels (1)
Tags (2)
0 Kudos
1 Reply

241 Views
bobpaddock
Senior Contributor III

I do not know if this applies in this case.
Using -Os on 'KL' parts can lead to bus faults due to alignment issues.  The KL's do not handle unaligned access.
Switching compiler versions can move the code around in such ways that the problem seems random from code-change-to-code-change.  If using -Os try -O2 and see if the problem stops.  Using -O0 in GCC is not a good idea, it generates poor code and can break things like floating point constant folding at compile time (Obscure issue with AVR-LibC delay functions as example).

0 Kudos