Skip to content
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

define replacement for enable and disable irq for m0 #1519

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

gullradriel
Copy link
Contributor

Following the comment here: #1517 (comment)

We are getting undefined reference to enable/disable irq calls.

I'm providing a fix for build on m0, based on the definition that can be found in chibios.

@miek
Copy link
Member

miek commented Dec 18, 2024

Sounds good to me.

I think it would be worth adding the "memory" clobber you mentioned in #1517 though. As far as I can tell from the docs & various discussions online, the compiler can choose to re-order instructions potentially putting the load/store on the wrong side of the asm statement. Adding that clobber argument acts as a memory barrier and prevents that from happening.

@gullradriel
Copy link
Contributor Author

Thanks, I'm adding it right now.

@miek miek merged commit e004689 into greatscottgadgets:master Dec 18, 2024
17 checks passed
@gullradriel
Copy link
Contributor Author

Thanks :-)

@gullradriel gullradriel deleted the locking-fix branch December 19, 2024 09:54
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.

2 participants