-
Notifications
You must be signed in to change notification settings - Fork 195
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 Timers not counting when debugging with picoprobe-cmsis-v1.0.1 and upstream openocd 0.12.0-rc2 #45
Comments
Two things have changed in your setup. Which was the breaking change? |
right, the upstream openocd (openocd 0.12.0-rc2) seems to break it. i decided to switch to it based on this comment from a different thread. thanks for the input that it works with both openocd. |
When are you expecting the timers to increment - do they run when the target isn't halted, and is the downstream behaviour that they always run even when halted? |
I expect the timer specifically the 64 bit counter to start counting as soon as the program starts. And the counter to stop when I raise a halt. In both openocd the counter counts up when you just do a reset via here's a sample rust code: https://gist.github.com/BobyClaws/0e224d66b62b6a6a6d1bc680c1908395#file-main-rs-L73 |
I have the same problem. With OpenOCD 0.12.0-rc2 and picoprobe-cmsis-v1.0.1 the timer hardware always returns 0 when gdb is connected. When running the same file without gdb, even if flashed with openocd over the picoprobe, the timer will start returning non zero values very quickly after starting main. Example code:
The systick hardware works as expected. |
I got another CMSIS based probe to test. Turns out this is not a bug with the pico probe or openocd. The default configuration for openocd 0.12rc2 with an rp2040 target will debug both cores with dedicated gdb instances. With my configuration this meant the second core was always stopped as I never connected the second gdb instance. The rp2040 timer is set up by default to stop counting when any core is stopped by a debugger and so the timer would never advance. You can use |
For others finding this issue, here are two details I tripped over at first that weren't immediately clear to me:
|
My Raspberry Pi Pico's timers are not working the counter is stuck at zero after switicing to the latest release of picoprobe
When It used to work:
followed usual guide from pico c/c++ sdk to compile openocd and picoprobe
have used openocd 0.11.x and the latest uf2 provided (one without cmsis-dap support)
my vscode launch.json
timers are working correctly
When it stopped working
with upstream openocd 0.12.0-rc2 (build steps followed: $ ./bootstrap $ ./configure $ make -j4)
and picoprobe-cmsis-v1.0.1
and with the following command to start openocd
openocd -d2 -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c 'adapter speed 10000;'
My timers' counter no longer counts up.
monitor reset
command makes them tick again. butupon using any thing else like in above vscode config preLaunchCommands, they stop counting.
The text was updated successfully, but these errors were encountered: