aboutsummaryrefslogtreecommitdiff
path: root/tcl/target
diff options
context:
space:
mode:
authorDominik Wernberger <dominik.wernberger@gmx.de>2023-05-18 16:51:55 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2023-06-02 20:59:36 +0000
commit00cbf7bd318c840d9ec3893a3809dd9d0c2e3fa7 (patch)
tree1ba39d8a4a8c18a36677ff8efc3a85a401bd93f2 /tcl/target
parent0e526314a155c73e5eac2dc6bdea0235738ca1a2 (diff)
downloadriscv-openocd-00cbf7bd318c840d9ec3893a3809dd9d0c2e3fa7.zip
riscv-openocd-00cbf7bd318c840d9ec3893a3809dd9d0c2e3fa7.tar.gz
riscv-openocd-00cbf7bd318c840d9ec3893a3809dd9d0c2e3fa7.tar.bz2
Add/Correct STM8L15xx2/3/4/6/8 devices
Change-Id: I83fe1e50821ec15e1853aca96ebb32fe1ff5328f Signed-off-by: Dominik Wernberger <dominik.wernberger@gmx.de> Reviewed-on: https://review.openocd.org/c/openocd/+/7690 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'tcl/target')
-rw-r--r--tcl/target/stm8l151x2.cfg32
-rw-r--r--tcl/target/stm8l151x3.cfg32
-rw-r--r--tcl/target/stm8l152.cfg3
-rw-r--r--tcl/target/stm8l15xx4.cfg33
-rw-r--r--tcl/target/stm8l15xx6.cfg35
-rw-r--r--tcl/target/stm8l15xx8.cfg35
6 files changed, 169 insertions, 1 deletions
diff --git a/tcl/target/stm8l151x2.cfg b/tcl/target/stm8l151x2.cfg
new file mode 100644
index 0000000..db88c71
--- /dev/null
+++ b/tcl/target/stm8l151x2.cfg
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Config script for STM8L151x2
+# Supported Devices:
+# STM8L151C2
+# STM8L151F2
+# STM8L151G2
+# STM8L151K2
+
+# 1kB RAM
+# Start 0x0000
+# End 0x03ff
+set WORKAREASIZE 1024
+
+# 4kB Flash
+set FLASHSTART 0x8000
+set FLASHEND 0x8fff
+
+# 256B EEPROM
+set EEPROMSTART 0x1000
+set EEPROMEND 0x10ff
+
+set OPTIONSTART 0x4800
+set OPTIONEND 0x487f
+
+proc stm8_reset_rop {} {
+ mwb 0x4800 0xaa
+ mwb 0x4800 0xaa
+ reset halt
+}
+
+source [find target/stm8l.cfg]
diff --git a/tcl/target/stm8l151x3.cfg b/tcl/target/stm8l151x3.cfg
new file mode 100644
index 0000000..fe904b4
--- /dev/null
+++ b/tcl/target/stm8l151x3.cfg
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Config script for STM8L151x3
+# Supported Devices:
+# STM8L151C3
+# STM8L151F3
+# STM8L151G3
+# STM8L151K3
+
+# 1kB RAM
+# Start 0x0000
+# End 0x03ff
+set WORKAREASIZE 1024
+
+# 8kB Flash
+set FLASHSTART 0x8000
+set FLASHEND 0x9fff
+
+# 256B EEPROM
+set EEPROMSTART 0x1000
+set EEPROMEND 0x10ff
+
+set OPTIONSTART 0x4800
+set OPTIONEND 0x487f
+
+proc stm8_reset_rop {} {
+ mwb 0x4800 0xaa
+ mwb 0x4800 0xaa
+ reset halt
+}
+
+source [find target/stm8l.cfg]
diff --git a/tcl/target/stm8l152.cfg b/tcl/target/stm8l152.cfg
index b716ce1..033b826 100644
--- a/tcl/target/stm8l152.cfg
+++ b/tcl/target/stm8l152.cfg
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-#config script for STM8L152
+echo 'DEPRECATED: choose between stm8l15xx4.cfg, stm8l15xx6.cfg and stm8l15xx8.cfg instead of stm8l152.cfg'
+echo ' using stm8l152.cfg for backwards compatability'
set EEPROMSTART 0x1000
set EEPROMEND 0x13ff
diff --git a/tcl/target/stm8l15xx4.cfg b/tcl/target/stm8l15xx4.cfg
new file mode 100644
index 0000000..4438193
--- /dev/null
+++ b/tcl/target/stm8l15xx4.cfg
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Config script for STM8L151x4/STM8L152x4
+# Supported Devices:
+# STM8L151C4
+# STM8L151G4
+# STM8L151K4
+# STM8L152C4
+# STM8L152K4
+
+# 2kB RAM
+# Start 0x0000
+# End 0x07ff
+set WORKAREASIZE 2048
+
+# 16kB Flash
+set FLASHSTART 0x8000
+set FLASHEND 0xbfff
+
+# 1kB EEPROM
+set EEPROMSTART 0x1000
+set EEPROMEND 0x13ff
+
+set OPTIONSTART 0x4800
+set OPTIONEND 0x48ff
+
+proc stm8_reset_rop {} {
+ mwb 0x4800 0xaa
+ mwb 0x4800 0xaa
+ reset halt
+}
+
+source [find target/stm8l.cfg]
diff --git a/tcl/target/stm8l15xx6.cfg b/tcl/target/stm8l15xx6.cfg
new file mode 100644
index 0000000..5243295
--- /dev/null
+++ b/tcl/target/stm8l15xx6.cfg
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Config script for STM8L151x6/STM8L152x6
+# Supported Devices:
+# STM8L151C6
+# STM8L151G6
+# STM8L151K6
+# STM8L151R6
+# STM8L152C6
+# STM8L152K6
+# STM8L152R6
+
+# 2kB RAM
+# Start 0x0000
+# End 0x07ff
+set WORKAREASIZE 2048
+
+# 32kB Flash
+set FLASHSTART 0x8000
+set FLASHEND 0xffff
+
+# 1kB EEPROM
+set EEPROMSTART 0x1000
+set EEPROMEND 0x13ff
+
+set OPTIONSTART 0x4800
+set OPTIONEND 0x48ff
+
+proc stm8_reset_rop {} {
+ mwb 0x4800 0xaa
+ mwb 0x4800 0xaa
+ reset halt
+}
+
+source [find target/stm8l.cfg]
diff --git a/tcl/target/stm8l15xx8.cfg b/tcl/target/stm8l15xx8.cfg
new file mode 100644
index 0000000..e354827
--- /dev/null
+++ b/tcl/target/stm8l15xx8.cfg
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Config script for STM8L151x8/STM8L152x8
+# Supported Devices:
+# STM8L151C8
+# STM8L151M8
+# STM8L151R8
+# STM8L152C8
+# STM8L152K8
+# STM8L152M8
+# STM8L152R8
+
+# 4kB RAM
+# Start 0x0000
+# End 0x0fff
+set WORKAREASIZE 4096
+
+# 64kB Flash
+set FLASHSTART 0x08000
+set FLASHEND 0x17fff
+
+# 2kB EEPROM
+set EEPROMSTART 0x1000
+set EEPROMEND 0x17ff
+
+set OPTIONSTART 0x4800
+set OPTIONEND 0x48ff
+
+proc stm8_reset_rop {} {
+ mwb 0x4800 0xaa
+ mwb 0x4800 0xaa
+ reset halt
+}
+
+source [find target/stm8l.cfg]