-
Notifications
You must be signed in to change notification settings - Fork 937
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
Core1 not starting correctly #1977
Comments
And.... now I can't get it to replicate the issue. Let me poke at this a bit more. I should know soon if this in an actual issue or not. |
I've updated the original post to the minimum amount of code that will replicate this on my system. However, it only shows the issue after a SWD flash finishes. If I do a hard restart by resetting the power, it boots up just fine. |
How are you doing the SWD flash? Perhaps the SWD flash isn't resetting Core 1 properly, which is why it only works correctly after a "hard restart"? |
The SWD flash is being done via the "Flash" task setup by the Pico SDK Plugin. It is using OpenOCD. The command line is as follows:
However, once I got to the pico-feedback link you provided there was a comment for another issue ( raspberrypi/pico-feedback#248 ) that basically makes my submission an exact duplicate. However, the "flash" task only uses OpenOCD and there is no "monitor" command since that seems to be for GDB instead. So, I'm not sure how the command needs to be modified. |
I always load images via gdb. I'll have to test loading via openocd. |
I suspect this is a debug scenario where core 1 is not reset by the debugger on launch; we should consider just always resetting core 1 before launching it. That said, i'm also curious if there is something peculiar to VS Code, so assigning to @will-v-pi for now |
I was having some trouble getting some multicore code running. So I added some serial uart feedback to see what was happening. It appeared as if Core1 wouldn't start it's loop code without a soft reset immediately after bootup. I was able to replicate this with a clean project and minimal code. This is the 2.0 SDK in VSCode and the SDK plugin. This is also just a Pico1. I have not tried it on any of my PicoW.
If the 5ms sleep is commented out or removed, core1 will never get to looping. It will say "Core1 up" but never says "Hello from core1".
With the sleep and reset kept in, core1 seems to start just fine.
multicore_test.c
CMakeLists.txt (was generated by the plugin, except for "pico_multicore" which I added. )
The text was updated successfully, but these errors were encountered: