diff --git a/tockloader/board_interface.py b/tockloader/board_interface.py index e7d0d1d..4558e27 100644 --- a/tockloader/board_interface.py +++ b/tockloader/board_interface.py @@ -328,6 +328,17 @@ class BoardInterface: "no_attribute_table": True, "linkserver": {"device": "LPC55S69"}, }, + "stm32wle5jc": { + "description": "Seeed Studio LoRa-E5 board based on the STM32WLE5JC SoC", + "arch": "cortex-m4", + "page_size": 2048, + "no_attribute_table": True, + "openocd": { + "prefix": "source [find interface/stlink.cfg]; \ + transport select hla_swd; \ + source [find target/stm32wlx.cfg];", + }, + }, "nucleo_u545re_q": { "description": "STM32U545RE-based Nucleo development board", "arch": "cortex-m4", diff --git a/tockloader/openocd.py b/tockloader/openocd.py index 3274234..62cc9d5 100644 --- a/tockloader/openocd.py +++ b/tockloader/openocd.py @@ -248,6 +248,11 @@ def _list_emulators(self): openocd_cmd=self.openocd_cmd ) ) + openocd_commands.append( + '{openocd_cmd} -c "source [find interface/stlink.cfg]; transport select hla_swd; source [find target/stm32wlx.cfg]; init; exit;"'.format( + openocd_cmd=self.openocd_cmd + ) + ) # These are the magic strings in the output of openocd we are looking # for. If there is a better way to do this then we should change. But, @@ -259,6 +264,7 @@ def _list_emulators(self): ("(mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)", "arty"), ("SWD DPIDR 0x2ba01477", "microbit_v2"), ("stm32f4x.cpu", "stm32f4discovery"), + ("stm32wlx.cpu", "stm32wle5jc"), ] emulators = [] diff --git a/tockloader/tockloader.py b/tockloader/tockloader.py index da3fe70..6a5de95 100644 --- a/tockloader/tockloader.py +++ b/tockloader/tockloader.py @@ -153,6 +153,10 @@ class TockLoader: "lpc55s69": { "start_address": 0x20000, }, + "stm32wle5jc": { + "start_address": 0x8018000, + "cmd_flags": {"openocd": True}, + }, "nucleo_u545re_q": { "start_address": 0x08040000, "cmd_flags": {"openocd": True},