STM32WLE5JC: Add board configuration #129
Open
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.
Overview
This PR adds support for the STM32WLE5JC SoC (found on the Seeed Studio LoRa E5 dev board) via an STLink. This accompanies tock/tock#4695.
OpenOCD Changes
When initially adding this board, tockloader caused a number of bus faults that arose from attempting to read/write past the end of flash. I am not entirely sure why this has not come up before. My guess is that this has something to do with the lack of an OpenOCD board specific configuration for the stm32wle5jc. OpenOCD only has a target config (different than board config) for the stm32wle5xx (which can be a few different lengths for flash).
Quickly looking, it appears the other boards using OpenOCD have an OpenOCD board specific config (not just a target). Long story short, I bubbled up errors when attempting to r/w past the end of flash and added some exception handling to gracefully handle when this happens. Someone with a better understanding of OpenOCD/tockloader should sanity check this to make sure these changes are in fact necessary as this impacts all OpenOCD functionality, albeit minor.