Upgrade of GNU ARM compiler in KDS breaks working application

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Upgrade of GNU ARM compiler in KDS breaks working application

491 次查看
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?

标签 (1)
标记 (2)
0 项奖励
回复
1 回复

340 次查看
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 项奖励
回复