-
Notifications
You must be signed in to change notification settings - Fork 914
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" |
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: