VSCode nRF52840 0xdeadbeee and cannot connect

I have VSCode 1.63.0 (Universal) on macOS 12.0.1 with ncs v1.7.1 and a board with an nRF52840 MCU.  I'm using the "hello_world" example.  If I power cycle the board I can start a debug session from VSCode, but the call stack just says 0xdeadbeee and no source is given and I can't step through any code.  If I try to debug again then the debugger cannot connect to the MCU.  If I power cycle the board then I can repeat the above (it connects the first time then won't connect again after that).  If I try "nrfjprog --recover --family NRF52" it fails to connect also at this point.

If I try to connect to the same board with Rowley Crossworks and a similar sample project, it works fine.  I can debug.

If I build a project for nRF5340, different board, then I can use VSCode to debug fine.

So seems to be something about the nRF52840 and VSCode setup that is doing something odd.

Any ideas where to look to figure out what is going on?

(Maybe hardware protection is being set somehow?)

Related