-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pico board gets stuck in pre-main when using PICO_CXX_ENABLE_EXCEPTIONS. #1952
Comments
Can you test a real pico? |
I just tested with stock board with RPI-B1 stepping. It has the exact same behavior, identical. |
I just noticed that, according to the call stack, it's in main() however breakpoints in main() don't work. |
I noticed one more thing. With set(PICO_CXX_ENABLE_EXCEPTIONS 1) the binary doesn't even seem to upload properly. |
With some help on Discord I discovered that:
|
I decided to bloat the .uf2 by adding hardcoded 150KB int array to test if it's the .uf2 size issue. https://pastebin.com/raw/mxySbqV8 |
Could you try replacing
with
in your In the VS Code extension we noticed some issues with the default |
It gave an error:
So I replaced with instead:
But it doesn't fix the main problem. The behavior is the same as before; works with "PICO_CXX_ENABLE_EXCEPTIONS 0" but doesnt with "PICO_CXX_ENABLE_EXCEPTIONS 1" |
Has this issue been fixed? I'm running into a debugger issue where it doesn't stop at main. I have a working project, and I'm comparing the differences in the .vscode and changing the .vscode on the nonworking project does not seem to help. I'm not quite sure what is causing this issue. I have been trying to use the picoboard_blinky project and it seems to load the firmware since it blinks on the board, but I cannot for the life of me get it to stop at the main function. |
So, I installed brought my vs code extension Raspberry Pi Pico to 12.2.2 and now it stops at main! I'm not sure if this will solve your issue but it fixed mine. I created the blinky project from the "New Project From Examples" and now it stops at main. Something must have broken in the new vs code extension on the later versions. UPDATE: The 13.1 version works, but anything above it has issues creating "New Project From Examples." |
Closing this as it has been fixed in the extension, by using the alternative launch commands |
Hi. I have a weird issue. My setup is as follows:
I am able to build, upload, debug, etc all programs as long as the CMakeLists parameter PICO_CXX_ENABLE_EXCEPTIONS is set to 0. When I enable it (set to 1), the board gets stuck in pre-main in:
(https://github.com/raspberrypi/pico-sdk/blob/master/src/common/pico_time/time.c)
I also get this warning in vscode:
And this in openocd (Pi Zero's SSH), but I don't think it's related:
Also, sample code that doesn't even reach main() with PICO_CXX_ENABLE_EXCEPTIONS enabled:
And CMakeLists.txt:
Part of launch.json that sends and debugs the program on remote openocd:
Any ideas what might be going on? If someone wants to investigate it, we can talk over discord or mumble. I'm out of ideas.
Also asked on pico forums:
https://forums.raspberrypi.com/viewtopic.php?t=377061
And reddit:
https://www.reddit.com/r/raspberrypipico/comments/1fo1wo3/pico_board_gets_stuck_in_premain_when_using_pico/
The text was updated successfully, but these errors were encountered: