Feature: BMP platform Cortex-M exception handlers#1957
Open
ALTracer wants to merge 1 commit intoblackmagic-debug:mainfrom
Open
Feature: BMP platform Cortex-M exception handlers#1957ALTracer wants to merge 1 commit intoblackmagic-debug:mainfrom
ALTracer wants to merge 1 commit intoblackmagic-debug:mainfrom
Conversation
1e868ae to
3dd0927
Compare
3dd0927 to
75968ed
Compare
75968ed to
928fb9f
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detailed description
blocking_handler()'s with meaningful handlers which set a morse message and spin the systick (because of priority) for 10 seconds then reboot the probe.I'm not sure if
platform_request_boot()to request "stay in DFU" is better than just rebooting the probe, or if USB D+ pulse low is needed to trigger re-enumeration on some platforms, so I coded a directscb_reset_system()instead. Future PRs could unwind the stack (I have tried implementing just that) and/or record crash dumps to SRAM or SPI flash or UART. If MPU is enabled by platform, to e.g. catch NULL dereferences, then there's a simple handler for that, too. Platforms should enable separateSCB->SHCSRBusFault and UsageFault bits for this code to distinguish between them.Note I don't spin the UART/DMA/TIM or USB device IRQ handlers, but it technically could also be done to keep UART DMA and USB (DFU runtime stub, CDC-ACM, suspend/reset) working for a while for logging purposes. Notably
sys_tick_handler()onnativeindirectly checks for Vtpwr undervoltage. I have not tested how this behaves yet.Your checklist for this pull request
Closing issues