You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: openocd-gerrit <ope...@us...> - 2025-06-07 09:59:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 3fbca95ae13b8caea3194a85bc4b2a29ebe31a66 (commit) from 20d7e83576e9f7ef23cd569a6b60f0ab2d702b36 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3fbca95ae13b8caea3194a85bc4b2a29ebe31a66 Author: Marc Schink <de...@za...> Date: Thu Apr 24 07:51:42 2025 +0000 tcl/board: Add config for nRF5340 development kit Tested with nRF5340 development kit. Change-Id: I44f1ba176dd4ac491b5dccea4c4d6d6d9bfaf479 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8867 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/board/nordic/nrf5340-dk.cfg b/tcl/board/nordic/nrf5340-dk.cfg new file mode 100644 index 000000000..fd7a40d66 --- /dev/null +++ b/tcl/board/nordic/nrf5340-dk.cfg @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# +# Nordic Semiconductor nRF5340 Development Kit +# https://www.nordicsemi.com/Products/Development-hardware/nRF5340-DK +# + +source [find interface/jlink.cfg] + +transport select swd + +source [find target/nordic/nrf53.cfg] ----------------------------------------------------------------------- Summary of changes: tcl/board/nordic/nrf5340-dk.cfg | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tcl/board/nordic/nrf5340-dk.cfg hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 09:58:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 20d7e83576e9f7ef23cd569a6b60f0ab2d702b36 (commit) from 895dfb5d87f9af18004c654163f48d3a5c9e92b6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 20d7e83576e9f7ef23cd569a6b60f0ab2d702b36 Author: Marc Schink <de...@za...> Date: Thu Apr 24 06:24:24 2025 +0000 tcl/board: Add config for nRF9160 development kit Tested with nRF9160 development kit. Change-Id: I367b869b9707bef0547b5d3575b24e19db74cd21 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8866 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/board/nordic/nrf9160-dk.cfg b/tcl/board/nordic/nrf9160-dk.cfg new file mode 100644 index 000000000..dc456202c --- /dev/null +++ b/tcl/board/nordic/nrf9160-dk.cfg @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# +# Nordic Semiconductor nRF9160 Development Kit +# https://www.nordicsemi.com/Products/Development-hardware/nRF9160-DK +# + +source [find interface/jlink.cfg] + +transport select swd + +source [find target/nordic/nrf91.cfg] ----------------------------------------------------------------------- Summary of changes: tcl/board/nordic/nrf9160-dk.cfg | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tcl/board/nordic/nrf9160-dk.cfg hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 09:58:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 895dfb5d87f9af18004c654163f48d3a5c9e92b6 (commit) from 84f6c561f35fe4fec3c810c0c0c5e4090cb85fe1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 895dfb5d87f9af18004c654163f48d3a5c9e92b6 Author: Marc Schink <de...@za...> Date: Mon Apr 21 18:10:20 2025 +0000 tcl/board: Deprecate nordic_nrf52_ftx232.cfg Board configuration files for specific external debug adapters are not / no longer supported. Checkpatch-ignore: LONG_LINE_STRING Change-Id: I0f391dfb1a2d7ceb92c2ad3e34eaeb8a85b2cdc5 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8865 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/board/nordic_nrf52_ftx232.cfg b/tcl/board/nordic_nrf52_ftx232.cfg index 848d5dcd3..772d176d6 100644 --- a/tcl/board/nordic_nrf52_ftx232.cfg +++ b/tcl/board/nordic_nrf52_ftx232.cfg @@ -5,6 +5,8 @@ # or any FT232H/FT2232H/FT4232H based board/module # +echo "WARNING: 'board/nordic_nrf52_ftx232.cfg' is deprecated, use '-f interface/ftdi/ft232h-module-swd.cfg -f target/nordic/nrf52.cfg' instead" + source [find interface/ftdi/ft232h-module-swd.cfg] #source [find interface/ftdi/minimodule-swd.cfg] ----------------------------------------------------------------------- Summary of changes: tcl/board/nordic_nrf52_ftx232.cfg | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 09:57:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 84f6c561f35fe4fec3c810c0c0c5e4090cb85fe1 (commit) from 1ee7c09d9513e17bf37b0286ddec3a7f0a2ffbdc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 84f6c561f35fe4fec3c810c0c0c5e4090cb85fe1 Author: Marc Schink <de...@za...> Date: Mon May 12 10:43:19 2025 +0200 tcl/board: Deprecate old nordic configuration files Add the old configuration files to the 'file_renaming' list in order to ensure backwards compatibility. Change-Id: Ia61df8e5cd8c19cee19a494635c8025e36f3f4a7 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8907 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/file_renaming.cfg b/tcl/file_renaming.cfg index d7937f6e2..0a3c7ba65 100644 --- a/tcl/file_renaming.cfg +++ b/tcl/file_renaming.cfg @@ -14,6 +14,9 @@ # board, chip, cpld, cpu, fpga, interface, target, test, tools set _file_renaming { + board/nordic_nrf51822_mkit.cfg board/nordic/nrf51822-mkit.cfg + board/nordic_nrf51_dk.cfg board/nordic/nrf51-dk.cfg + board/nordic_nrf52_dk.cfg board/nordic/nrf52-dk.cfg target/nrf51.cfg target/nordic/nrf51.cfg target/nrf52.cfg target/nordic/nrf52.cfg target/nrf53.cfg target/nordic/nrf53.cfg ----------------------------------------------------------------------- Summary of changes: tcl/file_renaming.cfg | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 09:10:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1ee7c09d9513e17bf37b0286ddec3a7f0a2ffbdc (commit) from fbdb86adbd897337de6ee5b1b25a6f4ee7b5e4e4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1ee7c09d9513e17bf37b0286ddec3a7f0a2ffbdc Author: Marc Schink <de...@za...> Date: Mon May 12 10:42:11 2025 +0200 tcl/board: Move nordic configuration files Move board configuration files into a dedicated vendor directory as required by the new guideline for configuration files. Change-Id: Icbf368d7a453c82813e685d2935b186eb738c3ea Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8864 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/board/nordic_nrf51_dk.cfg b/tcl/board/nordic/nrf51-dk.cfg similarity index 100% rename from tcl/board/nordic_nrf51_dk.cfg rename to tcl/board/nordic/nrf51-dk.cfg diff --git a/tcl/board/nordic_nrf51822_mkit.cfg b/tcl/board/nordic/nrf51822-mkit.cfg similarity index 100% rename from tcl/board/nordic_nrf51822_mkit.cfg rename to tcl/board/nordic/nrf51822-mkit.cfg diff --git a/tcl/board/nordic_nrf52_dk.cfg b/tcl/board/nordic/nrf52-dk.cfg similarity index 100% rename from tcl/board/nordic_nrf52_dk.cfg rename to tcl/board/nordic/nrf52-dk.cfg ----------------------------------------------------------------------- Summary of changes: tcl/board/{nordic_nrf51_dk.cfg => nordic/nrf51-dk.cfg} | 0 tcl/board/{nordic_nrf51822_mkit.cfg => nordic/nrf51822-mkit.cfg} | 0 tcl/board/{nordic_nrf52_dk.cfg => nordic/nrf52-dk.cfg} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename tcl/board/{nordic_nrf51_dk.cfg => nordic/nrf51-dk.cfg} (100%) rename tcl/board/{nordic_nrf51822_mkit.cfg => nordic/nrf51822-mkit.cfg} (100%) rename tcl/board/{nordic_nrf52_dk.cfg => nordic/nrf52-dk.cfg} (100%) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 09:09:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via fbdb86adbd897337de6ee5b1b25a6f4ee7b5e4e4 (commit) from 83c1546e77b7683508fd17decf66763cd72393bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fbdb86adbd897337de6ee5b1b25a6f4ee7b5e4e4 Author: Marc Schink <de...@za...> Date: Mon May 12 10:54:49 2025 +0200 tcl/board: Use moved nordic target files Use the moved nordic target configuration files. Change-Id: Ie0e2eb7f9514eedb1ae6678eeee59291856c2674 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8906 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/board/nordic_nrf51822_mkit.cfg b/tcl/board/nordic_nrf51822_mkit.cfg index 266d71070..fd3227178 100644 --- a/tcl/board/nordic_nrf51822_mkit.cfg +++ b/tcl/board/nordic_nrf51822_mkit.cfg @@ -5,4 +5,4 @@ # source [find interface/cmsis-dap.cfg] -source [find target/nrf51.cfg] +source [find target/nordic/nrf51.cfg] diff --git a/tcl/board/nordic_nrf51_dk.cfg b/tcl/board/nordic_nrf51_dk.cfg index 7ddae2d43..4ccd3272e 100644 --- a/tcl/board/nordic_nrf51_dk.cfg +++ b/tcl/board/nordic_nrf51_dk.cfg @@ -8,4 +8,4 @@ source [find interface/jlink.cfg] transport select swd -source [find target/nrf51.cfg] +source [find target/nordic/nrf51.cfg] diff --git a/tcl/board/nordic_nrf52_dk.cfg b/tcl/board/nordic_nrf52_dk.cfg index 7366bf94a..9b2390a62 100644 --- a/tcl/board/nordic_nrf52_dk.cfg +++ b/tcl/board/nordic_nrf52_dk.cfg @@ -8,4 +8,4 @@ source [find interface/jlink.cfg] transport select swd -source [find target/nrf52.cfg] +source [find target/nordic/nrf52.cfg] diff --git a/tcl/board/nordic_nrf52_ftx232.cfg b/tcl/board/nordic_nrf52_ftx232.cfg index c3c69a89a..848d5dcd3 100644 --- a/tcl/board/nordic_nrf52_ftx232.cfg +++ b/tcl/board/nordic_nrf52_ftx232.cfg @@ -10,4 +10,4 @@ source [find interface/ftdi/ft232h-module-swd.cfg] transport select swd -source [find target/nrf52.cfg] +source [find target/nordic/nrf52.cfg] ----------------------------------------------------------------------- Summary of changes: tcl/board/nordic_nrf51822_mkit.cfg | 2 +- tcl/board/nordic_nrf51_dk.cfg | 2 +- tcl/board/nordic_nrf52_dk.cfg | 2 +- tcl/board/nordic_nrf52_ftx232.cfg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 09:08:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 83c1546e77b7683508fd17decf66763cd72393bf (commit) from 152becc4607e97aa692e41cb281753121d9ee75d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 83c1546e77b7683508fd17decf66763cd72393bf Author: Marc Schink <de...@za...> Date: Mon May 12 06:53:16 2025 +0200 tcl/target: Deprecate old nordic configuration files Keep the old configuration files to ensure backwards compatibility. Change-Id: Ia1d06b5a8a646d65f2cdc5a9415df3014a93b7d7 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8863 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/file_renaming.cfg b/tcl/file_renaming.cfg index 81e54823f..d7937f6e2 100644 --- a/tcl/file_renaming.cfg +++ b/tcl/file_renaming.cfg @@ -14,6 +14,8 @@ # board, chip, cpld, cpu, fpga, interface, target, test, tools set _file_renaming { - board/hello.cfg board/st/nucleo-u083rc.cfg - board/my-funny-pcb.cfg board/st_nucleo_f0.cfg + target/nrf51.cfg target/nordic/nrf51.cfg + target/nrf52.cfg target/nordic/nrf52.cfg + target/nrf53.cfg target/nordic/nrf53.cfg + target/nrf91.cfg target/nordic/nrf91.cfg } ----------------------------------------------------------------------- Summary of changes: tcl/file_renaming.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 09:06:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 152becc4607e97aa692e41cb281753121d9ee75d (commit) from b06212b5a2fc5b9bff72327bc7d5a7ec1c7ef613 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 152becc4607e97aa692e41cb281753121d9ee75d Author: Marc Schink <de...@za...> Date: Mon May 12 06:47:22 2025 +0200 tcl/target: Move nordic configuration files Move target configuration files into a dedicated vendor directory as required by the new guideline for configuration files. Note that the moved files are still accessible via the old path to ensure backwards compatibility. This works because of the extended file search in vendor folders. Change-Id: If3935985769dc543e8c7d72cda590c9d79303abb Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8905 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/tcl/target/nrf_common.cfg b/tcl/target/nordic/common.cfg similarity index 100% rename from tcl/target/nrf_common.cfg rename to tcl/target/nordic/common.cfg diff --git a/tcl/target/nrf51.cfg b/tcl/target/nordic/nrf51.cfg similarity index 100% rename from tcl/target/nrf51.cfg rename to tcl/target/nordic/nrf51.cfg diff --git a/tcl/target/nrf52.cfg b/tcl/target/nordic/nrf52.cfg similarity index 100% rename from tcl/target/nrf52.cfg rename to tcl/target/nordic/nrf52.cfg diff --git a/tcl/target/nrf53.cfg b/tcl/target/nordic/nrf53.cfg similarity index 99% rename from tcl/target/nrf53.cfg rename to tcl/target/nordic/nrf53.cfg index 307df902c..0dcfd55ec 100644 --- a/tcl/target/nrf53.cfg +++ b/tcl/target/nordic/nrf53.cfg @@ -60,7 +60,7 @@ if { ![using_hla] } { # Keep adapter speed less or equal 2000 kHz or flash programming fails! adapter speed 1000 -source [find target/nrf_common.cfg] +source [find target/nordic/common.cfg] flash bank $_CHIPNAME.app.flash nrf5 0x00000000 0 0 0 $_TARGETNAME_APP flash bank $_CHIPNAME.app.uicr nrf5 0x00FF8000 0 0 0 $_TARGETNAME_APP diff --git a/tcl/target/nrf91.cfg b/tcl/target/nordic/nrf91.cfg similarity index 97% rename from tcl/target/nrf91.cfg rename to tcl/target/nordic/nrf91.cfg index e0ff4e546..64ed864e7 100644 --- a/tcl/target/nrf91.cfg +++ b/tcl/target/nordic/nrf91.cfg @@ -45,7 +45,7 @@ adapter speed 1000 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 -source [find target/nrf_common.cfg] +source [find target/nordic/common.cfg] flash bank $_CHIPNAME.flash nrf5 0x00000000 0 0 0 $_TARGETNAME flash bank $_CHIPNAME.uicr nrf5 0x00FF8000 0 0 0 $_TARGETNAME ----------------------------------------------------------------------- Summary of changes: tcl/target/{nrf_common.cfg => nordic/common.cfg} | 0 tcl/target/{ => nordic}/nrf51.cfg | 0 tcl/target/{ => nordic}/nrf52.cfg | 0 tcl/target/{ => nordic}/nrf53.cfg | 2 +- tcl/target/{ => nordic}/nrf91.cfg | 2 +- 5 files changed, 2 insertions(+), 2 deletions(-) rename tcl/target/{nrf_common.cfg => nordic/common.cfg} (100%) rename tcl/target/{ => nordic}/nrf51.cfg (100%) rename tcl/target/{ => nordic}/nrf52.cfg (100%) rename tcl/target/{ => nordic}/nrf53.cfg (99%) rename tcl/target/{ => nordic}/nrf91.cfg (97%) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:49:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b06212b5a2fc5b9bff72327bc7d5a7ec1c7ef613 (commit) from b1c1dd1ec4b014d3b17be7598b7ecfebe97edcb5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b06212b5a2fc5b9bff72327bc7d5a7ec1c7ef613 Author: Antonio Borneo <bor...@gm...> Date: Wed May 21 15:19:28 2025 +0200 startup.tcl: extend the file search in vendor folders The TCL configuration files are going to be dispatched in vendor specific folders. Old user configuration files will fail to find the new files to include, so a set of fallback files reporting the deprecation should replace the renamed files. To prevent such enormous proliferation of fallback files, extend the search of files in the vendor folders too. For non-trivial renames, a dedicated table is added in the file tcl/file_renaming.cfg to track old --> new file names. The deprecated message is then part of the extended search. E.g.: old file names: - path/to/a/certain/vendor_config_file - path/to/a/certain/vendor-config_file trigger search of: - path/to/a/certain/vendor/config_file and - path/to/a/certain/config_file trigger search of: - path/to/a/certain/${vendor}/config_file among a possible vendors list. This is a temporarily feature that should be removed as soon as possible to prevent clashing on files with the same name. The names in tcl/file_renaming.cfg are for demonstration purpose only and should be dropped when the first real entries are added. Change-Id: If4793fef27dc570d5df4ff4d77a5e36004f394f6 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8929 Tested-by: jenkins diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index e6e76e68f..e328cbe07 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -7,7 +7,8 @@ # Try flipping / and \ to find file if the filename does not # match the precise spelling -proc find {filename} { +# lappend _telnet_autocomplete_skip _find_internal +proc _find_internal {filename} { if {[catch {ocd_find $filename} t]==0} { return $t } @@ -20,6 +21,49 @@ proc find {filename} { # make sure error message matches original input string return -code error "Can't find $filename" } + +proc find {filename} { + if {[catch {_find_internal $filename} t]==0} { + return $t + } + + # Check in vendor specific folder: + + # - path/to/a/certain/vendor_config_file + # - path/to/a/certain/vendor-config_file + # replaced with + # - path/to/a/certain/vendor/config_file + regsub {([/\\])([^/\\_-]*)[_-]([^/\\]*$)} $filename "\\1\\2\\1\\3" f + if {[catch {_find_internal $f} t]==0} { + echo "WARNING: '$filename' is deprecated, use '$f' instead" + return $t + } + + foreach vendor {nordic ti st} { + # - path/to/a/certain/config_file + # replaced with + # - path/to/a/certain/${vendor}/config_file + regsub {([/\\])([^/\\]*$)} $filename "\\1$vendor\\1\\2" f + if {[catch {_find_internal $f} t]==0} { + echo "WARNING: '$filename' is deprecated, use '$f' instead" + return $t + } + } + + # at last, check for explicit renaming + if {[catch { + source [_find_internal file_renaming.cfg] + set unixname [string map {\\ /} $filename] + regsub {^(.*/|)((board|chip|cpld|cpu|fpga|interface|target|test|tools)/.*.cfg$)} $unixname {{\1} {\2}} split + set newname [lindex $split 0][dict get $_file_renaming [lindex $split 1]] + _find_internal $newname + } t]==0} { + echo "WARNING: '$filename' is deprecated, use '$newname' instead" + return $t + } + + return -code error "Can't find $filename" +} add_usage_text find "<file>" add_help_text find "print full path to file according to OpenOCD search rules" diff --git a/tcl/file_renaming.cfg b/tcl/file_renaming.cfg new file mode 100644 index 000000000..81e54823f --- /dev/null +++ b/tcl/file_renaming.cfg @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# This file is used to remap configuration files that has been +# renamed, except simple renames that are taken care automatically +# like: +# .../file.cfg ==> .../${vendor}/file.cfg +# .../vendor-file.cfg ==> .../vendor/file.cfg +# .../vendor_file.cfg ==> .../vendor/file.cfg +# +# The formatting below is a TCL dict, so pairs of key-value +# in a simple TCL list, using for each line +# old_name new_name +# including in each name one of the prefix folder between +# board, chip, cpld, cpu, fpga, interface, target, test, tools + +set _file_renaming { + board/hello.cfg board/st/nucleo-u083rc.cfg + board/my-funny-pcb.cfg board/st_nucleo_f0.cfg +} ----------------------------------------------------------------------- Summary of changes: src/helper/startup.tcl | 46 +++++++++++++++++++++++++++++++++++++++++++++- tcl/file_renaming.cfg | 19 +++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 tcl/file_renaming.cfg hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:44:11
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b1c1dd1ec4b014d3b17be7598b7ecfebe97edcb5 (commit) from 25b99ae456971d5522c4e836e80bfa8e40e5a512 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b1c1dd1ec4b014d3b17be7598b7ecfebe97edcb5 Author: Lucien Dufour <luc...@du...> Date: Tue May 20 17:39:19 2025 +0200 tcl/target: Add support for TMS570LS1xxx Added support for TMS570LS1xxx series parts. This uses the existing ti_tms570.cfg as parent. Change-Id: I40567bfb8dc052532807df68ef3d42f8e7a8ecf4 Signed-off-by: Lucien Dufour <luc...@du...> Reviewed-on: https://review.openocd.org/c/openocd/+/8928 Tested-by: jenkins Reviewed-by: Tomas Vanek <va...@fb...> Reviewed-by: zapb <de...@za...> diff --git a/tcl/target/ti_tms570ls1x.cfg b/tcl/target/ti_tms570ls1x.cfg new file mode 100644 index 000000000..3c2577757 --- /dev/null +++ b/tcl/target/ti_tms570ls1x.cfg @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# TMS570LS1114, TMS570LS1115 +# TMS570LS1224, TMS570LS1225, TMS570LS1227 +set DAP_TAPID 0x0B95502F +set JRC_TAPID 0x0B95502F + +source [find target/ti_tms570.cfg] ----------------------------------------------------------------------- Summary of changes: tcl/target/ti_tms570ls1x.cfg | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tcl/target/ti_tms570ls1x.cfg hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:43:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 25b99ae456971d5522c4e836e80bfa8e40e5a512 (commit) from c545b9c4ab32c5566091dfe05e7f1765c39ed069 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 25b99ae456971d5522c4e836e80bfa8e40e5a512 Author: Lucien Dufour <luc...@du...> Date: Thu May 15 14:31:25 2025 +0200 cortex_a: Use endianness for soft breakpoints Fix endianness for cortex_r4 and cortex_r5 when inserting software breakpoints. Because the cortex_a target is used by the cortex_r architecture and some chips start in BE by default (e.g. TMS570) Change-Id: I68b7fe7c4604de67fee2e64fff0fad2691659a58 Signed-off-by: Lucien Dufour <luc...@du...> Reviewed-on: https://review.openocd.org/c/openocd/+/8909 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 46362017a..2ebbf6577 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -1380,6 +1380,19 @@ static int cortex_a_set_breakpoint(struct target *target, buf_set_u32(code, 0, 32, ARMV5_BKPT(0x11)); } + /* + * ARMv7-A/R fetches instructions in little-endian on both LE and BE CPUs. + * But Cortex-R4 and Cortex-R5 big-endian require BE instructions. + * https://developer.arm.com/documentation/den0042/a/Coding-for-Cortex-R-Processors/Endianness + * https://developer.arm.com/documentation/den0013/d/Porting/Endianness + */ + if ((((cortex_a->cpuid & CPUDBG_CPUID_MASK) == CPUDBG_CPUID_CORTEX_R4) || + ((cortex_a->cpuid & CPUDBG_CPUID_MASK) == CPUDBG_CPUID_CORTEX_R5)) && + target->endianness == TARGET_BIG_ENDIAN) { + // In place swapping is allowed + buf_bswap32(code, code, 4); + } + retval = target_read_memory(target, breakpoint->address & 0xFFFFFFFE, breakpoint->length, 1, diff --git a/src/target/cortex_a.h b/src/target/cortex_a.h index 37fba1a88..8e438fd95 100644 --- a/src/target/cortex_a.h +++ b/src/target/cortex_a.h @@ -30,6 +30,9 @@ #define CORTEX_A_MIDR_PARTNUM_SHIFT 4 #define CPUDBG_CPUID 0xD00 +#define CPUDBG_CPUID_MASK 0xff00fff0 +#define CPUDBG_CPUID_CORTEX_R4 0x4100c140 +#define CPUDBG_CPUID_CORTEX_R5 0x4100c150 #define CPUDBG_CTYPR 0xD04 #define CPUDBG_TTYPR 0xD0C #define CPUDBG_LOCKACCESS 0xFB0 ----------------------------------------------------------------------- Summary of changes: src/target/cortex_a.c | 13 +++++++++++++ src/target/cortex_a.h | 3 +++ 2 files changed, 16 insertions(+) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:41:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via c545b9c4ab32c5566091dfe05e7f1765c39ed069 (commit) from 330b06b440aafff1150e00f396ac8d44a8cd82a9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c545b9c4ab32c5566091dfe05e7f1765c39ed069 Author: Tomas Vanek <va...@fb...> Date: Mon May 19 17:10:00 2025 +0200 rtos/hwthread: use printf format specifier instead of typecast. Change-Id: I62e3a0faebd915615f6b72a456667c49970a4091 Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8926 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/rtos/hwthread.c b/src/rtos/hwthread.c index 5c6c45f78..b2a45ade9 100644 --- a/src/rtos/hwthread.c +++ b/src/rtos/hwthread.c @@ -206,8 +206,8 @@ static int hwthread_update_threads(struct rtos *rtos) else rtos->current_thread = threadid_from_target(target); - LOG_TARGET_DEBUG(target, "current_thread=%i, threads_found=%d", - (int)rtos->current_thread, threads_found); + LOG_TARGET_DEBUG(target, "current_thread=%" PRId64 ", threads_found=%d", + rtos->current_thread, threads_found); return 0; } ----------------------------------------------------------------------- Summary of changes: src/rtos/hwthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:40:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 330b06b440aafff1150e00f396ac8d44a8cd82a9 (commit) from 6975baa88be60505e60d1bc76176b2344e966c3f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 330b06b440aafff1150e00f396ac8d44a8cd82a9 Author: Tim Newsome <ti...@si...> Date: Sun May 18 11:11:07 2025 +0200 rtos/hwthread: Nicer debug message in hwthread_update_threads() Imported from https://github.com/riscv-collab/riscv-openocd/pull/763 Change-Id: Ia5931a772476a2ae186ed87cd70d7e4be2f196fb Signed-off-by: Tim Newsome <ti...@si...> Reviewed-on: https://review.openocd.org/c/openocd/+/8917 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/rtos/hwthread.c b/src/rtos/hwthread.c index cc43a07b4..5c6c45f78 100644 --- a/src/rtos/hwthread.c +++ b/src/rtos/hwthread.c @@ -206,8 +206,8 @@ static int hwthread_update_threads(struct rtos *rtos) else rtos->current_thread = threadid_from_target(target); - LOG_TARGET_DEBUG(target, "%s current_thread=%i", __func__, - (int)rtos->current_thread); + LOG_TARGET_DEBUG(target, "current_thread=%i, threads_found=%d", + (int)rtos->current_thread, threads_found); return 0; } ----------------------------------------------------------------------- Summary of changes: src/rtos/hwthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:39:21
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 6975baa88be60505e60d1bc76176b2344e966c3f (commit) from 7f57e72afec76fcbc6210ddbd85ad4ecd5062ab5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6975baa88be60505e60d1bc76176b2344e966c3f Author: Tomas Vanek <va...@fb...> Date: Mon May 19 16:00:52 2025 +0200 doc: list target unavailable state Fixes: 8911: target: Add TARGET_UNAVAILABLE state | https://review.openocd.org/c/openocd/+/8911 Change-Id: I6d152aea5bb449f79fd0f829252442b8b9f8ed9c Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8923 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/doc/openocd.texi b/doc/openocd.texi index ca357c780..27ed46b92 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -5439,7 +5439,8 @@ Displays the current target state: @code{debug-running}, @code{halted}, @code{reset}, -@code{running}, or @code{unknown}. +@code{running}, +@code{unavailable} or @code{unknown}. (Also, @pxref{eventpolling,,Event Polling}.) @end deffn ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:21:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 7f57e72afec76fcbc6210ddbd85ad4ecd5062ab5 (commit) from 98ed83e2782bfd242b653bd3190c34d091b3d7b6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7f57e72afec76fcbc6210ddbd85ad4ecd5062ab5 Author: Tim Newsome <ti...@si...> Date: Thu Oct 27 14:42:23 2022 -0700 gdb_server: Operate on available targets. When SMP is enabled, gdb will always use the first target in the SMP group. That doesn't work when that first target is unavailable, but others in the SMP group are still available. For cases where gdb expects an operation to affect the entire group (run control, memory access), find the first available target in an SMP group and use that. Imported from https://github.com/riscv-collab/riscv-openocd/pull/767 Change-Id: I4bed600da3ac0fdfe4287d8fdd090a58452db501 Signed-off-by: Tim Newsome <ti...@si...> Reviewed-on: https://review.openocd.org/c/openocd/+/8912 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 085058f4f..b5007d927 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -151,6 +151,29 @@ static bool gdb_use_target_description = true; /* current processing free-run type, used by file-I/O */ static char gdb_running_type; +/* Find an available target in the SMP group that gdb is connected to. For + * commands that affect an entire SMP group (like memory access and run control) + * this will give better results than returning the unavailable target and having + * the command fail. If gdb was aware that targets can be unavailable we + * wouldn't need this logic. + */ +struct target *get_available_target_from_connection(struct connection *connection) +{ + struct gdb_service *gdb_service = connection->service->priv; + struct target *target = gdb_service->target; + if (target->state == TARGET_UNAVAILABLE && target->smp) { + struct target_list *tlist; + foreach_smp_target(tlist, target->smp_targets) { + struct target *t = tlist->target; + if (t->state != TARGET_UNAVAILABLE) + return t; + } + /* If we can't find an available target, just return the + * original. */ + } + return target; +} + static int gdb_last_signal(struct target *target) { LOG_TARGET_DEBUG(target, "Debug reason is: %s", @@ -961,9 +984,9 @@ static int gdb_target_callback_event_handler(struct target *target, enum target_event event, void *priv) { struct connection *connection = priv; - struct gdb_service *gdb_service = connection->service->priv; + struct target *gdb_target = get_available_target_from_connection(connection); - if (gdb_service->target != target) + if (gdb_target != target) return ERROR_OK; switch (event) { @@ -1504,7 +1527,7 @@ static int gdb_error(struct connection *connection, int retval) static int gdb_read_memory_packet(struct connection *connection, char const *packet, int packet_size) { - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); char *separator; uint64_t addr = 0; uint32_t len = 0; @@ -1579,7 +1602,7 @@ static int gdb_read_memory_packet(struct connection *connection, static int gdb_write_memory_packet(struct connection *connection, char const *packet, int packet_size) { - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); char *separator; uint64_t addr = 0; uint32_t len = 0; @@ -1630,7 +1653,7 @@ static int gdb_write_memory_packet(struct connection *connection, static int gdb_write_memory_binary_packet(struct connection *connection, char const *packet, int packet_size) { - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); char *separator; uint64_t addr = 0; uint32_t len = 0; @@ -1709,7 +1732,7 @@ static int gdb_write_memory_binary_packet(struct connection *connection, static int gdb_step_continue_packet(struct connection *connection, char const *packet, int packet_size) { - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); bool current = false; uint64_t address = 0x0; int retval = ERROR_OK; @@ -1737,7 +1760,7 @@ static int gdb_step_continue_packet(struct connection *connection, static int gdb_breakpoint_watchpoint_packet(struct connection *connection, char const *packet, int packet_size) { - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); int type; enum breakpoint_type bp_type = BKPT_SOFT /* dummy init to avoid warning */; enum watchpoint_rw wp_type = WPT_READ /* dummy init to avoid warning */; @@ -1910,7 +1933,7 @@ static int gdb_memory_map(struct connection *connection, * have to regenerate it a couple of times. */ - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); struct flash_bank *p; char *xml = NULL; int size = 0; @@ -2986,7 +3009,7 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p __attribute__((unused)) int packet_size) { struct gdb_connection *gdb_connection = connection->priv; - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); const char *parse = packet; int retval; @@ -3208,7 +3231,7 @@ static void gdb_restart_inferior(struct connection *connection, const char *pack static bool gdb_handle_vrun_packet(struct connection *connection, const char *packet, int packet_size) { - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); const char *parse = packet; /* Skip "vRun" */ @@ -3254,7 +3277,7 @@ static int gdb_v_packet(struct connection *connection, struct gdb_connection *gdb_connection = connection->priv; int result; - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); if (strncmp(packet, "vCont", 5) == 0) { bool handled; @@ -3433,7 +3456,7 @@ static int gdb_detach(struct connection *connection) static int gdb_fileio_response_packet(struct connection *connection, char const *packet, int packet_size) { - struct target *target = get_target_from_connection(connection); + struct target *target = get_available_target_from_connection(connection); char *separator; char *parsing_point; int fileio_retcode = strtoul(packet + 1, &separator, 16); @@ -3726,10 +3749,11 @@ static int gdb_input_inner(struct connection *connection) } if (gdb_con->ctrl_c) { - if (target->state == TARGET_RUNNING) { - struct target *t = target; - if (target->rtos) - target->rtos->gdb_target_for_threadid(connection, target->rtos->current_threadid, &t); + struct target *available_target = get_available_target_from_connection(connection); + if (available_target->state == TARGET_RUNNING) { + struct target *t = available_target; + if (available_target->rtos) + available_target->rtos->gdb_target_for_threadid(connection, target->rtos->current_threadid, &t); retval = target_halt(t); if (retval == ERROR_OK) retval = target_poll(t); ----------------------------------------------------------------------- Summary of changes: src/server/gdb_server.c | 56 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 16 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:17:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 98ed83e2782bfd242b653bd3190c34d091b3d7b6 (commit) from 92287c1a2afa93f2f20d2249827a57ffac6760c6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 98ed83e2782bfd242b653bd3190c34d091b3d7b6 Author: Tim Newsome <ti...@si...> Date: Wed Sep 7 11:55:52 2022 -0700 rtos/hwthread: Hide unavailable targets from thread list. Imported from https://github.com/riscv-collab/riscv-openocd/pull/767 Change-Id: I53c6e2876d9bab70800a0f080e72a2abe0499120 Signed-off-by: Tim Newsome <ti...@si...> Reviewed-on: https://review.openocd.org/c/openocd/+/8919 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/rtos/hwthread.c b/src/rtos/hwthread.c index 76571c6b6..cc43a07b4 100644 --- a/src/rtos/hwthread.c +++ b/src/rtos/hwthread.c @@ -105,7 +105,8 @@ static int hwthread_update_threads(struct rtos *rtos) foreach_smp_target(head, target->smp_targets) { struct target *curr = head->target; - if (!target_was_examined(curr)) + if (!target_was_examined(curr) || + curr->state == TARGET_UNAVAILABLE) continue; ++thread_list_size; @@ -130,7 +131,8 @@ static int hwthread_update_threads(struct rtos *rtos) foreach_smp_target(head, target->smp_targets) { struct target *curr = head->target; - if (!target_was_examined(curr)) + if (!target_was_examined(curr) || + curr->state == TARGET_UNAVAILABLE) continue; threadid_t tid = threadid_from_target(curr); ----------------------------------------------------------------------- Summary of changes: src/rtos/hwthread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-07 08:16:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 92287c1a2afa93f2f20d2249827a57ffac6760c6 (commit) from 4fe57a0c197158958c7cc295002504d6434d4777 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 92287c1a2afa93f2f20d2249827a57ffac6760c6 Author: Tim Newsome <ti...@si...> Date: Thu Oct 27 15:21:31 2022 -0700 target: Add TARGET_UNAVAILABLE state This is added for future RISC-V changes. The RISC-V debug interface can explicitly tell a debugger when a hart is unavailable. This is used for instance when that hart is powered down (or yet to be powered up out of reset). Imported from https://github.com/riscv-collab/riscv-openocd/pull/752 Change-Id: I8a062d59eea1e5b3c788281a75159592db024683 Signed-off-by: Tim Newsome <ti...@si...> Reviewed-on: https://review.openocd.org/c/openocd/+/8911 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> Reviewed-by: Bernhard Rosenkränzer <be...@ba...> diff --git a/src/target/target.c b/src/target/target.c index 6653c381c..fd0e0116b 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -220,6 +220,7 @@ static const struct nvp nvp_target_state[] = { { .name = "halted", .value = TARGET_HALTED }, { .name = "reset", .value = TARGET_RESET }, { .name = "debug-running", .value = TARGET_DEBUG_RUNNING }, + { .name = "unavailable", .value = TARGET_UNAVAILABLE }, { .name = NULL, .value = -1 }, }; diff --git a/src/target/target.h b/src/target/target.h index b698f250c..b850b49cf 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -46,6 +46,8 @@ struct gdb_fileio_info; * not sure how this is used with all the recent changes) * TARGET_DEBUG_RUNNING = 4: the target is running, but it is executing code on * behalf of the debugger (e.g. algorithm for flashing) + * TARGET_UNAVAILABLE = 5: The target is unavailable for some reason. It might + * be powered down, for instance. * * also see: target_state_name(); */ @@ -56,6 +58,7 @@ enum target_state { TARGET_HALTED = 2, TARGET_RESET = 3, TARGET_DEBUG_RUNNING = 4, + TARGET_UNAVAILABLE = 5 }; enum target_reset_mode { ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 1 + src/target/target.h | 3 +++ 2 files changed, 4 insertions(+) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-05-25 12:46:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 4fe57a0c197158958c7cc295002504d6434d4777 (commit) from bde7e86e8eb74097880af2cab81444b250712b18 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4fe57a0c197158958c7cc295002504d6434d4777 Author: Antonio Borneo <bor...@gm...> Date: Mon May 19 15:23:23 2025 +0200 server: gdb_server: use a macro for CTRL-C value The numeric value '3' for the ASCII character CTRL-C is not immediately readable, even if the lines that follow explicitly mention CTRL-C. Use the same macro present in `telnet_server.c` to replace the numeric value. Change-Id: Iaf4296b1f0e384f8122d8a4875cad17e8ddaf66a Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8922 Reviewed-by: Tomas Vanek <va...@fb...> Tested-by: jenkins diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index bd00feb49..085058f4f 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -50,6 +50,8 @@ * found in most modern embedded processors. */ +#define CTRL(c) ((c) - '@') + enum gdb_output_flag { /* GDB doesn't accept 'O' packets */ GDB_OUTPUT_NO, @@ -434,7 +436,7 @@ static int gdb_put_packet_inner(struct connection *connection, gdb_putback_char(connection, reply); LOG_DEBUG("Unexpected start of new packet"); break; - } else if (reply == 0x3) { + } else if (reply == CTRL('C')) { /* do not discard Ctrl-C */ gdb_putback_char(connection, reply); break; @@ -486,7 +488,7 @@ static int gdb_put_packet_inner(struct connection *connection, gdb_con->output_flag = GDB_OUTPUT_NO; gdb_log_incoming_packet(connection, "-"); LOG_WARNING("negative reply, retrying"); - } else if (reply == 0x3) { + } else if (reply == CTRL('C')) { gdb_con->ctrl_c = true; gdb_log_incoming_packet(connection, "<Ctrl-C>"); retval = gdb_get_char(connection, &reply); @@ -696,7 +698,7 @@ static int gdb_get_packet_inner(struct connection *connection, gdb_log_incoming_packet(connection, "-"); LOG_WARNING("negative acknowledgment, but no packet pending"); break; - case 0x3: + case CTRL('C'): gdb_log_incoming_packet(connection, "<Ctrl-C>"); gdb_con->ctrl_c = true; *len = 0; ----------------------------------------------------------------------- Summary of changes: src/server/gdb_server.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-05-25 12:46:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via bde7e86e8eb74097880af2cab81444b250712b18 (commit) via 9b30e051379bffaec0928c3e6447b1d54becdb45 (commit) from 8b47a0736b249e0c2574578a184d962294e03b90 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bde7e86e8eb74097880af2cab81444b250712b18 Author: Tomas Vanek <va...@fb...> Date: Sun May 18 21:25:35 2025 +0200 server/gdb_server: do not discard Ctrl-C if _DEBUG_GDB_IO_ GDB server debug logging eat Ctrl-C when gdb user issues interrupt in time of communication between OpenOCD and gdb. E.g. Ctrl-C after `next` gdb command taking many gdb remote protocol $vCont;s (steps) Change-Id: I4a65446a9bb25a28e50566607b3dec116fa7d2cd Suggested-by: Tim Newsome <ti...@si...> Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8920 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 71b7c7764..bd00feb49 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -434,6 +434,10 @@ static int gdb_put_packet_inner(struct connection *connection, gdb_putback_char(connection, reply); LOG_DEBUG("Unexpected start of new packet"); break; + } else if (reply == 0x3) { + /* do not discard Ctrl-C */ + gdb_putback_char(connection, reply); + break; } LOG_WARNING("Discard unexpected char %c", reply); commit 9b30e051379bffaec0928c3e6447b1d54becdb45 Author: Tomas Vanek <va...@fb...> Date: Sun May 18 11:49:31 2025 +0200 flash, target: avoid logging of numeric target state Replace it by target_state_name() helper. Change-Id: I720f2bf121e6fd2c6987a7e8fa9e52593888ee6c Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8918 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/ambiqmicro.c b/src/flash/nor/ambiqmicro.c index bb893778c..67cc6b68a 100644 --- a/src/flash/nor/ambiqmicro.c +++ b/src/flash/nor/ambiqmicro.c @@ -309,9 +309,9 @@ static int ambiqmicro_exec_command(struct target *target, */ target_poll(target); alive_sleep(100); - LOG_DEBUG("state = %d", target->state); } else { - LOG_ERROR("Target not halted or running %d", target->state); + LOG_ERROR("Target not halted or running (state is %s)", + target_state_name(target)); break; } } diff --git a/src/target/espressif/esp32.c b/src/target/espressif/esp32.c index 399ba8e7c..5e2490a22 100644 --- a/src/target/espressif/esp32.c +++ b/src/target/espressif/esp32.c @@ -192,8 +192,8 @@ static int esp32_soc_reset(struct target *target) alive_sleep(10); xtensa_poll(target); if (timeval_ms() >= timeout) { - LOG_TARGET_ERROR(target, "Timed out waiting for CPU to be reset, target state=%d", - target->state); + LOG_TARGET_ERROR(target, "Timed out waiting for CPU to be reset, target state %s", + target_state_name(target)); get_timeout = true; break; } diff --git a/src/target/espressif/esp32s2.c b/src/target/espressif/esp32s2.c index b86e43e62..e32893a6b 100644 --- a/src/target/espressif/esp32s2.c +++ b/src/target/espressif/esp32s2.c @@ -272,8 +272,8 @@ static int esp32s2_soc_reset(struct target *target) alive_sleep(10); xtensa_poll(target); if (timeval_ms() >= timeout) { - LOG_TARGET_ERROR(target, "Timed out waiting for CPU to be reset, target state=%d", - target->state); + LOG_TARGET_ERROR(target, "Timed out waiting for CPU to be reset, target state %s", + target_state_name(target)); return ERROR_TARGET_TIMEOUT; } } diff --git a/src/target/espressif/esp32s3.c b/src/target/espressif/esp32s3.c index 82413f77f..14f7a7bb6 100644 --- a/src/target/espressif/esp32s3.c +++ b/src/target/espressif/esp32s3.c @@ -193,8 +193,8 @@ static int esp32s3_soc_reset(struct target *target) xtensa_poll(target); if (timeval_ms() >= timeout) { LOG_TARGET_ERROR(target, - "Timed out waiting for CPU to be reset, target state=%d", - target->state); + "Timed out waiting for CPU to be reset, target state %s", + target_state_name(target)); get_timeout = true; break; } diff --git a/src/target/stm8.c b/src/target/stm8.c index 81c41f2b2..7785d40ef 100644 --- a/src/target/stm8.c +++ b/src/target/stm8.c @@ -870,7 +870,7 @@ static int stm8_poll(struct target *target) uint8_t csr1, csr2; #ifdef LOG_STM8 - LOG_DEBUG("target->state=%d", target->state); + LOG_DEBUG("target->state %s", target_state_name(target)); #endif /* read dm_csrx control regs */ diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c index 3a877edfa..3366623d6 100644 --- a/src/target/xtensa/xtensa.c +++ b/src/target/xtensa/xtensa.c @@ -949,7 +949,8 @@ int xtensa_smpbreak_set(struct target *target, uint32_t set) xtensa->smp_break = set; if (target_was_examined(target)) res = xtensa_smpbreak_write(xtensa, xtensa->smp_break); - LOG_TARGET_DEBUG(target, "set smpbreak=%" PRIx32 ", state=%i", set, target->state); + LOG_TARGET_DEBUG(target, "set smpbreak=%" PRIx32 ", state %s", set, + target_state_name(target)); return res; } ----------------------------------------------------------------------- Summary of changes: src/flash/nor/ambiqmicro.c | 4 ++-- src/server/gdb_server.c | 4 ++++ src/target/espressif/esp32.c | 4 ++-- src/target/espressif/esp32s2.c | 4 ++-- src/target/espressif/esp32s3.c | 4 ++-- src/target/stm8.c | 2 +- src/target/xtensa/xtensa.c | 3 ++- 7 files changed, 15 insertions(+), 10 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-05-25 12:43:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 8b47a0736b249e0c2574578a184d962294e03b90 (commit) via 4c1e2105c4e5ad3188dae6e62ce019df15c7e52a (commit) from 3c7725ea703e186c9d9ced3b0e03231982abdbfd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8b47a0736b249e0c2574578a184d962294e03b90 Author: Antonio Borneo <bor...@gm...> Date: Sat May 10 23:52:30 2025 +0200 target: arm_cti: fix return values in handle_cti_dump() Since the initial commit f444c57bf2d6 ("arm_cti: add cti command group") the helper handle_cti_dump() return JIM error codes. Fix it by returning standard OpenOCD error codes. Change-Id: Ia36b82083d213aff90fe22fcfe7fbe26172806a3 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8904 Tested-by: jenkins diff --git a/src/target/arm_cti.c b/src/target/arm_cti.c index 830956e5c..032e5ac37 100644 --- a/src/target/arm_cti.c +++ b/src/target/arm_cti.c @@ -232,13 +232,13 @@ COMMAND_HANDLER(handle_cti_dump) retval = dap_run(ap->dap); if (retval != ERROR_OK) - return JIM_ERR; + return retval; for (size_t i = 0; i < ARRAY_SIZE(cti_names); i++) command_print(CMD, "%8.8s (0x%04"PRIx32") 0x%08"PRIx32, cti_names[i].label, cti_names[i].offset, values[i]); - return JIM_OK; + return ERROR_OK; } COMMAND_HANDLER(handle_cti_enable) commit 4c1e2105c4e5ad3188dae6e62ce019df15c7e52a Author: Antonio Borneo <bor...@gm...> Date: Sat May 10 14:14:05 2025 +0200 target: drop struct target_type::target_jim_commands() The API was introduced in 2008 by commit 8d73c2a9b0c0 ("duan ellis target tcl work in progress") and never used. Drop it! Change-Id: Icbc5789f59696bd28f9d1151bc3e29f4adb74670 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8903 Tested-by: jenkins diff --git a/src/target/target_type.h b/src/target/target_type.h index eddedbf34..5b0dc5a6c 100644 --- a/src/target/target_type.h +++ b/src/target/target_type.h @@ -201,10 +201,6 @@ struct target_type { /* otherwise: JIM_OK, or JIM_ERR, */ int (*target_jim_configure)(struct target *target, struct jim_getopt_info *goi); - /* target commands specifically handled by the target */ - /* returns JIM_OK, or JIM_ERR, or JIM_CONTINUE - if option not understood */ - int (*target_jim_commands)(struct target *target, struct jim_getopt_info *goi); - /** * This method is used to perform target setup that requires * JTAG access. ----------------------------------------------------------------------- Summary of changes: src/target/arm_cti.c | 4 ++-- src/target/target_type.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-05-25 12:42:57
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 3c7725ea703e186c9d9ced3b0e03231982abdbfd (commit) via 6cec67251d29a4a62d330ff6289807babee04fda (commit) from e9c78512b30b13fc6a9714e3fad0074bc2387bb5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3c7725ea703e186c9d9ced3b0e03231982abdbfd Author: Antonio Borneo <bor...@gm...> Date: Thu Dec 22 12:34:41 2022 +0100 checkpatch: drop camelcase symbols not used anymore With the rewrite of jim_handler commands as COMMAND_HANDLER, some camelcase symbol from jimtcl are not referenced anymore in OpenOCD code. Drop such symbols from the camelcase whitelist. Change-Id: I723be1820f13fe2cec7e4f0512a5e9da12889199 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8902 Tested-by: jenkins diff --git a/tools/scripts/camelcase.txt b/tools/scripts/camelcase.txt index 6c6c28daa..058df4d80 100644 --- a/tools/scripts/camelcase.txt +++ b/tools/scripts/camelcase.txt @@ -87,20 +87,14 @@ Jim_AppendString Jim_AppendStrings Jim_Cmd Jim_CmdPrivData -Jim_CmdProc -Jim_CompareStringImmediate -Jim_ConcatObj Jim_CreateCommand Jim_CreateInterp Jim_DecrRefCount -Jim_DelCmdProc Jim_DeleteAssocData Jim_DeleteCommand -Jim_DictAddElement Jim_DictPairs Jim_DuplicateObj Jim_Eval -Jim_EvalExpression Jim_EvalObj Jim_EvalObjPrefix Jim_EvalSource @@ -113,46 +107,31 @@ Jim_GetDouble Jim_GetEnum Jim_GetExitCode Jim_GetGlobalVariableStr -Jim_GetIntRepPtr -Jim_GetLong Jim_GetResult Jim_GetString -Jim_GetVariable Jim_GetWide Jim_IncrRefCount Jim_InitStaticExtensions Jim_Interp -Jim_Length -Jim_ListAppendElement Jim_ListGetIndex Jim_ListLength Jim_MakeErrorMessage -Jim_NewDictObj Jim_NewEmptyStringObj Jim_NewIntObj -Jim_NewListObj Jim_NewStringObj -Jim_NewWideObj Jim_Obj Jim_ProcessEvents Jim_RegisterCoreCommands Jim_SetAssocData Jim_SetEmptyResult Jim_SetResult -Jim_SetResultBool Jim_SetResultFormatted -Jim_SetResultInt Jim_SetResultString -Jim_SetVariable Jim_String Jim_WrongNumArgs cmdProc -currentScriptObj -delProc -emptyObj privData returnCode -typePtr # from elf.h Elf32_Addr commit 6cec67251d29a4a62d330ff6289807babee04fda Author: Antonio Borneo <bor...@gm...> Date: Sat Dec 16 17:39:12 2023 +0100 command: drop Jim Command handler, at last With all OpenOCD commands converted to COMMAND_HANDLER, we can drop the management of jim_handler commands. Drop also from documentation the subsection on Jim Command Registration. Change-Id: I4d13abc7e384e64ecb155cb40bbbd52bb79ec672 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8901 Tested-by: jenkins diff --git a/doc/manual/helper.txt b/doc/manual/helper.txt index 6cf3c977b..29e84e6f0 100644 --- a/doc/manual/helper.txt +++ b/doc/manual/helper.txt @@ -97,18 +97,6 @@ registration, while the @c unregister_command() and These may be called at any time, allowing the command set to change in response to system actions. -@subsection helpercmdjim Jim Command Registration - -The command_registration structure provides support for registering -native Jim command handlers (@c jim_handler) too. For these handlers, -the module can provide help and usage support; however, this mechanism -allows Jim handlers to be called as sub-commands of other commands. -These commands may be registered with a private data value (@c -jim_handler_data) that will be available when called, as with low-level -Jim command registration. - -A command may have a normal @c handler or a @c jim_handler, but not both. - @subsection helpercmdregisterchains Command Chaining When using register_commands(), the array of commands may reference diff --git a/src/helper/command.c b/src/helper/command.c index 218f0581e..b70081a4d 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -130,13 +130,13 @@ static struct command *command_new(struct command_context *cmd_ctx, assert(cr->name); /* - * If it is a non-jim command with no .usage specified, + * If it is a command with no .usage specified, * log an error. * * strlen(.usage) == 0 means that the command takes no * arguments. */ - if (!cr->jim_handler && !cr->usage) + if (!cr->usage) LOG_ERROR("BUG: command '%s' does not have the " "'.usage' field filled out", full_name); @@ -152,7 +152,6 @@ static struct command *command_new(struct command_context *cmd_ctx, } c->handler = cr->handler; - c->jim_handler = cr->jim_handler; c->mode = cr->mode; if (cr->help || cr->usage) @@ -425,9 +424,6 @@ static bool command_can_run(struct command_context *cmd_ctx, struct command *c, static int exec_command(Jim_Interp *interp, struct command_context *context, struct command *c, int argc, Jim_Obj * const *argv) { - if (c->jim_handler) - return c->jim_handler(interp, argc, argv); - /* use c->handler */ const char **words = malloc(argc * sizeof(char *)); if (!words) { @@ -841,7 +837,7 @@ static int jim_command_dispatch(Jim_Interp *interp, int argc, Jim_Obj * const *a script_debug(interp, argc, argv); struct command *c = jim_to_command(interp); - if (!c->jim_handler && !c->handler) { + if (!c->handler) { Jim_EvalObjPrefix(interp, Jim_NewStringObj(interp, "usage", -1), 1, argv); return JIM_ERR; } diff --git a/src/helper/command.h b/src/helper/command.h index 18fe56178..8bd2430e0 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -197,7 +197,6 @@ typedef __COMMAND_HANDLER((*command_handler_t)); struct command { char *name; command_handler_t handler; - Jim_CmdProc *jim_handler; void *jim_handler_data; /* Command handlers can use it for any handler specific data */ struct target *jim_override_target; @@ -234,7 +233,6 @@ static inline struct command *jim_to_command(Jim_Interp *interp) struct command_registration { const char *name; command_handler_t handler; - Jim_CmdProc *jim_handler; enum command_mode mode; const char *help; /** a string listing the options and arguments, required or optional */ diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index 2c3f76980..3634a2a59 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -671,7 +671,7 @@ static void telnet_auto_complete(struct connection *connection) } else if (jimcmd_is_oocd_command(jim_cmd)) { struct command *cmd = jimcmd_privdata(jim_cmd); - if (cmd && !cmd->handler && !cmd->jim_handler) { + if (cmd && !cmd->handler) { /* Initial part of a multi-word command. Ignore it! */ ignore_cmd = true; } else if (cmd && cmd->mode == COMMAND_CONFIG) { ----------------------------------------------------------------------- Summary of changes: doc/manual/helper.txt | 12 ------------ src/helper/command.c | 10 +++------- src/helper/command.h | 2 -- src/server/telnet_server.c | 2 +- tools/scripts/camelcase.txt | 21 --------------------- 5 files changed, 4 insertions(+), 43 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-05-25 12:42:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via e9c78512b30b13fc6a9714e3fad0074bc2387bb5 (commit) via 114385280ae59fa0788b0077ba6d9596660cc714 (commit) from c8979f6441eb62bb261827daa252c4e5596c4a39 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e9c78512b30b13fc6a9714e3fad0074bc2387bb5 Author: Antonio Borneo <bor...@gm...> Date: Sat Dec 16 17:29:43 2023 +0100 target/arm_tpiu_swo: rewrite commands 'configure' and 'cget' as COMMAND_HANDLER Rewrite only the command, but still use the old jimtcl specific code in arm_tpiu_swo_configure(), shared with command 'create'. Change-Id: If2258f048403f54faf229e602d9b395b71894f97 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8900 Tested-by: jenkins diff --git a/src/target/arm_tpiu_swo.c b/src/target/arm_tpiu_swo.c index f2cb1a0fd..afdd8ce91 100644 --- a/src/target/arm_tpiu_swo.c +++ b/src/target/arm_tpiu_swo.c @@ -554,20 +554,28 @@ err_no_params: return JIM_ERR; } -static int jim_arm_tpiu_swo_configure(Jim_Interp *interp, int argc, Jim_Obj * const *argv) +COMMAND_HANDLER(handle_arm_tpiu_swo_configure) { - struct command *c = jim_to_command(interp); + struct arm_tpiu_swo_object *obj = CMD_DATA; + + if (!CMD_ARGC) + return ERROR_COMMAND_SYNTAX_ERROR; + struct jim_getopt_info goi; + jim_getopt_setup(&goi, CMD_CTX->interp, CMD_ARGC, CMD_JIMTCL_ARGV); + goi.is_configure = !strcmp(CMD_NAME, "configure"); - jim_getopt_setup(&goi, interp, argc - 1, argv + 1); - goi.is_configure = !strcmp(c->name, "configure"); - if (goi.argc < 1) { - Jim_WrongNumArgs(goi.interp, goi.argc, goi.argv, - "missing: -option ..."); - return JIM_ERR; - } - struct arm_tpiu_swo_object *obj = c->jim_handler_data; - return arm_tpiu_swo_configure(&goi, obj); + int e = arm_tpiu_swo_configure(&goi, obj); + + int reslen; + const char *result = Jim_GetString(Jim_GetResult(CMD_CTX->interp), &reslen); + if (reslen > 0) + command_print(CMD, "%s", result); + + if (e != JIM_OK) + return ERROR_FAIL; + + return ERROR_OK; } static int wrap_write_u32(struct target *target, struct adiv5_ap *tpiu_ap, @@ -872,14 +880,14 @@ static const struct command_registration arm_tpiu_swo_instance_command_handlers[ { .name = "configure", .mode = COMMAND_ANY, - .jim_handler = jim_arm_tpiu_swo_configure, + .handler = handle_arm_tpiu_swo_configure, .help = "configure a new TPIU/SWO for use", .usage = "[attribute value ...]", }, { .name = "cget", .mode = COMMAND_ANY, - .jim_handler = jim_arm_tpiu_swo_configure, + .handler = handle_arm_tpiu_swo_configure, .help = "returns the specified TPIU/SWO attribute", .usage = "attribute", }, commit 114385280ae59fa0788b0077ba6d9596660cc714 Author: Antonio Borneo <bor...@gm...> Date: Sun May 26 12:34:58 2024 +0200 target/arm_tpiu_swo: rewrite command 'swo create' as COMMAND_HANDLER Rewrite only the command, but still use the old jimtcl specific code in arm_tpiu_swo_configure(), shared with commands 'configure' and 'cget'. Change-Id: I39c69b1cdc23f7b5f875df3e15be987c715b0bcf Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8899 Tested-by: jenkins diff --git a/src/target/arm_tpiu_swo.c b/src/target/arm_tpiu_swo.c index e20cd5927..f2cb1a0fd 100644 --- a/src/target/arm_tpiu_swo.c +++ b/src/target/arm_tpiu_swo.c @@ -907,56 +907,25 @@ static const struct command_registration arm_tpiu_swo_instance_command_handlers[ COMMAND_REGISTRATION_DONE }; -static int arm_tpiu_swo_create(Jim_Interp *interp, struct arm_tpiu_swo_object *obj) +COMMAND_HANDLER(handle_arm_tpiu_swo_create) { - struct command_context *cmd_ctx; - Jim_Cmd *cmd; - int e; + int retval = ERROR_FAIL; - cmd_ctx = current_command_context(interp); - assert(cmd_ctx); + if (!CMD_ARGC) + return ERROR_COMMAND_SYNTAX_ERROR; /* does this command exist? */ - cmd = Jim_GetCommand(interp, Jim_NewStringObj(interp, obj->name, -1), JIM_NONE); - if (cmd) { - Jim_SetResultFormatted(interp, "cannot create TPIU object because a command with name '%s' already exists", - obj->name); - return JIM_ERR; - } - - /* now - create the new tpiu/swo name command */ - const struct command_registration obj_commands[] = { - { - .name = obj->name, - .mode = COMMAND_ANY, - .help = "tpiu/swo instance command group", - .usage = "", - .chain = arm_tpiu_swo_instance_command_handlers, - }, - COMMAND_REGISTRATION_DONE - }; - e = register_commands_with_data(cmd_ctx, NULL, obj_commands, obj); - if (e != ERROR_OK) - return JIM_ERR; - - list_add_tail(&obj->lh, &all_tpiu_swo); - - return JIM_OK; -} - -static int jim_arm_tpiu_swo_create(Jim_Interp *interp, int argc, Jim_Obj *const *argv) -{ - struct jim_getopt_info goi; - jim_getopt_setup(&goi, interp, argc - 1, argv + 1); - if (goi.argc < 1) { - Jim_WrongNumArgs(interp, 1, argv, "name ?option option ...?"); - return JIM_ERR; + Jim_Cmd *jimcmd = Jim_GetCommand(CMD_CTX->interp, CMD_JIMTCL_ARGV[0], JIM_NONE); + if (jimcmd) { + command_print(CMD, "cannot create TPIU object because a command with name '%s' already exists", + CMD_ARGV[0]); + return ERROR_FAIL; } struct arm_tpiu_swo_object *obj = calloc(1, sizeof(struct arm_tpiu_swo_object)); if (!obj) { LOG_ERROR("Out of memory"); - return JIM_ERR; + return ERROR_FAIL; } INIT_LIST_HEAD(&obj->connections); adiv5_mem_ap_spot_init(&obj->spot); @@ -968,36 +937,55 @@ static int jim_arm_tpiu_swo_create(Jim_Interp *interp, int argc, Jim_Obj *const goto err_exit; } - Jim_Obj *n; - jim_getopt_obj(&goi, &n); - obj->name = strdup(Jim_GetString(n, NULL)); + obj->name = strdup(CMD_ARGV[0]); if (!obj->name) { LOG_ERROR("Out of memory"); goto err_exit; } /* Do the rest as "configure" options */ - goi.is_configure = true; + struct jim_getopt_info goi; + jim_getopt_setup(&goi, CMD_CTX->interp, CMD_ARGC - 1, CMD_JIMTCL_ARGV + 1); + goi.is_configure = 1; int e = arm_tpiu_swo_configure(&goi, obj); + + int reslen; + const char *result = Jim_GetString(Jim_GetResult(CMD_CTX->interp), &reslen); + if (reslen > 0) + command_print(CMD, "%s", result); + if (e != JIM_OK) goto err_exit; if (!obj->spot.dap || obj->spot.ap_num == DP_APSEL_INVALID) { - Jim_SetResultString(goi.interp, "-dap and -ap-num required when creating TPIU", -1); + command_print(CMD, "-dap and -ap-num required when creating TPIU"); goto err_exit; } - e = arm_tpiu_swo_create(goi.interp, obj); - if (e != JIM_OK) + /* now - create the new tpiu/swo name command */ + const struct command_registration obj_commands[] = { + { + .name = obj->name, + .mode = COMMAND_ANY, + .help = "tpiu/swo instance command group", + .usage = "", + .chain = arm_tpiu_swo_instance_command_handlers, + }, + COMMAND_REGISTRATION_DONE + }; + retval = register_commands_with_data(CMD_CTX, NULL, obj_commands, obj); + if (retval != ERROR_OK) goto err_exit; - return JIM_OK; + list_add_tail(&obj->lh, &all_tpiu_swo); + + return ERROR_OK; err_exit: free(obj->name); free(obj->out_filename); free(obj); - return JIM_ERR; + return retval; } COMMAND_HANDLER(handle_arm_tpiu_swo_names) @@ -1192,7 +1180,7 @@ static const struct command_registration arm_tpiu_swo_subcommand_handlers[] = { { .name = "create", .mode = COMMAND_ANY, - .jim_handler = jim_arm_tpiu_swo_create, + .handler = handle_arm_tpiu_swo_create, .usage = "name [-dap dap] [-ap-num num] [-baseaddr baseaddr]", .help = "Creates a new TPIU or SWO object", }, ----------------------------------------------------------------------- Summary of changes: src/target/arm_tpiu_swo.c | 124 ++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 64 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-05-25 12:41:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via c8979f6441eb62bb261827daa252c4e5596c4a39 (commit) via 1aef2ae18d709a141404777dc5bce3ec59b37909 (commit) from 532db01df29ab0636911f5cb0b40ed5747879c4e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c8979f6441eb62bb261827daa252c4e5596c4a39 Author: Antonio Borneo <bor...@gm...> Date: Tue Dec 5 01:10:10 2023 +0100 target: arm_cti: rewrite commands 'cti create' as COMMAND_HANDLER Rewrite only the command, but still use the old jimtcl specific code in cti_configure(). Change-Id: I29fb952a7c8148416b301cbf78b6e342979af7d3 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8898 Tested-by: jenkins diff --git a/src/target/arm_cti.c b/src/target/arm_cti.c index b2f78eef7..830956e5c 100644 --- a/src/target/arm_cti.c +++ b/src/target/arm_cti.c @@ -434,49 +434,47 @@ static int cti_configure(struct jim_getopt_info *goi, struct arm_cti *cti) return JIM_OK; } -static int cti_create(struct jim_getopt_info *goi) +COMMAND_HANDLER(handle_cti_create) { - struct command_context *cmd_ctx; - static struct arm_cti *cti; - Jim_Obj *new_cmd; - Jim_Cmd *cmd; - const char *cp; - int e; - - cmd_ctx = current_command_context(goi->interp); - assert(cmd_ctx); - - if (goi->argc < 3) { - Jim_WrongNumArgs(goi->interp, 1, goi->argv, "?name? ..options..."); - return JIM_ERR; - } - /* COMMAND */ - jim_getopt_obj(goi, &new_cmd); - /* does this command exist? */ - cmd = Jim_GetCommand(goi->interp, new_cmd, JIM_NONE); - if (cmd) { - cp = Jim_GetString(new_cmd, NULL); - Jim_SetResultFormatted(goi->interp, "Command: %s Exists", cp); - return JIM_ERR; + if (CMD_ARGC < 3) + return ERROR_COMMAND_SYNTAX_ERROR; + + /* check if the cti name clashes with an existing command name */ + Jim_Cmd *jimcmd = Jim_GetCommand(CMD_CTX->interp, CMD_JIMTCL_ARGV[0], JIM_NONE); + if (jimcmd) { + command_print(CMD, "Command/cti: %s Exists", CMD_ARGV[0]); + return ERROR_FAIL; } /* Create it */ - cti = calloc(1, sizeof(*cti)); - if (!cti) - return JIM_ERR; + struct arm_cti *cti = calloc(1, sizeof(*cti)); + if (!cti) { + LOG_ERROR("Out of memory"); + return ERROR_FAIL; + } adiv5_mem_ap_spot_init(&cti->spot); /* Do the rest as "configure" options */ - goi->is_configure = true; - e = cti_configure(goi, cti); + struct jim_getopt_info goi; + jim_getopt_setup(&goi, CMD_CTX->interp, CMD_ARGC - 1, CMD_JIMTCL_ARGV + 1); + goi.is_configure = 1; + int e = cti_configure(&goi, cti); if (e != JIM_OK) { + int reslen; + const char *result = Jim_GetString(Jim_GetResult(CMD_CTX->interp), &reslen); + if (reslen > 0) + command_print(CMD, "%s", result); free(cti); - return e; + return ERROR_COMMAND_ARGUMENT_INVALID; } - cp = Jim_GetString(new_cmd, NULL); - cti->name = strdup(cp); + cti->name = strdup(CMD_ARGV[0]); + if (!cti->name) { + LOG_ERROR("Out of memory"); + free(cti); + return ERROR_FAIL; + } /* now - create the new cti name command */ const struct command_registration cti_subcommands[] = { @@ -487,7 +485,7 @@ static int cti_create(struct jim_getopt_info *goi) }; const struct command_registration cti_commands[] = { { - .name = cp, + .name = CMD_ARGV[0], .mode = COMMAND_ANY, .help = "cti instance command group", .usage = "", @@ -495,31 +493,24 @@ static int cti_create(struct jim_getopt_info *goi) }, COMMAND_REGISTRATION_DONE }; - e = register_commands_with_data(cmd_ctx, NULL, cti_commands, cti); - if (e != ERROR_OK) - return JIM_ERR; + int retval = register_commands_with_data(CMD_CTX, NULL, cti_commands, cti); + if (retval != ERROR_OK) { + free(cti->name); + free(cti); + return retval; + } list_add_tail(&cti->lh, &all_cti); cti->ap = dap_get_ap(cti->spot.dap, cti->spot.ap_num); if (!cti->ap) { - Jim_SetResultString(goi->interp, "Cannot get AP", -1); - return JIM_ERR; + command_print(CMD, "Cannot get AP"); + free(cti->name); + free(cti); + return ERROR_FAIL; } - return JIM_OK; -} - -static int jim_cti_create(Jim_Interp *interp, int argc, Jim_Obj *const *argv) -{ - struct jim_getopt_info goi; - jim_getopt_setup(&goi, interp, argc - 1, argv + 1); - if (goi.argc < 2) { - Jim_WrongNumArgs(goi.interp, goi.argc, goi.argv, - "<name> [<cti_options> ...]"); - return JIM_ERR; - } - return cti_create(&goi); + return ERROR_OK; } COMMAND_HANDLER(cti_handle_names) @@ -539,7 +530,7 @@ static const struct command_registration cti_subcommand_handlers[] = { { .name = "create", .mode = COMMAND_ANY, - .jim_handler = jim_cti_create, + .handler = handle_cti_create, .usage = "name '-chain-position' name [options ...]", .help = "Creates a new CTI object", }, commit 1aef2ae18d709a141404777dc5bce3ec59b37909 Author: Antonio Borneo <bor...@gm...> Date: Tue Dec 5 00:45:54 2023 +0100 target: arm_dap: rewrite commands 'dap create' as COMMAND_HANDLER Rewrite only the command, but still use the old jimtcl specific code in dap_configure(). Change-Id: I3360884616367aae52f5b32247d9864000c53fdc Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8897 Tested-by: jenkins diff --git a/src/target/arm_dap.c b/src/target/arm_dap.c index c5bd6ccd4..be5e63c7c 100644 --- a/src/target/arm_dap.c +++ b/src/target/arm_dap.c @@ -333,61 +333,59 @@ static int dap_check_config(struct adiv5_dap *dap) return ERROR_OK; } -static int dap_create(struct jim_getopt_info *goi) +COMMAND_HANDLER(handle_dap_create) { - struct command_context *cmd_ctx; - static struct arm_dap_object *dap; - Jim_Obj *new_cmd; - Jim_Cmd *cmd; - const char *cp; - int e; + if (CMD_ARGC < 3) + return ERROR_COMMAND_SYNTAX_ERROR; - cmd_ctx = current_command_context(goi->interp); - assert(cmd_ctx); + int retval = ERROR_COMMAND_ARGUMENT_INVALID; - if (goi->argc < 3) { - Jim_WrongNumArgs(goi->interp, 1, goi->argv, "?name? ..options..."); - return JIM_ERR; - } - /* COMMAND */ - jim_getopt_obj(goi, &new_cmd); - /* does this command exist? */ - cmd = Jim_GetCommand(goi->interp, new_cmd, JIM_NONE); - if (cmd) { - cp = Jim_GetString(new_cmd, NULL); - Jim_SetResultFormatted(goi->interp, "Command: %s Exists", cp); - return JIM_ERR; + /* check if the dap name clashes with an existing command name */ + Jim_Cmd *jimcmd = Jim_GetCommand(CMD_CTX->interp, CMD_JIMTCL_ARGV[0], JIM_NONE); + if (jimcmd) { + command_print(CMD, "Command/dap: %s Exists", CMD_ARGV[0]); + return ERROR_FAIL; } /* Create it */ - dap = calloc(1, sizeof(struct arm_dap_object)); - if (!dap) - return JIM_ERR; + struct arm_dap_object *dap = calloc(1, sizeof(struct arm_dap_object)); + if (!dap) { + LOG_ERROR("Out of memory"); + return ERROR_FAIL; + } dap_instance_init(&dap->dap); - cp = Jim_GetString(new_cmd, NULL); - dap->name = strdup(cp); + dap->name = strdup(CMD_ARGV[0]); + if (!dap->name) { + LOG_ERROR("Out of memory"); + free(dap); + return ERROR_FAIL; + } - e = dap_configure(goi, dap); - if (e != JIM_OK) + struct jim_getopt_info goi; + jim_getopt_setup(&goi, CMD_CTX->interp, CMD_ARGC - 1, CMD_JIMTCL_ARGV + 1); + int e = dap_configure(&goi, dap); + if (e != JIM_OK) { + int reslen; + const char *result = Jim_GetString(Jim_GetResult(CMD_CTX->interp), &reslen); + if (reslen > 0) + command_print(CMD, "%s", result); goto err; + } if (!dap->dap.tap) { - Jim_SetResultString(goi->interp, "-chain-position required when creating DAP", -1); - e = JIM_ERR; + command_print(CMD, "-chain-position required when creating DAP"); goto err; } - e = dap_check_config(&dap->dap); - if (e != ERROR_OK) { - e = JIM_ERR; + retval = dap_check_config(&dap->dap); + if (retval != ERROR_OK) goto err; - } struct command_registration dap_create_commands[] = { { - .name = cp, + .name = CMD_ARGV[0], .mode = COMMAND_ANY, .help = "dap instance command group", .usage = "", @@ -400,32 +398,18 @@ static int dap_create(struct jim_getopt_info *goi) if (transport_is_hla()) dap_create_commands[0].chain = NULL; - e = register_commands_with_data(cmd_ctx, NULL, dap_create_commands, dap); - if (e != ERROR_OK) { - e = JIM_ERR; + retval = register_commands_with_data(CMD_CTX, NULL, dap_create_commands, dap); + if (retval != ERROR_OK) goto err; - } list_add_tail(&dap->lh, &all_dap); - return JIM_OK; + return ERROR_OK; err: free(dap->name); free(dap); - return e; -} - -static int jim_dap_create(Jim_Interp *interp, int argc, Jim_Obj *const *argv) -{ - struct jim_getopt_info goi; - jim_getopt_setup(&goi, interp, argc - 1, argv + 1); - if (goi.argc < 2) { - Jim_WrongNumArgs(goi.interp, goi.argc, goi.argv, - "<name> [<dap_options> ...]"); - return JIM_ERR; - } - return dap_create(&goi); + return retval; } COMMAND_HANDLER(handle_dap_names) @@ -496,7 +480,7 @@ static const struct command_registration dap_subcommand_handlers[] = { { .name = "create", .mode = COMMAND_ANY, - .jim_handler = jim_dap_create, + .handler = handle_dap_create, .usage = "name '-chain-position' name", .help = "Creates a new DAP instance", }, ----------------------------------------------------------------------- Summary of changes: src/target/arm_cti.c | 93 ++++++++++++++++++++++++---------------------------- src/target/arm_dap.c | 92 +++++++++++++++++++++------------------------------ 2 files changed, 80 insertions(+), 105 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-05-25 12:40:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 532db01df29ab0636911f5cb0b40ed5747879c4e (commit) from 6a3abda0b46a777490a8ce5bc748e6fed6775354 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 532db01df29ab0636911f5cb0b40ed5747879c4e Author: Antonio Borneo <bor...@gm...> Date: Fri May 2 16:10:39 2025 +0200 cortex-a: fix single-step on infinite loop On ARMv7a/r the single-step is implemented through a HW breakpoint that hits instructions at any address except the address of the current instruction. The method above fails in case of an infinite loop coded by a single instruction that jumps on itself; in such case, the same instruction (at the same address) is executed over and over and the breakpoint never hits. In current code this case is wrongly considered as an error. Reduce the timeout while waiting for the HW breakpoint being hit, then halt. The jump on itself would be executed several times before the timeout and the halt, but this is not an issue. There are few "pathological" instructions in ARMv7a/r that jumps on itself and that can have side effects if executed more than once. They are listed in the code. We do not consider these as real use cases generated by a compiler. Document the method in the code. Report that the single-step function is not properly managing the HW breakpoints if it exits on error. To be fixed in the future. Change-Id: I9641a4a3e2f68b83897ccf3a12d3c34e98a7805c Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8871 Tested-by: jenkins diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index ee27e1b21..46362017a 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -1169,6 +1169,29 @@ static int cortex_a_set_dscr_bits(struct target *target, return retval; } +/* + * Single-step on ARMv7a/r is implemented through a HW breakpoint that hits + * every instruction at any address except the address of the current + * instruction. + * Such HW breakpoint is never hit in case of a single instruction that jumps + * on itself (infinite loop), or a WFI or a WFE. In this case, halt the CPU + * after a timeout. + * The jump on itself would be executed several times before the timeout forces + * the halt, but this is not an issue. In ARMv7a/r there are few "pathological" + * instructions, listed below, that jumps on itself and that can have side + * effects if executed more than once; but they are not considered as real use + * cases generated by a compiler. + * Some example: + * - 'pop {pc}' or multi register 'pop' including PC, when the new PC value is + * the same value of current PC. The single step will not stop at the first + * 'pop' and will continue taking values from the stack, modifying SP at each + * iteration. + * - 'rfeda', 'rfedb', 'rfeia', 'rfeib', when the new PC value is the same + * value of current PC. The register provided to the instruction (usually SP) + * will be incremented or decremented at each iteration. + * + * TODO: fix exit in case of error, cleaning HW breakpoints. + */ static int cortex_a_step(struct target *target, bool current, target_addr_t address, bool handle_breakpoints) { @@ -1227,15 +1250,34 @@ static int cortex_a_step(struct target *target, bool current, target_addr_t addr if (retval != ERROR_OK) return retval; - int64_t then = timeval_ms(); + // poll at least once before starting the timeout + retval = cortex_a_poll(target); + if (retval != ERROR_OK) + return retval; + + int64_t then = timeval_ms() + 100; while (target->state != TARGET_HALTED) { + if (timeval_ms() > then) + break; + retval = cortex_a_poll(target); if (retval != ERROR_OK) return retval; - if (target->state == TARGET_HALTED) - break; - if (timeval_ms() > then + 1000) { - LOG_ERROR("timeout waiting for target halt"); + } + + if (target->state != TARGET_HALTED) { + LOG_TARGET_DEBUG(target, "timeout waiting for target halt, try halt"); + + retval = cortex_a_halt(target); + if (retval != ERROR_OK) + return retval; + + retval = cortex_a_poll(target); + if (retval != ERROR_OK) + return retval; + + if (target->state != TARGET_HALTED) { + LOG_TARGET_ERROR(target, "timeout waiting for target halt"); return ERROR_FAIL; } } @@ -1255,9 +1297,6 @@ static int cortex_a_step(struct target *target, bool current, target_addr_t addr if (breakpoint) cortex_a_set_breakpoint(target, breakpoint, 0); - if (target->state != TARGET_HALTED) - LOG_DEBUG("target stepped"); - return ERROR_OK; } ----------------------------------------------------------------------- Summary of changes: src/target/cortex_a.c | 55 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 8 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-05-17 14:04:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 6a3abda0b46a777490a8ce5bc748e6fed6775354 (commit) from e30828a2769c294a9d2a36ed10f1f3516d82d1c1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6a3abda0b46a777490a8ce5bc748e6fed6775354 Author: Bernhard Rosenkränzer <be...@ba...> Date: Tue May 6 01:07:06 2025 +0200 helper: add base64 encoding/decoding helpers from FreeBSD These helpers are needed by the updated RISC-V target files. Change-Id: I5aa9f4e58eb75e1c7a1e8e0e3961725e2a915ebb Signed-off-by: Bernhard Rosenkränzer <be...@ba...> Reviewed-on: https://review.openocd.org/c/openocd/+/8895 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am index a17ada97d..807212478 100644 --- a/src/helper/Makefile.am +++ b/src/helper/Makefile.am @@ -3,6 +3,7 @@ noinst_LTLIBRARIES += %D%/libhelper.la %C%_libhelper_la_SOURCES = \ + %D%/base64.c \ %D%/binarybuffer.c \ %D%/options.c \ %D%/time_support_common.c \ @@ -18,6 +19,7 @@ noinst_LTLIBRARIES += %D%/libhelper.la %D%/jim-nvp.c \ %D%/nvp.c \ %D%/align.h \ + %D%/base64.h \ %D%/binarybuffer.h \ %D%/bitfield.h \ %D%/bits.h \ diff --git a/src/helper/base64.c b/src/helper/base64.c new file mode 100644 index 000000000..5e0ee0846 --- /dev/null +++ b/src/helper/base64.c @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/* + * Base64 encoding/decoding (RFC1341) + * Copyright (c) 2005-2011, Jouni Malinen <j...@w1...> + * + * Original file from FreeBSD code + * https://cgit.freebsd.org/src/tree/contrib/wpa/src/utils/base64.c?id=f05cddf940db + */ + + +#include <stddef.h> +#include <stdlib.h> +#include <string.h> + +#include "base64.h" + +static const unsigned char base64_table[65] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +/** + * base64_encode - Base64 encode + * @src: Data to be encoded + * @len: Length of the data to be encoded + * @out_len: Pointer to output length variable, or %NULL if not used + * Returns: Allocated buffer of out_len bytes of encoded data, + * or %NULL on failure + * + * Caller is responsible for freeing the returned buffer. Returned buffer is + * nul terminated to make it easier to use as a C string. The nul terminator is + * not included in out_len. + */ +unsigned char *base64_encode(const unsigned char *src, size_t len, + size_t *out_len) +{ + unsigned char *out, *pos; + const unsigned char *end, *in; + size_t olen; + int line_len; + + olen = len * 4 / 3 + 4; /* 3-byte blocks to 4-byte */ + olen += olen / 72; /* line feeds */ + olen++; /* nul termination */ + if (olen < len) + return NULL; /* integer overflow */ + out = malloc(olen); + if (!out) + return NULL; + + end = src + len; + in = src; + pos = out; + line_len = 0; + while (end - in >= 3) { + *pos++ = base64_table[in[0] >> 2]; + *pos++ = base64_table[((in[0] & 0x03) << 4) | (in[1] >> 4)]; + *pos++ = base64_table[((in[1] & 0x0f) << 2) | (in[2] >> 6)]; + *pos++ = base64_table[in[2] & 0x3f]; + in += 3; + line_len += 4; + if (line_len >= 72) { + *pos++ = '\n'; + line_len = 0; + } + } + + if (end - in) { + *pos++ = base64_table[in[0] >> 2]; + if (end - in == 1) { + *pos++ = base64_table[(in[0] & 0x03) << 4]; + *pos++ = '='; + } else { + *pos++ = base64_table[((in[0] & 0x03) << 4) | + (in[1] >> 4)]; + *pos++ = base64_table[(in[1] & 0x0f) << 2]; + } + *pos++ = '='; + line_len += 4; + } + + if (line_len) + *pos++ = '\n'; + + *pos = '\0'; + if (out_len) + *out_len = pos - out; + return out; +} + + +/** + * base64_decode - Base64 decode + * @src: Data to be decoded + * @len: Length of the data to be decoded + * @out_len: Pointer to output length variable + * Returns: Allocated buffer of out_len bytes of decoded data, + * or %NULL on failure + * + * Caller is responsible for freeing the returned buffer. + */ +unsigned char *base64_decode(const unsigned char *src, size_t len, + size_t *out_len) +{ + unsigned char dtable[256], *out, *pos, block[4], tmp; + size_t i, count, olen; + int pad = 0; + + memset(dtable, 0x80, 256); + for (i = 0; i < sizeof(base64_table) - 1; i++) + dtable[base64_table[i]] = (unsigned char)i; + dtable['='] = 0; + + count = 0; + for (i = 0; i < len; i++) { + if (dtable[src[i]] != 0x80) + count++; + } + + if (count == 0 || count % 4) + return NULL; + + olen = count / 4 * 3; + out = malloc(olen); + if (!out) + return NULL; + pos = out; + + count = 0; + for (i = 0; i < len; i++) { + tmp = dtable[src[i]]; + if (tmp == 0x80) + continue; + + if (src[i] == '=') + pad++; + block[count] = tmp; + count++; + if (count == 4) { + *pos++ = (block[0] << 2) | (block[1] >> 4); + *pos++ = (block[1] << 4) | (block[2] >> 2); + *pos++ = (block[2] << 6) | block[3]; + count = 0; + if (pad) { + if (pad == 1) { + pos--; + } else if (pad == 2) { + pos -= 2; + } else { + /* Invalid padding */ + free(out); + return NULL; + } + break; + } + } + } + + *out_len = pos - out; + return out; +} diff --git a/src/helper/base64.h b/src/helper/base64.h new file mode 100644 index 000000000..d3e046213 --- /dev/null +++ b/src/helper/base64.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ + +/* + * Base64 encoding/decoding (RFC1341) + * Copyright (c) 2005, Jouni Malinen <j...@w1...> + * + * Original file from FreeBSD code + * https://cgit.freebsd.org/src/tree/contrib/wpa/src/utils/base64.h?id=f05cddf940db + */ + +#ifndef BASE64_H +#define BASE64_H + +unsigned char *base64_encode(const unsigned char *src, size_t len, + size_t *out_len); +unsigned char *base64_decode(const unsigned char *src, size_t len, + size_t *out_len); + +#endif /* BASE64_H */ ----------------------------------------------------------------------- Summary of changes: src/helper/Makefile.am | 2 + src/helper/base64.c | 160 +++++++++++++++++++++++++++++++++++++++++++++++++ src/helper/base64.h | 19 ++++++ 3 files changed, 181 insertions(+) create mode 100644 src/helper/base64.c create mode 100644 src/helper/base64.h hooks/post-receive -- Main OpenOCD repository |