transport select swim
-source [find target/stm8l152.cfg]
+source [find target/stm8l15xx8.cfg]
reset_config srst_only
--- /dev/null
+# 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]
--- /dev/null
+# 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]
# 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
--- /dev/null
+# 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]
--- /dev/null
+# 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]
--- /dev/null
+# 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]