Skip to content

Commit 291f8e5

Browse files
boards: add stm32wle5jc to known boards
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.
1 parent eeb584c commit 291f8e5

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

tockloader/board_interface.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,17 @@ class BoardInterface:
316316
"flush_command": "probe-rs download {binary} --binary-format bin --base-address 0x10000000 --chip CY8C624AAZI-S2D44",
317317
},
318318
},
319+
"stm32wle5jc": {
320+
"description": "Seeed Studio LoRa-E5 board based on the STM32WLE5JC SoC",
321+
"arch": "cortex-m4",
322+
"page_size": 2048,
323+
"no_attribute_table": True,
324+
"openocd": {
325+
"prefix": "source [find interface/stlink.cfg]; \
326+
transport select hla_swd; \
327+
source [find target/stm32wlx.cfg];",
328+
},
329+
},
319330
}
320331

321332
def __init__(self, args):

tockloader/openocd.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ def _list_emulators(self):
248248
openocd_cmd=self.openocd_cmd
249249
)
250250
)
251+
openocd_commands.append(
252+
'{openocd_cmd} -c "source [find interface/stlink.cfg]; transport select hla_swd; source [find target/stm32wlx.cfg]; init; exit;"'.format(
253+
openocd_cmd=self.openocd_cmd
254+
)
255+
)
251256

252257
# These are the magic strings in the output of openocd we are looking
253258
# for. If there is a better way to do this then we should change. But,
@@ -259,6 +264,7 @@ def _list_emulators(self):
259264
("(mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)", "arty"),
260265
("SWD DPIDR 0x2ba01477", "microbit_v2"),
261266
("stm32f4x.cpu", "stm32f4discovery"),
267+
("stm32wlx.cpu", "stm32wle5jc"),
262268
]
263269

264270
emulators = []

tockloader/tockloader.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ class TockLoader:
145145
"cy8cproto_62_4343_w": {
146146
"start_address": 0x10100000,
147147
},
148+
"stm32wle5jc": {
149+
"start_address": 0x8018000,
150+
},
148151
},
149152
}
150153

0 commit comments

Comments
 (0)