-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
stm32: Remove preemptive keyboard interrupt via PendSV #15988
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
flash (in main.c) along with the isr_vector above. | ||
*/ | ||
. = ALIGN(4); | ||
*(.text.pendsv_kbd_intr) | ||
*(.text.mp_sched_keyboard_interrupt) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @andrewleech it's curious that you only needed to put There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh that is interesting... maybe neither of them actually need to be in ram... or more likely my testing didn't catch the scenario where ctrl-c was being handled by the UART isr at the exact moment flash was locked. Just before or just after it wouldn't matter. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, thanks for confirming. I'll leave this as it is in this PR because it makes sense to have this function in RAM. |
||
*(.text.pendsv_schedule_dispatch) | ||
*(.text.storage_systick_callback) | ||
*(.text.SysTick_Handler) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the comment just above this, about the debug layout has been invalid and now outdated. Glad to see the
PENDSV_DEBUG
removed, it should be removed from all ports.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is now removed from all ports (although I see there's still a few stray
-DPENDSV_DEBUG
remaining in Makefile's that should be removed).As for the comments for the stack layout: feel free to open a PR to fix those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove, it was never correct; the stack layout doesn't change with different builds, the registers are stacked by the hardware so the layout is always the same. I did some extensive testing here:
#315 (comment)
The hardfault reported in #315 was due to this very same issue, but back then (10 years ago) we assumed, incorrectly, that the stack layout changed for debug builds. This was the reason
PENDSV_DEBUG
was introduced, and it somehow made debugging made work again, for a while at least.