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>
This commit is contained in:
Dominik Wernberger 2023-05-18 16:51:55 +02:00 committed by Antonio Borneo
parent 0e526314a1
commit 00cbf7bd31
7 changed files with 170 additions and 2 deletions

View File

@ -7,6 +7,6 @@ source [find interface/stlink-dap.cfg]
transport select swim transport select swim
source [find target/stm8l152.cfg] source [find target/stm8l15xx8.cfg]
reset_config srst_only reset_config srst_only

32
tcl/target/stm8l151x2.cfg Normal file
View File

@ -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]

32
tcl/target/stm8l151x3.cfg Normal file
View File

@ -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]

View File

@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later # 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 EEPROMSTART 0x1000
set EEPROMEND 0x13ff set EEPROMEND 0x13ff

33
tcl/target/stm8l15xx4.cfg Normal file
View File

@ -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]

35
tcl/target/stm8l15xx6.cfg Normal file
View File

@ -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]

35
tcl/target/stm8l15xx8.cfg Normal file
View File

@ -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]