Skip to content

Conversation

@tyler-potyondy
Copy link
Contributor

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.

For the stm32wle5jc, Tockloader was causing a bus fault via openocd by
attempting to read/write past the end of flash. This adds an optional
parameter that may be defined to denote the end of the flash region. The
openocd flash r/w operations then check that a given operation will not
exceed the end of flash.
This adds the stm32wle5jc chip used in the seeed_studio_lora-E5-HF dev
board to tockloader's known board list. Communication intended to occur
using stlink over openocd.
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.

1 participant