Debug Problem when using C++ classes

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi all,

I have a big problem with the tasking debugger. I recently added a class. And from then the problem occurs. As soon as I want to instanciate an object of that class the problem occurs. I do NOT have a problem with the compiler or the linker but with the debugger. The binary is generated without any warnings.

But when I try to flash the binary into the XMC1100 I get the following message:



If I comment out the instanciation everything is ok with the debugger. The sources are in the same directory as my main.cpp.

I hope someone can help me.
Kind regards
Sebastian
0 Likes
3 Replies
Not applicable
Hi Sebastian,

Could you share your project for us to take a look at this issue for you.

Regards,
Daryl
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Hi Daryl,

thank you very much for your answer. Please find attached my workspace with the following projects: MyClass.zip constains the (whole) static library Project and FEE001_Example1_XMC11.zip ist an example provided by Infineon. To show the effect when trying to flash the target I just added the following line at the very beginning of main:


MyClass myClass;


700.attach

As told compiling and linking is not a problem at all but starting a debug session is impossible at least for me. I hope you can help me.
Again: thank you very much for your help. I really appreciate this!

Kind regards
Sebastian
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Hi Sebastian,

The error seems to be in your code and not the debugger. When I comment out your code and added another class structure as in the project attached. The project managed to run using the debugger. Attached is a working project that has C++ class for your reference.

Also, can you please check that you have the latest CMSIS patch installed?
http://www.infineonforums.com/threads/1849-Update-of-DAVE-v3.1.10-and-new-DAVE-Apps-libraries-%28upd...

Regards,
Daryl
0 Likes