Add/Correct STM8L15xx2/3/4/6/8 devices 90/7690/5
authorDominik Wernberger <dominik.wernberger@gmx.de>
Thu, 18 May 2023 14:51:55 +0000 (16:51 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 2 Jun 2023 20:59:36 +0000 (20:59 +0000)
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>
tcl/board/st_nucleo_8l152r8.cfg
tcl/target/stm8l151x2.cfg [new file with mode: 0644]
tcl/target/stm8l151x3.cfg [new file with mode: 0644]
tcl/target/stm8l152.cfg
tcl/target/stm8l15xx4.cfg [new file with mode: 0644]
tcl/target/stm8l15xx6.cfg [new file with mode: 0644]
tcl/target/stm8l15xx8.cfg [new file with mode: 0644]

index f06d74981cd66a9a19d710167a27429eebc7e7c6..7cb8bcecd8a96515845c6c7d0a14204a79ef2424 100644 (file)
@@ -7,6 +7,6 @@ source [find interface/stlink-dap.cfg]
 
 transport select swim
 
-source [find target/stm8l152.cfg]
+source [find target/stm8l15xx8.cfg]
 
 reset_config srst_only
diff --git a/tcl/target/stm8l151x2.cfg b/tcl/target/stm8l151x2.cfg
new file mode 100644 (file)
index 0000000..db88c71
--- /dev/null
@@ -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 (file)
index 0000000..fe904b4
--- /dev/null
@@ -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]
index b716ce18efbf00849aa56ba957329bb758018fe0..033b826d8e51342d9058a02f7bc7a5361ec02878 100644 (file)
@@ -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 (file)
index 0000000..4438193
--- /dev/null
@@ -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 (file)
index 0000000..5243295
--- /dev/null
@@ -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 (file)
index 0000000..e354827
--- /dev/null
@@ -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]

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)