Generating position-independent code for Kinetis KEA64 causes MCU to crash

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Generating position-independent code for Kinetis KEA64 causes MCU to crash

982件の閲覧回数
erikjohnson
Contributor I

When I add the -fpie option to the compiler command line and the -pie option to the linker command line, I can build fine, but no longer debug my application - launching debug results in the following error (after a successful build):

Error launching <snip>:
Can't find executable file. It may need to be rebuilt.

Running the application results in an immediate crash. However, without PIC turned on, the application compiles/runs/debugs fine (until I need to use the position-independent features)

0 件の賞賛
返信
1 返信

855件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi

Position-independent executable is not supported by CodeWarrior, you can add this flags to your project, but if you check the disassembly code, this code still has absolute paths, moreover, you need to add special code loader which can understand where to place this code (as it suppose to be independent, it shouldn't have any specific address).

Sorry for the inconveniences that this may cause you.

Best regards

0 件の賞賛
返信