Skip to content

Conversation

mikesmitty
Copy link
Contributor

@mikesmitty mikesmitty commented Sep 16, 2025

DBGPAUSE pauses the timer used for sleep pauses when a debugger is attached, which gets annoying to debug. Might be related to https://github.com/tinygo-org/tinygo/blob/v0.39.0/src/runtime/runtime_rp2.go#L314

Copy link
Contributor

@eliasnaur eliasnaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but you probably want to change the PR title to reflect that you're fixing multiple issues.

@mikesmitty
Copy link
Contributor Author

LGTM, but you probably want to change the PR title to reflect that you're fixing multiple issues.

Ah yeah, good point. I ended up adding more things than I planned originally

@mikesmitty mikesmitty changed the title fix(rp2): disable DBGPAUSE on startup fix(rp2): misc spinlock-related fixes Sep 17, 2025
@mikesmitty
Copy link
Contributor Author

mikesmitty commented Sep 17, 2025

I thought I was done, but here's one more. schedulerLock can stay held through a soft reset, especially if the reset happens while all tasks are sleeping, and since spinlocks don't get reset during a soft reset it will hang the scheduler before runtime.init() is called

Copy link
Contributor

@eliasnaur eliasnaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deadprogram
Copy link
Member

Thank you for the fixes here @mikesmitty and to @eliasnaur for review. Now merging.

@deadprogram deadprogram merged commit 310df7a into tinygo-org:dev Sep 19, 2025
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants