GDB debugging issues with Infineon XMC4800 MCU and Segger

Completed

Hi,

We have a EtherCAT project and for this we are using the XMC4800 MCU from Infineon. I was working in Dave (their IDE) first, but because it is not CMAKE based I ran into issues with adding re-usable libs (we use CPM for this).

So I decided to try and create a CMakeLists.txt file for the Dave project and see if I could open/compile the project in CLion.

After a couple of hours I was able to get the project building in CLion. (I just open Dave to make changes to the Hardware settings)

I then setup the "Embedded GDB Server" debug target in combination with a Segger J-link Plus (SWD)

This uploads the compiled application and the target starts running fine. (I make it blink a LED)

The issue is that when I enable break-points it does not break on the breakpoints that I place, but it just breaks at completely other locations. (in my case on the first line of an int handler)

When I debug with the same setup in Dave it works fine.

I tried with both the bundled GDB as with the GNU GDB, it makes no difference

It could be related that this project uses a bootloader (a separate project that I build and flash from Dave)

I use CLion 2021.1.2 on Mac OS Big Sur (Intel)

Upload id: 2021_06_30_KhvZeYiXczBe5aXA (files: CMakeLists.txt and 2 more)

Upload id: 2021_06_30_UmtBsHajADHngxtb (file: Screenshot 2021-06-30 at 09.17.22.png)

 

Best Regards,

 

Jeroen

Please sign in to leave a comment.