Problems debugging Arduino Nano Every application in VSCode

I am trying to use PlatformIO to build and debug an Arduino project based on the Nano Every board. I’m trying to debug it using the WokWi simulator in VSCode, and gcc/gdb. I am able to get the project to compile and run in the debugger. But it doesn’t hit any breakpoints I assign. If I hit the “pause” button, it breaks in libfunc.s, line 2448. It seems to be stuck on this line.

So to simplify things, I downloaded the source for a simple “hello world” type app that’s written for the Arduino Uno board. That is working fine in the debugger. But if I change the project to build for the Nano Every board, I have the same issue – it hangs in libfunc.s.

I tried to add the source for libfunc.s into my project in the hopes that I could step through the code and see what’s going on, but that opened another rathole, trying to get it to build.

Does anyone know what’s going on, why gdb doesn’t seem to like Nano Every projects? I’d really appreciate some help, I’ve really been beating my head against the wall on this one!

Thanks!

Can someone please help me here?

Is the problem in the simulator or the built firmware? Do Arduino IDE firmwares behave the same as PlatformIO firmwares in this simulator?

It’s hanging in libfunc.s in my built firmware, when I run it in VSCode. The WokWi simulator only runs in VSCode. The problem seems to have to do with doing a build in VSCode for the Nano Every.

Wokwi does not support the Nano Every.

Well I knew that but thought I could get it to work anyway. I’m not clear on what is needed to support the Every and thought that with enough beating my head against the wall I could get it working. I ended up changing the board type to a ATMega2560, and now I can get the code to kinda sorta work. But I’m having trouble with getting serial output. I’ll start another thread about that.

And thanks for your help!!!