Open source tool-chain fails on single-stepping, but all right for running

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

Open source tool-chain fails on single-stepping, but all right for running

1,377 次查看
kai_liu
Senior Contributor I

I am trying my best to port WIRING/Arduino API to FRDM-KL25Z and my new board called GAP. As part of open source operation, I must use open source toolchain: GNU C++ / eclipse IDE / PEmicro gdbserver (free but not open source)/ FRDM-KL25Z.

 

The setup procedure is a little complex, please check this blog : DIY Free Toolchain for Kinetis: Part 2 – Eclipse IDE | MCU on Eclipse

 

The debugger works well until I try to access (single step into) a public method of an object. The debugger and eclipse report some errors of "reading 0x....." and stop debugging.

 

I though maybe my implementation of C++ is wrong? So I use LED indicator in different methods. for example, method1() is RED blinks, method2() is GRN blinks, method3() is BLU blinks. It works. But debugging still fails.

 

For people who is interested in open source, I attached my project. Maybe you guys have the answer.

 

I have checked source code of Arduino/WIRING, porting is straight forward. I hope to delivery first version (with simple USB applications) before long.

Original Attachment has been moved to: LED_Blink_DemoCPP_Debugging_V1.1.zip

2 回复数

1,140 次查看
thomasgrieger
Contributor III

Hi,

I encountered a similar problem while using the GNU ARM compiler. The problems seems to be that some optimizations like "-O1" deactivate the generation of frame pointers which are used for debuggin. Try to add "-fno-omit-frame-pointer" to the compiler flags.

Best regards,

Thomas

1,140 次查看
kai_liu
Senior Contributor I

Thanks, Thomas,

I am using "O0", which means no optimization, it should be suitable for debug. For the other option, I will have a try.

Yours sincerely

Allan K Liu

0 项奖励
回复