Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions boards/st/b_l072z_lrwan1/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]
transport select dapdirect_swd

transport select hla_swd
# If you use an OpenOCD version higher than 0.12.0 and your target embeds
# an ST-Link firmware earlier than v2j24, connection will not work.
# It is recommended to upgrade the ST-Link firmware of the target,
# however, if not possible, the 2 lines above can be replaced with the
# following to connect successfully:
#
# source [find interface/stlink-hla.cfg]
# transport select hla_swd

set WORKAREASIZE 0x2000

Expand Down
8 changes: 1 addition & 7 deletions boards/st/nucleo_g070rb/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32g0x.cfg]

reset_config srst_only
source [find board/st_nucleo_g0.cfg]
8 changes: 1 addition & 7 deletions boards/st/nucleo_g071rb/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32g0x.cfg]

reset_config srst_only
source [find board/st_nucleo_g0.cfg]
8 changes: 1 addition & 7 deletions boards/st/nucleo_g0b1re/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32g0x.cfg]

reset_config srst_only
source [find board/st_nucleo_g0.cfg]
8 changes: 1 addition & 7 deletions boards/st/nucleo_g431kb/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32g4x.cfg]

reset_config srst_only
source [find board/st_nucleo_g4.cfg]
8 changes: 1 addition & 7 deletions boards/st/nucleo_g431rb/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32g4x.cfg]

reset_config srst_only
source [find board/st_nucleo_g4.cfg]
8 changes: 1 addition & 7 deletions boards/st/nucleo_g474re/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32g4x.cfg]

reset_config srst_only
source [find board/st_nucleo_g4.cfg]
13 changes: 11 additions & 2 deletions boards/st/nucleo_l011k4/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# This is an ST NUCLEO-L011K4 board with single STM32L011K4 chip.
# https://www.st.com/en/evaluation-tools/nucleo-l011k4.html
source [find interface/stlink.cfg]

transport select hla_swd
source [find interface/stlink-dap.cfg]
transport select dapdirect_swd

# If you use an OpenOCD version higher than 0.12.0 and your target embeds
# an ST-Link firmware earlier than v2j24, connection will not work.
# It is recommended to upgrade the ST-Link firmware of the target,
# however, if not possible, the 2 lines above can be replaced with the
# following to connect successfully:
#
# source [find interface/stlink-hla.cfg]
# transport select hla_swd

#set WORKAREASIZE 0x2000

Expand Down
13 changes: 11 additions & 2 deletions boards/st/nucleo_l031k6/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# This is an ST NUCLEO-L031K6 board with single STM32L031K6 chip.
# https://www.st.com/en/evaluation-tools/nucleo-l031k6.html
source [find interface/stlink.cfg]

transport select hla_swd
source [find interface/stlink-dap.cfg]
transport select dapdirect_swd

# If you use an OpenOCD version higher than 0.12.0 and your target embeds
# an ST-Link firmware earlier than v2j24, connection will not work.
# It is recommended to upgrade the ST-Link firmware of the target,
# however, if not possible, the 2 lines above can be replaced with the
# following to connect successfully:
#
# source [find interface/stlink-hla.cfg]
# transport select hla_swd

source [find target/stm32l0.cfg]

Expand Down
13 changes: 11 additions & 2 deletions boards/st/nucleo_l053r8/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# This is an ST NUCLEO-L053R8 board with single STM32L053R8 chip.
# https://www.st.com/en/evaluation-tools/nucleo-l053r8.html
source [find interface/stlink.cfg]

transport select hla_swd
source [find interface/stlink-dap.cfg]
transport select dapdirect_swd

# If you use an OpenOCD version higher than 0.12.0 and your target embeds
# an ST-Link firmware earlier than v2j24, connection will not work.
# It is recommended to upgrade the ST-Link firmware of the target,
# however, if not possible, the 2 lines above can be replaced with the
# following to connect successfully:
#
# source [find interface/stlink-hla.cfg]
# transport select hla_swd

set WORKAREASIZE 0x2000

Expand Down
15 changes: 1 addition & 14 deletions boards/st/nucleo_l073rz/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# This is an ST NUCLEO-L073RZ board with single STM32L073RZ chip.
# https://www.st.com/en/evaluation-tools/nucleo-l073rz.html
source [find interface/stlink.cfg]

transport select hla_swd

set WORKAREASIZE 0x2000

source [find target/stm32l0.cfg]

# Add the second flash bank.
set _FLASHNAME $_CHIPNAME.flash1
flash bank $_FLASHNAME stm32lx 0 0 0 0 $_TARGETNAME

# There is only system reset line and JTAG/SWD command can be issued when SRST
reset_config srst_only
source [find board/st_nucleo_l073rz.cfg]

$_TARGETNAME configure -event gdb-attach {
echo "Debugger attaching: halting execution"
Expand Down
14 changes: 2 additions & 12 deletions boards/st/nucleo_l152re/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# TODO: Once official openOCD fix merged and available in zephyr:
# http://openocd.zylin.com/#/c/5829/
# revert to board/st_nucleo_l1.cfg
# source [find board/st_nucleo_l1.cfg]

source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32l1x_dual_bank.cfg]

reset_config srst_only
# http://openocd.zylin.com/#/c/5829/ was merged in 2020
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this could be dropped entirely (moved to commit message if anything)

Suggested change
# http://openocd.zylin.com/#/c/5829/ was merged in 2020

source [find board/st_nucleo_l1.cfg]

$_TARGETNAME configure -event gdb-attach {
echo "Debugger attaching: halting execution"
Expand Down
8 changes: 1 addition & 7 deletions boards/st/nucleo_l412rb_p/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32l4x.cfg]

reset_config srst_only
source [find board/st_nucleo_l4.cfg]
8 changes: 1 addition & 7 deletions boards/st/nucleo_l432kc/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32l4x.cfg]

reset_config srst_only
source [find board/st_nucleo_l4.cfg]
8 changes: 1 addition & 7 deletions boards/st/nucleo_l433rc_p/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32l4x.cfg]

reset_config srst_only
source [find board/st_nucleo_l4.cfg]
8 changes: 1 addition & 7 deletions boards/st/nucleo_l452re/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32l4x.cfg]

reset_config srst_only
source [find board/st_nucleo_l4.cfg]
9 changes: 1 addition & 8 deletions boards/st/nucleo_l552ze_q/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32l5x.cfg]

# use hardware reset
reset_config srst_only srst_nogate
source [find board/st_nucleo_l5.cfg]

$_TARGETNAME configure -event gdb-attach {
echo "Debugger attaching: halting execution"
Expand Down
8 changes: 1 addition & 7 deletions boards/st/nucleo_wb55rg/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32wbx.cfg]

reset_config srst_only
source [find board/st_nucleo_wb55rg]
4 changes: 2 additions & 2 deletions boards/st/nucleo_wl55jc/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]

transport select hla_swd
transport select dapdirect_swd

source [find target/stm32wlx.cfg]

Expand Down
12 changes: 10 additions & 2 deletions boards/st/st25dv_mb1283_disco/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]
transport select dapdirect_swd

transport select hla_swd
# If you use an OpenOCD version higher than 0.12.0 and your target embeds
# an ST-Link firmware earlier than v2j24, connection will not work.
# It is recommended to upgrade the ST-Link firmware of the target,
# however, if not possible, the 2 lines above can be replaced with the
# following to connect successfully:
#
# source [find interface/stlink-hla.cfg]
# transport select hla_swd
Comment on lines +4 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
# If you use an OpenOCD version higher than 0.12.0 and your target embeds
# an ST-Link firmware earlier than v2j24, connection will not work.
# It is recommended to upgrade the ST-Link firmware of the target,
# however, if not possible, the 2 lines above can be replaced with the
# following to connect successfully:
#
# source [find interface/stlink-hla.cfg]
# transport select hla_swd
# If you use an OpenOCD version higher than 0.12.0 and your target embeds
# an ST-Link adapter running a firmware earlier than version V2J24, connection will not work.
# It is recommended to upgrade the ST-Link firmware of the target adapter;
# however, if not possible, the 2 lines above can be replaced with the
# following to connect successfully:
#
# source [find interface/stlink-hla.cfg]
# transport select hla_swd

(ditto; I'll let you realign paragraphs to fit length limit)


source [find target/stm32f4x.cfg]

Expand Down
12 changes: 10 additions & 2 deletions boards/st/steval_fcu001v1/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]
transport select dapdirect_swd

transport select hla_swd
# If you use an OpenOCD version higher than 0.12.0 and your target embeds
# an ST-Link firmware earlier than v2j24, connection will not work.
# It is recommended to upgrade the ST-Link firmware of the target,
# however, if not possible, the 2 lines above can be replaced with the
# following to connect successfully:
#
# source [find interface/stlink-hla.cfg]
# transport select hla_swd

set WORKAREASIZE 0x10000

Expand Down
4 changes: 2 additions & 2 deletions boards/st/stm32g0316_disco/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]

transport select hla_swd
transport select dapdirect_swd

source [find target/stm32g0x.cfg]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]

transport select hla_swd
transport select dapdirect_swd

set DUAL_BANK 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]

transport select hla_swd
transport select dapdirect_swd

source [find target/stm32h7x.cfg]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2025 Foss Analytical A/S

source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]

transport select hla_swd
transport select dapdirect_swd

set DUAL_BANK 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2025 Foss Analytical A/S

source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]

transport select hla_swd
transport select dapdirect_swd

source [find target/stm32h7x.cfg]

Expand Down
9 changes: 1 addition & 8 deletions boards/st/stm32l562e_dk/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32l5x.cfg]

# use hardware reset
reset_config srst_only srst_nogate
source [find board/st_nucleo_l5.cfg]

$_TARGETNAME configure -event gdb-attach {
echo "Debugger attaching: halting execution"
Expand Down
9 changes: 2 additions & 7 deletions boards/st/stm32wb5mm_dk/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32wbx.cfg]

reset_config srst_only
# OpenOCD st_nucleo_wb55rg.cfg matches stm32wb55mm_dk support
source [find board/st_nucleo_wb55rg.cfg]
9 changes: 2 additions & 7 deletions boards/st/stm32wb5mmg/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32wbx.cfg]

reset_config srst_only
# OpenOCD st_nucleo_wb55rg.cfg matches stm32wb55mmg support
source [find board/st_nucleo_wb55k.cfg]
10 changes: 10 additions & 0 deletions doc/releases/migration-guide-4.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ Boards

* Panasonic ``panb511evb`` is renamed to ``panb611evb``.

* STM32 boards OpenOCD configuration files have been changed to support latest OpenOCD versions
(> v0.12.0) in which the HLA/SWD transport has been deprecated (see
https://review.openocd.org/c/openocd/+/8523 and commit
https://sourceforge.net/p/openocd/code/ci/34ec5536c0ba3315bc5a841244bbf70141ccfbb4/).
Issues may be encountered when connecting to an ST-Link adapter running firmware prior
v2j24 which do not support the new transport. In this case, the ST-Link firmware should
be upgraded or, if not possible, the OpenOCD configuration script should be changed to
source "interface/stlink-hla.cfg" and select the "hla_swd" interface explicitly.
Backward compatibility with OpenOCD v0.12.0 or older is maintained.
Comment on lines +63 to +67
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
Issues may be encountered when connecting to an ST-Link adapter running firmware prior
v2j24 which do not support the new transport. In this case, the ST-Link firmware should
be upgraded or, if not possible, the OpenOCD configuration script should be changed to
source "interface/stlink-hla.cfg" and select the "hla_swd" interface explicitly.
Backward compatibility with OpenOCD v0.12.0 or older is maintained.
Issues may be encountered when connecting to an ST-Link adapter running firmware prior
to version V2J24 which do not support the new transport. In this case, the ST-Link firmware should
be upgraded or, if not possible, the OpenOCD configuration script should be changed to
source "interface/stlink-hla.cfg" and select the "hla_swd" interface explicitly.
Backward compatibility with OpenOCD v0.12.0 or older is maintained.

(I'll let you re-align paragraph to fit length limit)


Device Drivers and Devicetree
*****************************

Expand Down