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
(54) |
Sep
(36) |
Oct
|
Nov
|
Dec
|
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:43:39
|
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 04d51723d042f87057a012086003c19144732f3d (commit) from 7f1f18399ce626e30d5176fb9740ed5fcd312c43 (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 04d51723d042f87057a012086003c19144732f3d Author: R. Diez <rdi...@rd...> Date: Sat Jun 21 21:41:38 2025 +0200 configure.ac: show the dmem adapter in the config summary Also enable this adapter by default (auto). Change-Id: I61597c8572115f838ab0c92021163436eb7b0d59 Signed-off-by: R. Diez <rdi...@rd...> Reviewed-on: https://review.openocd.org/c/openocd/+/8971 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/configure.ac b/configure.ac index 5a05f3171..453cbcfb5 100644 --- a/configure.ac +++ b/configure.ac @@ -165,6 +165,9 @@ m4_define([LIBFTDI_USB1_ADAPTERS], m4_define([LIBGPIOD_ADAPTERS], [[[linuxgpiod], [Linux GPIO bitbang through libgpiod], [LINUXGPIOD]]]) +m4_define([DMEM_ADAPTER], + [[[dmem], [CoreSight Direct Memory], [DMEM]]]) + m4_define([SYSFSGPIO_ADAPTER], [[[sysfsgpio], [Linux GPIO bitbang through sysfs], [SYSFSGPIO]]]) @@ -302,10 +305,6 @@ AS_IF([test "x$debug_malloc" = "xyes" -a "x$have_glibc" = "xyes"], [ AC_DEFINE([_DEBUG_FREE_SPACE_],[1], [Include malloc free space in logging]) ]) -AC_ARG_ENABLE([dmem], - AS_HELP_STRING([--enable-dmem], [Enable building the dmem driver]), - [build_dmem=$enableval], [build_dmem=no]) - m4_define([AC_ARG_ADAPTERS], [ m4_foreach([adapterTuple], [$1], [AC_ARG_ENABLE(ADAPTER_OPT([adapterTuple]), @@ -326,6 +325,7 @@ AC_ARG_ADAPTERS([ LIBFTDI_ADAPTERS, LIBFTDI_USB1_ADAPTERS, LIBGPIOD_ADAPTERS, + DMEM_ADAPTER, SYSFSGPIO_ADAPTER, REMOTE_BITBANG_ADAPTER, LINUXSPIDEV_ADAPTER, @@ -503,12 +503,6 @@ AS_IF([test "x$build_parport" = "xyes"], [ AC_DEFINE([BUILD_PARPORT], [0], [0 if you don't want parport.]) ]) -AS_IF([test "x$build_dmem" = "xyes"], [ - AC_DEFINE([BUILD_DMEM], [1], [1 if you want to debug via Direct Mem.]) -], [ - AC_DEFINE([BUILD_DMEM], [0], [0 if you don't want to debug via Direct Mem.]) -]) - AS_IF([test "x$ADAPTER_VAR([dummy])" != "xno"], [ build_bitbang=yes ]) @@ -646,6 +640,7 @@ PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libu PROCESS_ADAPTERS([LIBFTDI_ADAPTERS], ["x$use_libftdi" = "xyes"], [libftdi]) PROCESS_ADAPTERS([LIBFTDI_USB1_ADAPTERS], ["x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"], [libftdi and libusb-1.x]) PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [Linux libgpiod]) +PROCESS_ADAPTERS([DMEM_ADAPTER], ["x$is_linux" = "xyes"], [Linux /dev/mem]) PROCESS_ADAPTERS([SYSFSGPIO_ADAPTER], ["x$is_linux" = "xyes"], [Linux sysfs]) PROCESS_ADAPTERS([REMOTE_BITBANG_ADAPTER], [true], [unused]) PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2]) @@ -744,7 +739,6 @@ AM_CONDITIONAL([USE_LIBFTDI], [test "x$use_libftdi" = "xyes"]) AM_CONDITIONAL([USE_LIBGPIOD], [test "x$use_libgpiod" = "xyes"]) AM_CONDITIONAL([USE_HIDAPI], [test "x$use_hidapi" = "xyes"]) AM_CONDITIONAL([USE_LIBJAYLINK], [test "x$use_libjaylink" = "xyes"]) -AM_CONDITIONAL([DMEM], [test "x$build_dmem" = "xyes"]) AM_CONDITIONAL([HAVE_CAPSTONE], [test "x$enable_capstone" != "xno"]) AM_CONDITIONAL([INTERNAL_JIMTCL], [test "x$use_internal_jimtcl" = "xyes"]) @@ -843,6 +837,7 @@ m4_foreach([adapterTuple], [USB1_ADAPTERS, HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS, LIBFTDI_USB1_ADAPTERS, LIBGPIOD_ADAPTERS, + DMEM_ADAPTER, SYSFSGPIO_ADAPTER, REMOTE_BITBANG_ADAPTER, LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS, SERIAL_PORT_ADAPTERS, ----------------------------------------------------------------------- Summary of changes: configure.ac | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:43:23
|
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 7f1f18399ce626e30d5176fb9740ed5fcd312c43 (commit) via ff274122dc2fbf509b24480e97a98291db53a338 (commit) from e8dca112453ae01bdfa04e1a1da8d20d5eb08d8f (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 7f1f18399ce626e30d5176fb9740ed5fcd312c43 Author: Antonio Borneo <bor...@gm...> Date: Sun Jun 22 11:03:41 2025 +0200 jtag/drivers: dmem: fix build on Linux 32 bits On 32 bits machine both 'uintptr_t' and pointers are 32 bit. The cast (volatile uint32_t *)((uintptr_t)dmem_emu_virt_base_addr + addr) fails with error error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] in lines 100 and 109 because: - 'addr' is a 'uint64_t'; - adding 'uintptr_t' and 'uint64_t' returns a 64 bit value; - cast the 64 bit to 'uint32_t *' is an error. In the code the value passed to 'addr' is always 32 bit wide, so there is no need to pass it as 'uint64_t'. Change the type of 'addr' to 'uint32_t'. Fix also some format string to fit both 32 and 64 bits machines. Change-Id: I90ff7cd3731cb24a0fc91fe7b69c532b5c698ba0 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8974 Reviewed-by: Nishanth Menon <nm...@ti...> Tested-by: jenkins Reviewed-by: R. Diez <rdi...@rd...> diff --git a/src/jtag/drivers/dmem.c b/src/jtag/drivers/dmem.c index e50e84aee..c1eb5b80d 100644 --- a/src/jtag/drivers/dmem.c +++ b/src/jtag/drivers/dmem.c @@ -93,14 +93,14 @@ static bool dmem_is_emulated_ap(struct adiv5_ap *ap, unsigned int *idx) return false; } -static void dmem_emu_set_ap_reg(uint64_t addr, uint32_t val) +static void dmem_emu_set_ap_reg(uint32_t addr, uint32_t val) { addr &= ~ARM_APB_PADDR31; *(volatile uint32_t *)((uintptr_t)dmem_emu_virt_base_addr + addr) = val; } -static uint32_t dmem_emu_get_ap_reg(uint64_t addr) +static uint32_t dmem_emu_get_ap_reg(uint32_t addr) { uint32_t val; @@ -113,7 +113,7 @@ static uint32_t dmem_emu_get_ap_reg(uint64_t addr) static int dmem_emu_ap_q_read(unsigned int ap_idx, unsigned int reg, uint32_t *data) { - uint64_t addr; + uint32_t addr; int ret = ERROR_OK; struct dmem_emu_ap_info *ap_info = &dmem_emu_ap_list[ap_idx]; @@ -164,7 +164,7 @@ static int dmem_emu_ap_q_read(unsigned int ap_idx, unsigned int reg, uint32_t *d static int dmem_emu_ap_q_write(unsigned int ap_idx, unsigned int reg, uint32_t data) { - uint64_t addr; + uint32_t addr; int ret = ERROR_OK; struct dmem_emu_ap_info *ap_info = &dmem_emu_ap_list[ap_idx]; @@ -519,7 +519,7 @@ static int dmem_dap_init(void) MAP_SHARED, dmem_fd, dmem_mapped_start); if (dmem_map_base == MAP_FAILED) { - LOG_ERROR("Mapping address 0x%lx for 0x%lx bytes failed!", + LOG_ERROR("Mapping address 0x%zx for 0x%zx bytes failed!", dmem_mapped_start, dmem_mapped_size); goto error_fail; } @@ -543,7 +543,7 @@ static int dmem_dap_init(void) MAP_SHARED, dmem_fd, dmem_mapped_start); if (dmem_emu_map_base == MAP_FAILED) { - LOG_ERROR("Mapping EMU address 0x%lx for 0x%lx bytes failed!", + LOG_ERROR("Mapping EMU address 0x%" PRIx64 " for 0x%" PRIx64 " bytes failed!", dmem_emu_base_address, dmem_emu_size); goto error_fail; } commit ff274122dc2fbf509b24480e97a98291db53a338 Author: Tim Newsome <ti...@si...> Date: Thu Nov 10 10:32:23 2022 -0800 gdb_server: Improve info message. Add target name and state to "Not running when halt was requested" message. Imported from https://github.com/riscv-collab/riscv-openocd/pull/763 Change-Id: Ic84e9a884b57caa270cfee0ca6fa6a0dd8e5d2bd Signed-off-by: Tim Newsome <ti...@si...> Reviewed-on: https://review.openocd.org/c/openocd/+/8916 Tested-by: jenkins Reviewed-by: Evgeniy Naydanov <evg...@sy...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index b5007d927..3eba15070 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -3761,7 +3761,8 @@ static int gdb_input_inner(struct connection *connection) target_call_event_callbacks(target, TARGET_EVENT_GDB_HALT); gdb_con->ctrl_c = false; } else { - LOG_INFO("The target is not running when halt was requested, stopping GDB."); + LOG_TARGET_INFO(target, "Not running when halt was requested, stopping GDB. (state=%d)", + target->state); target_call_event_callbacks(target, TARGET_EVENT_GDB_HALT); } } ----------------------------------------------------------------------- Summary of changes: src/jtag/drivers/dmem.c | 12 ++++++------ src/server/gdb_server.c | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:43: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 e8dca112453ae01bdfa04e1a1da8d20d5eb08d8f (commit) from f9077f302658eaf5d114d3f84f838a45481af0ac (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 e8dca112453ae01bdfa04e1a1da8d20d5eb08d8f Author: Tomas Vanek <va...@fb...> Date: Mon May 26 07:54:05 2025 +0200 doc: fix bp usage Commit c8926d14579528bfcead1e179baf7cb846513db4 ("cortex_a hybrid & context breakpoints") missed doc update. Add info about settig hybrid & context breakpoints to chapter 15.5 Breakpoint and Watchpoint commands Change-Id: I4a6fdc83a4c30ad8437c49796de8e6d8c6375c0c Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8934 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/doc/openocd.texi b/doc/openocd.texi index 494042530..6d607d697 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -9731,12 +9731,14 @@ hardware support for a handful of code breakpoints and data watchpoints. In addition, CPUs almost always support software breakpoints. -@deffn {Command} {bp} [address len [@option{hw}]] +@deffn {Command} {bp} [address [asid] len [@option{hw} | @option{hw_ctx}]] With no parameters, lists all active breakpoints. Else sets a breakpoint on code execution starting at @var{address} for @var{length} bytes. -This is a software breakpoint, unless @option{hw} is specified -in which case it will be a hardware breakpoint. +This is a software breakpoint, unless @option{hw} or @option{hw_ctx} +is specified in which case it will be a hardware, context or hybrid breakpoint. +The context and hybrid breakpoints require an additional parameter @var{asid}: +address space identifier. (@xref{arm9vectorcatch,,arm9 vector_catch}, or @pxref{xscalevectorcatch,,xscale vector_catch}, for similar mechanisms that do not consume hardware breakpoints.) ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:41:55
|
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 f9077f302658eaf5d114d3f84f838a45481af0ac (commit) from c4fb64e76c526799fc43f72fe2cdd4606c8b9b52 (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 f9077f302658eaf5d114d3f84f838a45481af0ac Author: Tomas Vanek <va...@fb...> Date: Wed Jun 18 12:01:08 2025 +0200 flash/nor/rp2xxx: save ACCESSCTRL over ROM API calls Especially after the flash probe (used in gdb-attach event) we need to completely restore the original security state to allow 'resume' or gdb 'continue' without injecting strange errors to application code. Save all ACCESSCTRL registers potentially changed by triggering CFGRESET. Restore them at cleanup. Fixes: commit ea775d49fc71 ("flash/nor/rp2040: add RP2350 support") Change-Id: I964886d5b1d0269497c343811ee4dcd5c31953db Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8961 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/rp2xxx.c b/src/flash/nor/rp2xxx.c index fa13ec527..30c6e9914 100644 --- a/src/flash/nor/rp2xxx.c +++ b/src/flash/nor/rp2xxx.c @@ -41,10 +41,18 @@ #define BOOTROM_STATE_RESET_OTHER_CORE 0x02 #define BOOTROM_STATE_RESET_GLOBAL_STATE 0x04 -#define ACCESSCTRL_LOCK_OFFSET 0x40060000u -#define ACCESSCTRL_LOCK_DEBUG_BITS 0x00000008u -#define ACCESSCTRL_CFGRESET_OFFSET 0x40060008u -#define ACCESSCTRL_WRITE_PASSWORD 0xacce0000u +#define ACCESSCTRL_LOCK_OFFSET 0x40060000u +#define ACCESSCTRL_CFGRESET_OFFSET 0x40060008u +#define ACCESSCTRL_GPIO_NSMASK0_OFFSET 0x4006000cu +#define ACCESSCTRL_GPIO_ROM_OFFSET 0x40060014u +#define ACCESSCTRL_GPIO_XIP_AUX_OFFSET 0x400600e8u + +#define ACCESSCTRL_SAVE_BASE ACCESSCTRL_GPIO_NSMASK0_OFFSET +#define ACCESSCTRL_SAVE_SIZE \ + (ACCESSCTRL_GPIO_XIP_AUX_OFFSET + 4 - ACCESSCTRL_SAVE_BASE) + +#define ACCESSCTRL_LOCK_DEBUG_BITS 0x00000008u +#define ACCESSCTRL_WRITE_PASSWORD 0xacce0000u #define RP2040_SSI_DR0 0x18000060 #define RP2040_QSPI_CTRL 0x4001800c @@ -211,6 +219,8 @@ struct rp2xxx_flash_bank { unsigned int sfdp_dummy, sfdp_dummy_detect; struct cortex_m_saved_security saved_security; + bool accessctrl_dirty; + uint8_t saved_accessctrl[ACCESSCTRL_SAVE_SIZE]; /* in target byte order */ }; #ifndef LOG_ROM_SYMBOL_DEBUG @@ -601,8 +611,28 @@ static int rp2xxx_call_rom_func(struct target *target, struct rp2xxx_flash_bank return rp2xxx_call_rom_func_batch(target, priv, &call, 1); } -static int rp2350_init_accessctrl(struct target *target) +static int rp2350_save_accessctrl(struct target *target, struct rp2xxx_flash_bank *priv) { + return target_read_memory(target, ACCESSCTRL_SAVE_BASE, 4, ACCESSCTRL_SAVE_SIZE / 4, + priv->saved_accessctrl); +} + +static int rp2350_restore_accessctrl(struct target *target, struct rp2xxx_flash_bank *priv) +{ + // Add write passwords to all ACCESSCTRL regs from ACCESSCTRL_GPIO_ROM to the end + // (exclude not keyed ACCESSCTRL_GPIO_NSMASK0 and ACCESSCTRL_GPIO_NSMASK1 + for (unsigned int i = ACCESSCTRL_GPIO_ROM_OFFSET - ACCESSCTRL_SAVE_BASE; + i < ACCESSCTRL_SAVE_SIZE; i += 4) + target_buffer_set_u32(target, priv->saved_accessctrl + i, + target_buffer_get_u32(target, priv->saved_accessctrl + i) | ACCESSCTRL_WRITE_PASSWORD); + + return target_write_memory(target, ACCESSCTRL_SAVE_BASE, 4, ACCESSCTRL_SAVE_SIZE / 4, + priv->saved_accessctrl); +} + +static int rp2350_init_accessctrl(struct target *target, struct rp2xxx_flash_bank *priv) +{ + priv->accessctrl_dirty = false; // Attempt to reset ACCESSCTRL, in case Secure access to SRAM has been // blocked, which will stop us from loading/running algorithms such as RCP // init. (Also ROM, QMI regs are needed later) @@ -620,6 +650,13 @@ static int rp2350_init_accessctrl(struct target *target) if (accessctrl_lock_reg & ACCESSCTRL_LOCK_DEBUG_BITS) { LOG_ERROR("ACCESSCTRL is locked, so can't reset permissions. Following steps might fail"); } else { + int retval = rp2350_save_accessctrl(target, priv); + if (retval == ERROR_OK) + priv->accessctrl_dirty = true; + // If the ACCESSCTRL backup copy is valid, mark it dirty + // as we immediately proceed to ACCESSCTRL config reset. + // Don't fail on save ACCESSCTRL error, not vital for ROM API call + LOG_DEBUG("Reset ACCESSCTRL permissions via CFGRESET"); return target_write_u32(target, ACCESSCTRL_CFGRESET_OFFSET, ACCESSCTRL_WRITE_PASSWORD | 1u); } @@ -704,7 +741,7 @@ static int setup_for_raw_flash_cmd(struct target *target, struct rp2xxx_flash_ba } if (IS_RP2350(priv->id)) { - err = rp2350_init_accessctrl(target); + err = rp2350_init_accessctrl(target, priv); if (err != ERROR_OK) { LOG_ERROR("Failed to init ACCESSCTRL before ROM call"); return err; @@ -833,12 +870,19 @@ static void cleanup_after_raw_flash_cmd(struct target *target, struct rp2xxx_fla LOG_DEBUG("Cleaning up after flash operations"); if (IS_RP2350(priv->id)) { - /* TODO: restore ACCESSCTRL */ - if (is_arm(target_to_arm(target))) { - int retval = cortex_m_security_restore(target, &priv->saved_security); - if (retval != ERROR_OK) - LOG_WARNING("RP2xxx: security state was not restored properly. Debug 'resume' will probably fail, use 'reset' instead"); + int retval1 = ERROR_OK; + if (priv->accessctrl_dirty) { + retval1 = rp2350_restore_accessctrl(target, priv); + priv->accessctrl_dirty = false; } + + int retval2 = ERROR_OK; + if (is_arm(target_to_arm(target))) + retval2 = cortex_m_security_restore(target, &priv->saved_security); + + if (retval1 != ERROR_OK || retval2 != ERROR_OK) + LOG_WARNING("RP2xxx: security state was not restored properly. Debug 'resume' will probably fail, use 'reset' instead"); + /* Don't fail on security restore error, not vital for flash operation */ } if (priv->stack) { target_free_working_area(target, priv->stack); ----------------------------------------------------------------------- Summary of changes: src/flash/nor/rp2xxx.c | 66 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 11 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:41:32
|
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 c4fb64e76c526799fc43f72fe2cdd4606c8b9b52 (commit) via f547e55076e847889387904c6a0803e742aeb36d (commit) from ce3bf664c81569b2eb457f676814eade9d464141 (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 c4fb64e76c526799fc43f72fe2cdd4606c8b9b52 Author: Tomas Vanek <va...@fb...> Date: Wed Jun 18 09:44:03 2025 +0200 flash/nor/rp2xxx: save security state over target algo RP2040 and RP2350 flash driver runs a ROM API target algorithm in probe to setup QSPI command interface. The Cortex-M33 core of RP2350 has to be in secure mode with SAU and MPU switched off to ensure ROM API call working properly. Especially after the flash probe (used in gdb-attach event) we need to completely restore the original security state to allow 'resume' or gdb 'continue' without injecting strange errors to application code. Use cortex_m support to set secure mode and to restore it back. Fixes: commit ea775d49fc71 ("flash/nor/rp2040: add RP2350 support") Change-Id: I72096bfecbb45a8aa4d3a7a37ad140532b3b00b2 Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8960 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/rp2xxx.c b/src/flash/nor/rp2xxx.c index 85c591104..fa13ec527 100644 --- a/src/flash/nor/rp2xxx.c +++ b/src/flash/nor/rp2xxx.c @@ -209,6 +209,8 @@ struct rp2xxx_flash_bank { bool size_override; struct flash_device spi_dev; /* detected model of SPI flash */ unsigned int sfdp_dummy, sfdp_dummy_detect; + + struct cortex_m_saved_security saved_security; }; #ifndef LOG_ROM_SYMBOL_DEBUG @@ -630,23 +632,12 @@ static int rp2350_init_arm_core0(struct target *target, struct rp2xxx_flash_bank // run in the Secure state, so flip the state now before attempting to // execute any code on the core. int retval; - uint32_t dscsr; - retval = target_read_u32(target, DCB_DSCSR, &dscsr); + retval = cortex_m_set_secure(target, &priv->saved_security); if (retval != ERROR_OK) { - LOG_ERROR("RP2350 init ARM core: DSCSR read failed"); + LOG_ERROR("RP2350 init ARM core: set secure mode failed"); return retval; } - LOG_DEBUG("DSCSR: 0x%08" PRIx32, dscsr); - if (!(dscsr & DSCSR_CDS)) { - LOG_DEBUG("Setting Current Domain Secure in DSCSR"); - retval = target_write_u32(target, DCB_DSCSR, (dscsr & ~DSCSR_CDSKEY) | DSCSR_CDS); - if (retval != ERROR_OK) { - LOG_ERROR("RP2350 init ARM core: DSCSR read failed"); - return retval; - } - } - if (!priv->stack) { LOG_ERROR("No stack for flash programming code"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; @@ -840,6 +831,15 @@ static void cleanup_after_raw_flash_cmd(struct target *target, struct rp2xxx_fla driver state. Best to clean up our allocations manually after completing each flash call, so we know to make fresh ones next time. */ LOG_DEBUG("Cleaning up after flash operations"); + + if (IS_RP2350(priv->id)) { + /* TODO: restore ACCESSCTRL */ + if (is_arm(target_to_arm(target))) { + int retval = cortex_m_security_restore(target, &priv->saved_security); + if (retval != ERROR_OK) + LOG_WARNING("RP2xxx: security state was not restored properly. Debug 'resume' will probably fail, use 'reset' instead"); + } + } if (priv->stack) { target_free_working_area(target, priv->stack); priv->stack = 0; commit f547e55076e847889387904c6a0803e742aeb36d Author: Tomas Vanek <va...@fb...> Date: Tue Jun 17 16:23:12 2025 +0200 target/cortex_m: introduce security manipulation routines Running target algorithms on ARMv8M may require core in secure mode with SAU and MPU off (as set after reset). cortex_m_set_secure() forces this mode with optional save of the previous state. cortex_m_security_restore() restores previously saved state. Change-Id: Ia71826db47ee7b0557eaffd55244ce13eacbcb4b Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8959 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 8eaf70f60..0501a5b2f 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -2563,6 +2563,112 @@ static bool cortex_m_has_tz(struct target *target) return (dauthstatus & DAUTHSTATUS_SID_MASK) != 0; } +int cortex_m_set_secure(struct target *target, struct cortex_m_saved_security *ssec) +{ + if (ssec) { + ssec->dscsr_dirty = false; + ssec->sau_ctrl_dirty = false; + ssec->mpu_ctrl_dirty = false; + } + + if (!cortex_m_has_tz(target)) + return ERROR_OK; + + uint32_t dscsr; + int retval = target_read_u32(target, DCB_DSCSR, &dscsr); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M set secure: DSCSR read failed"); + return retval; + } + if (!(dscsr & DSCSR_CDS)) { + if (ssec) { + ssec->dscsr_dirty = true; + ssec->dscsr = dscsr; + } + LOG_TARGET_DEBUG(target, "Setting Current Domain Secure in DSCSR"); + retval = target_write_u32(target, DCB_DSCSR, DSCSR_CDS); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M set secure: DSCSR write failed"); + return retval; + } + } + + uint32_t sau_ctrl; + retval = target_read_u32(target, SAU_CTRL, &sau_ctrl); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M set secure: SAU_CTRL read failed"); + return retval; + } + if (sau_ctrl & SAU_CTRL_ENABLE) { + if (ssec) { + ssec->sau_ctrl_dirty = true; + ssec->sau_ctrl = sau_ctrl; + } + retval = target_write_u32(target, SAU_CTRL, sau_ctrl & ~SAU_CTRL_ENABLE); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M set secure: SAU_CTRL write failed"); + return retval; + } + } + + uint32_t mpu_ctrl; + retval = target_read_u32(target, MPU_CTRL, &mpu_ctrl); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M set secure: MPU_CTRL read failed"); + return retval; + } + if (mpu_ctrl & MPU_CTRL_ENABLE) { + if (ssec) { + ssec->mpu_ctrl_dirty = true; + ssec->mpu_ctrl = mpu_ctrl; + } + retval = target_write_u32(target, MPU_CTRL, mpu_ctrl & ~MPU_CTRL_ENABLE); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M set secure: MPU_CTRL write failed"); + return retval; + } + } + return ERROR_OK; +} + +int cortex_m_security_restore(struct target *target, struct cortex_m_saved_security *ssec) +{ + int retval; + if (!cortex_m_has_tz(target)) + return ERROR_OK; + + if (!ssec) + return ERROR_OK; + + if (ssec->mpu_ctrl_dirty) { + retval = target_write_u32(target, MPU_CTRL, ssec->mpu_ctrl); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M security restore: MPU_CTRL write failed"); + return retval; + } + ssec->mpu_ctrl_dirty = false; + } + + if (ssec->sau_ctrl_dirty) { + retval = target_write_u32(target, SAU_CTRL, ssec->sau_ctrl); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M security restore: SAU_CTRL write failed"); + return retval; + } + ssec->sau_ctrl_dirty = false; + } + + if (ssec->dscsr_dirty) { + LOG_TARGET_DEBUG(target, "Restoring Current Domain Security in DSCSR"); + retval = target_write_u32(target, DCB_DSCSR, ssec->dscsr & ~DSCSR_CDSKEY); + if (retval != ERROR_OK) { + LOG_TARGET_ERROR(target, "ARMv8M set secure: DSCSR write failed"); + return retval; + } + ssec->dscsr_dirty = false; + } + return ERROR_OK; +} #define MVFR0 0xE000EF40 #define MVFR0_SP_MASK 0x000000F0 diff --git a/src/target/cortex_m.h b/src/target/cortex_m.h index 144f24560..82b2c1ecd 100644 --- a/src/target/cortex_m.h +++ b/src/target/cortex_m.h @@ -167,6 +167,8 @@ struct cortex_m_part_info { #define NVIC_DFSR 0xE000ED30 #define NVIC_MMFAR 0xE000ED34 #define NVIC_BFAR 0xE000ED38 +#define MPU_CTRL 0xE000ED94 +#define SAU_CTRL 0xE000EDD0 #define NVIC_SFSR 0xE000EDE4 #define NVIC_SFAR 0xE000EDE8 @@ -184,6 +186,9 @@ struct cortex_m_part_info { #define DFSR_VCATCH 8 #define DFSR_EXTERNAL 16 +#define MPU_CTRL_ENABLE BIT(0) +#define SAU_CTRL_ENABLE BIT(0) + #define FPCR_CODE 0 #define FPCR_LITERAL 1 #define FPCR_REPLACE_REMAP (0ul << 30) @@ -264,6 +269,15 @@ struct cortex_m_common { bool incorrect_halt_erratum; }; +struct cortex_m_saved_security { + bool dscsr_dirty; + uint32_t dscsr; + bool sau_ctrl_dirty; + uint32_t sau_ctrl; + bool mpu_ctrl_dirty; + uint32_t mpu_ctrl; +}; + static inline bool is_cortex_m_or_hla(const struct cortex_m_common *cortex_m) { return cortex_m->common_magic == CORTEX_M_COMMON_MAGIC; @@ -341,4 +355,17 @@ void cortex_m_deinit_target(struct target *target); int cortex_m_profiling(struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds); +/** + * Forces Cortex-M core to the basic secure context with SAU and MPU off + * @param ssec pointer to save previous security state or NULL + * @returns error code or ERROR_OK if secure mode was set or is not applicable + * (not ARMv8M with security extension) + */ +int cortex_m_set_secure(struct target *target, struct cortex_m_saved_security *ssec); + +/** + * Restores saved security context to MPU_CTRL, SAU_CTRL and DSCSR + */ +int cortex_m_security_restore(struct target *target, struct cortex_m_saved_security *ssec); + #endif /* OPENOCD_TARGET_CORTEX_M_H */ ----------------------------------------------------------------------- Summary of changes: src/flash/nor/rp2xxx.c | 26 ++++++------ src/target/cortex_m.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++ src/target/cortex_m.h | 27 +++++++++++++ 3 files changed, 146 insertions(+), 13 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:39:54
|
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 ce3bf664c81569b2eb457f676814eade9d464141 (commit) via 13b74c3fc7718d3ac639d6c382b2a4e3ec70a6d1 (commit) from 6631419beba62893075eae5e1e13ddba9062d4f5 (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 ce3bf664c81569b2eb457f676814eade9d464141 Author: R. Diez <rdi...@rd...> Date: Sat Jun 21 22:05:17 2025 +0200 configure.ac: rename M4 macro 'adapter' to prevent accidental conflicts Also remove a comment about such a conflict which had been already noticed. Change-Id: I6f301ccbd1261ea1c15c44a02d3f34f0cf5cb9f4 Signed-off-by: R. Diez <rdi...@rd...> Reviewed-on: https://review.openocd.org/c/openocd/+/8972 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/configure.ac b/configure.ac index 4b9471629..5a05f3171 100644 --- a/configure.ac +++ b/configure.ac @@ -206,8 +206,6 @@ m4_define([HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS], [[imx_gpio], [Bitbanging on NXP IMX processors], [IMX_GPIO]], [[am335xgpio], [Bitbanging on AM335x (as found in Beaglebones)], [AM335XGPIO]]]) -# The word 'Adapter' in "Dummy Adapter" below must begin with a capital letter -# because there is an M4 macro called 'adapter'. m4_define([DUMMY_ADAPTER], [[[dummy], [Dummy Adapter], [DUMMY]]]) @@ -309,15 +307,15 @@ AC_ARG_ENABLE([dmem], [build_dmem=$enableval], [build_dmem=no]) m4_define([AC_ARG_ADAPTERS], [ - m4_foreach([adapter], [$1], - [AC_ARG_ENABLE(ADAPTER_OPT([adapter]), - AS_HELP_STRING([--enable-ADAPTER_OPT([adapter])[[[=yes/no/auto]]]], - [Enable building support for the ]ADAPTER_DESC([adapter])[ (default is $2)]), + m4_foreach([adapterTuple], [$1], + [AC_ARG_ENABLE(ADAPTER_OPT([adapterTuple]), + AS_HELP_STRING([--enable-ADAPTER_OPT([adapterTuple])[[[=yes/no/auto]]]], + [Enable building support for the ]ADAPTER_DESC([adapterTuple])[ (default is $2)]), [case "${enableval}" in yes|no|auto) ;; - *) AC_MSG_ERROR([Option --enable-ADAPTER_OPT([adapter]) has invalid value "${enableval}".]) ;; + *) AC_MSG_ERROR([Option --enable-ADAPTER_OPT([adapterTuple]) has invalid value "${enableval}".]) ;; esac], - [ADAPTER_VAR([adapter])=$2]) + [ADAPTER_VAR([adapterTuple])=$2]) ]) ]) @@ -622,21 +620,23 @@ PKG_CHECK_MODULES([LIBJAYLINK], [libjaylink >= 0.2], # Arg $3: What prerequisites are missing, to be shown in an error message # if an adapter was requested but cannot be enabled. m4_define([PROCESS_ADAPTERS], [ - m4_foreach([adapter], [$1], [ + m4_foreach([adapterTuple], [$1], [ AS_IF([test $2], [ - AS_IF([test "x$ADAPTER_VAR([adapter])" != "xno"], [ - AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [1], [1 if you want the ]ADAPTER_DESC([adapter]).) + AS_IF([test "x$ADAPTER_VAR([adapterTuple])" != "xno"], [ + AC_DEFINE([BUILD_]ADAPTER_SYM([adapterTuple]), [1], + [1 if you want the ]ADAPTER_DESC([adapterTuple]).) ], [ - AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [0], [0 if you do not want the ]ADAPTER_DESC([adapter]).) + AC_DEFINE([BUILD_]ADAPTER_SYM([adapterTuple]), [0], + [0 if you do not want the ]ADAPTER_DESC([adapterTuple]).) ]) ], [ - AS_IF([test "x$ADAPTER_VAR([adapter])" = "xyes"], [ - AC_MSG_ERROR([$3 is required for [adapter] "ADAPTER_DESC([adapter])".]) + AS_IF([test "x$ADAPTER_VAR([adapterTuple])" = "xyes"], [ + AC_MSG_ERROR([$3 is required for [adapterTuple] "ADAPTER_DESC([adapterTuple])".]) ]) - ADAPTER_VAR([adapter])=no - AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [0], [0 if you do not want the ]ADAPTER_DESC([adapter]).) + ADAPTER_VAR([adapterTuple])=no + AC_DEFINE([BUILD_]ADAPTER_SYM([adapterTuple]), [0], [0 if you do not want the ]ADAPTER_DESC([adapterTuple]).) ]) - AM_CONDITIONAL(ADAPTER_SYM([adapter]), [test "x$ADAPTER_VAR([adapter])" != "xno"]) + AM_CONDITIONAL(ADAPTER_SYM([adapterTuple]), [test "x$ADAPTER_VAR([adapterTuple])" != "xno"]) ]) ]) @@ -839,7 +839,7 @@ echo echo echo OpenOCD configuration summary echo --------------------------------------------------- -m4_foreach([adapter], [USB1_ADAPTERS, +m4_foreach([adapterTuple], [USB1_ADAPTERS, HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS, LIBFTDI_USB1_ADAPTERS, LIBGPIOD_ADAPTERS, @@ -857,8 +857,8 @@ m4_foreach([adapter], [USB1_ADAPTERS, DUMMY_ADAPTER, OPTIONAL_LIBRARIES, COVERAGE], - [s=m4_format(["%-49s"], ADAPTER_DESC([adapter])) - AS_CASE([$ADAPTER_VAR([adapter])], + [s=m4_format(["%-49s"], ADAPTER_DESC([adapterTuple])) + AS_CASE([$ADAPTER_VAR([adapterTuple])], [auto], [ echo "$s"yes '(auto)' ], @@ -870,8 +870,8 @@ m4_foreach([adapter], [USB1_ADAPTERS, ], [ AC_MSG_ERROR(m4_normalize([ - Error in [adapter] "ADAPTER_ARG([adapter])": Variable "ADAPTER_VAR([adapter])" - has invalid value "$ADAPTER_VAR([adapter])".])) + Error in [adapterTuple] "ADAPTER_ARG([adapterTuple])": Variable "ADAPTER_VAR([adapterTuple])" + has invalid value "$ADAPTER_VAR([adapterTuple])".])) ]) ]) echo commit 13b74c3fc7718d3ac639d6c382b2a4e3ec70a6d1 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 21 12:11:24 2025 +0200 helper: types: fix proper return type in example of ARRAY_SIZE() The example in the comment above the declaration of the macro ARRAY_SIZE() assigns the value to a variable of type 'unsigned' that is not allowed by the coding style (should be 'unsigned int') and is not correct since the macro uses 'sizeof()' and the type returned is 'size_t'. Fix the comment. Change-Id: I18c32b5328a229ab74b56dafab46a064ce5d23c5 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8970 Reviewed-by: zapb <de...@za...> Tested-by: jenkins diff --git a/src/helper/types.h b/src/helper/types.h index 53249e5b7..b3edd2118 100644 --- a/src/helper/types.h +++ b/src/helper/types.h @@ -51,7 +51,7 @@ * Compute the number of elements of a variable length array. * <code> * const char *strs[] = { "a", "b", "c" }; - * unsigned num_strs = ARRAY_SIZE(strs); + * size_t num_strs = ARRAY_SIZE(strs); * </code> */ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) ----------------------------------------------------------------------- Summary of changes: configure.ac | 44 ++++++++++++++++++++++---------------------- src/helper/types.h | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:39: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 6631419beba62893075eae5e1e13ddba9062d4f5 (commit) from 8194fc48bd3f06071a9068e385a122499447340a (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 6631419beba62893075eae5e1e13ddba9062d4f5 Author: Henrik Brix Andersen <he...@ve...> Date: Wed Dec 11 09:34:57 2024 +0100 jtag: drivers: xlnx-pcie-xvc: use correct TMS polarity during pathmove The xlnx_pcie_xvc_execute_pathmove() function checks whether TMS should be high or low for transitioning from the current state to the next state, but then calls xlnx_pcie_xvc_transact() with the opposite level, leading to invalid state transitions. Fix the polarity of TMS in the calls to xlnx_pcie_xvc_transact() to match the required TMS level. Change-Id: I2383e41fb70063e26aa69fabcf728df597607934 Signed-off-by: Henrik Brix Andersen <he...@ve...> Reviewed-on: https://review.openocd.org/c/openocd/+/8613 Reviewed-by: Moritz Fischer <mo...@go...> Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> Reviewed-by: Nicolas Derumigny <nic...@in...> diff --git a/src/jtag/drivers/xlnx-pcie-xvc.c b/src/jtag/drivers/xlnx-pcie-xvc.c index 3baa183d9..5208e2b87 100644 --- a/src/jtag/drivers/xlnx-pcie-xvc.c +++ b/src/jtag/drivers/xlnx-pcie-xvc.c @@ -210,9 +210,9 @@ static int xlnx_pcie_xvc_execute_pathmove(struct jtag_command *cmd) for (unsigned int i = 0; i < num_states; i++) { if (path[i] == tap_state_transition(tap_get_state(), false)) { - err = xlnx_pcie_xvc_transact(1, 1, 0, NULL); - } else if (path[i] == tap_state_transition(tap_get_state(), true)) { err = xlnx_pcie_xvc_transact(1, 0, 0, NULL); + } else if (path[i] == tap_state_transition(tap_get_state(), true)) { + err = xlnx_pcie_xvc_transact(1, 1, 0, NULL); } else { LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition.", tap_state_name(tap_get_state()), ----------------------------------------------------------------------- Summary of changes: src/jtag/drivers/xlnx-pcie-xvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:36:24
|
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 8194fc48bd3f06071a9068e385a122499447340a (commit) via c6f18633522e8cbc80e2abb5cf5e87da13440b92 (commit) via 56c24b9eb22c690f62fc173fe2fbd649070ae3d6 (commit) via 7fa8a5c257dcf3dbf072103f69959448e57dfa2c (commit) from d008a02a74cb4edf18d99b0a6d7d1a698ccc4890 (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 8194fc48bd3f06071a9068e385a122499447340a Author: Marc Schink <de...@za...> Date: Fri Jun 20 11:18:03 2025 +0200 tcl/board: Add config for TMS570LS12x development kit Tested on the corresponding hardware. Change-Id: Ic98141c450bb981cc7853c93b38195c7930bc7d3 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8969 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/board/ti/launchxl2-tms57012.cfg b/tcl/board/ti/launchxl2-tms57012.cfg new file mode 100644 index 000000000..99cb26e20 --- /dev/null +++ b/tcl/board/ti/launchxl2-tms57012.cfg @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# Hercules TMS570LS12x LaunchPad Development Kit +# https://www.ti.com/tool/LAUNCHXL2-TMS57012 + +source [find interface/xds110.cfg] + +transport select jtag + +source [find target/ti_tms570ls1x.cfg] commit c6f18633522e8cbc80e2abb5cf5e87da13440b92 Author: Marc Schink <de...@za...> Date: Fri Jun 20 10:47:23 2025 +0200 target/armv4: Use command_print() instead of LOG_ERROR() Use command_print() in order to provide an error message to the caller. Change-Id: I9f1a2ef07a102e1d6e755f3680bed0f7183b5c9c Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8968 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index 22cdba8ce..d90761569 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -842,7 +842,7 @@ COMMAND_HANDLER(handle_armv4_5_reg_command) } if (!is_arm_mode(arm->core_mode)) { - LOG_ERROR("not a valid arm core mode - communication failure?"); + command_print(CMD, "not a valid arm core mode - communication failure?"); return ERROR_FAIL; } @@ -954,7 +954,7 @@ COMMAND_HANDLER(handle_arm_disassemble_command) struct target *target = get_current_target(CMD_CTX); if (!target) { - LOG_ERROR("No target selected"); + command_print(CMD, "No target selected"); return ERROR_FAIL; } commit 56c24b9eb22c690f62fc173fe2fbd649070ae3d6 Author: Marc Schink <de...@za...> Date: Fri Jun 20 10:44:21 2025 +0200 target/armv4: Use LOG_TARGET_xxx() Use LOG_TARGET_xxx() for log messages as it is used for other targets. While at it, rework the log messages. For example by removing spaces or punctuation marks at the end of the message. Change-Id: I295001876d40527ec8f35c2aec8d562a29e57b26 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8967 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index 597dc8990..22cdba8ce 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -437,7 +437,7 @@ const int armv4_5_core_reg_map[9][17] = { static const char *arm_core_state_string(struct arm *arm) { if (arm->core_state > ARRAY_SIZE(arm_state_strings)) { - LOG_ERROR("core_state exceeds table size"); + LOG_TARGET_ERROR(arm->target, "core_state exceeds table size"); return "Unknown"; } @@ -483,20 +483,20 @@ void arm_set_cpsr(struct arm *arm, uint32_t cpsr) if (cpsr & (1 << 5)) { /* T */ if (cpsr & (1 << 24)) { /* J */ - LOG_WARNING("ThumbEE -- incomplete support"); + LOG_TARGET_WARNING(arm->target, "ThumbEE -- incomplete support"); state = ARM_STATE_THUMB_EE; } else state = ARM_STATE_THUMB; } else { if (cpsr & (1 << 24)) { /* J */ - LOG_ERROR("Jazelle state handling is BROKEN!"); + LOG_TARGET_ERROR(arm->target, "Jazelle state handling is broken"); state = ARM_STATE_JAZELLE; } else state = ARM_STATE_ARM; } arm->core_state = state; - LOG_DEBUG("set CPSR %#8.8" PRIx32 ": %s mode, %s state", cpsr, + LOG_TARGET_DEBUG(arm->target, "set CPSR %#8.8" PRIx32 ": %s mode, %s state", cpsr, arm_mode_name(mode), arm_core_state_string(arm)); } @@ -521,7 +521,7 @@ struct reg *arm_reg_current(struct arm *arm, unsigned int regnum) return NULL; if (!arm->map) { - LOG_ERROR("Register map is not available yet, the target is not fully initialised"); + LOG_TARGET_ERROR(arm->target, "Register map is not available yet, the target is not fully initialised"); r = arm->core_cache->reg_list + regnum; } else r = arm->core_cache->reg_list + arm->map[regnum]; @@ -530,7 +530,7 @@ struct reg *arm_reg_current(struct arm *arm, unsigned int regnum) * that doesn't support it... */ if (!r) { - LOG_ERROR("Invalid CPSR mode"); + LOG_TARGET_ERROR(arm->target, "Invalid CPSR mode"); r = arm->core_cache->reg_list + regnum; } @@ -631,7 +631,7 @@ static int armv4_5_set_core_reg(struct reg *reg, uint8_t *buf) */ if (armv4_5_target->core_mode != (enum arm_mode)(value & 0x1f)) { - LOG_DEBUG("changing ARM core mode to '%s'", + LOG_TARGET_DEBUG(target, "changing ARM core mode to '%s'", arm_mode_name(value & 0x1f)); value &= ~((1 << 24) | (1 << 5)); uint8_t t[4]; @@ -798,7 +798,7 @@ int arm_arch_state(struct target *target) struct arm *arm = target_to_arm(target); if (arm->common_magic != ARM_COMMON_MAGIC) { - LOG_ERROR("BUG: called for a non-ARM target"); + LOG_TARGET_ERROR(target, "BUG: called for a non-ARM target"); return ERROR_FAIL; } @@ -806,7 +806,7 @@ int arm_arch_state(struct target *target) if (target->semihosting && target->semihosting->hit_fileio) return ERROR_OK; - LOG_USER("target halted in %s state due to %s, current mode: %s\n" + LOG_TARGET_USER(target, "target halted in %s state due to %s, current mode: %s\n" "cpsr: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32 "%s%s", arm_core_state_string(arm), debug_reason_name(target), @@ -1291,7 +1291,7 @@ int arm_get_gdb_reg_list(struct target *target, unsigned int i; if (!is_arm_mode(arm->core_mode)) { - LOG_ERROR("not a valid arm core mode - communication failure?"); + LOG_TARGET_ERROR(target, "not a valid arm core mode - communication failure?"); return ERROR_FAIL; } @@ -1362,7 +1362,7 @@ int arm_get_gdb_reg_list(struct target *target, return ERROR_OK; default: - LOG_ERROR("not a valid register class type in query."); + LOG_TARGET_ERROR(target, "not a valid register class type in query"); return ERROR_FAIL; } } @@ -1391,8 +1391,7 @@ static int armv4_5_run_algorithm_completion(struct target *target, /* fast exit: ARMv5+ code can use BKPT */ if (exit_point && buf_get_u32(arm->pc->value, 0, 32) != exit_point) { - LOG_WARNING( - "target reentered debug state, but not at the desired exit point: 0x%4.4" PRIx32 "", + LOG_TARGET_ERROR(target, "reentered debug state, but not at the desired exit point: 0x%4.4" PRIx32, buf_get_u32(arm->pc->value, 0, 32)); return ERROR_TARGET_TIMEOUT; } @@ -1417,10 +1416,10 @@ int armv4_5_run_algorithm_inner(struct target *target, int i; int retval = ERROR_OK; - LOG_DEBUG("Running algorithm"); + LOG_TARGET_DEBUG(target, "Running algorithm"); if (arm_algorithm_info->common_magic != ARM_COMMON_MAGIC) { - LOG_ERROR("current target isn't an ARMV4/5 target"); + LOG_TARGET_ERROR(target, "current target isn't an ARMV4/5 target"); return ERROR_TARGET_INVALID; } @@ -1430,13 +1429,13 @@ int armv4_5_run_algorithm_inner(struct target *target, } if (!is_arm_mode(arm->core_mode)) { - LOG_ERROR("not a valid arm core mode - communication failure?"); + LOG_TARGET_ERROR(target, "not a valid arm core mode - communication failure?"); return ERROR_FAIL; } /* armv5 and later can terminate with BKPT instruction; less overhead */ if (!exit_point && arm->arch == ARM_ARCH_V4) { - LOG_ERROR("ARMv4 target needs HW breakpoint location"); + LOG_TARGET_ERROR(target, "ARMv4 target needs HW breakpoint location"); return ERROR_FAIL; } @@ -1470,12 +1469,12 @@ int armv4_5_run_algorithm_inner(struct target *target, struct reg *reg = register_get_by_name(arm->core_cache, reg_params[i].reg_name, false); if (!reg) { - LOG_ERROR("BUG: register '%s' not found", reg_params[i].reg_name); + LOG_TARGET_ERROR(target, "BUG: register '%s' not found", reg_params[i].reg_name); return ERROR_COMMAND_SYNTAX_ERROR; } if (reg->size != reg_params[i].size) { - LOG_ERROR("BUG: register '%s' size doesn't match reg_params[i].size", + LOG_TARGET_ERROR(target, "BUG: register '%s' size doesn't match reg_params[i].size", reg_params[i].reg_name); return ERROR_COMMAND_SYNTAX_ERROR; } @@ -1491,12 +1490,12 @@ int armv4_5_run_algorithm_inner(struct target *target, else if (arm->core_state == ARM_STATE_THUMB) exit_breakpoint_size = 2; else { - LOG_ERROR("BUG: can't execute algorithms when not in ARM or Thumb state"); + LOG_TARGET_ERROR(target, "BUG: can't execute algorithms when not in ARM or Thumb state"); return ERROR_COMMAND_SYNTAX_ERROR; } if (arm_algorithm_info->core_mode != ARM_MODE_ANY) { - LOG_DEBUG("setting core_mode: 0x%2.2x", + LOG_TARGET_DEBUG(target, "setting core_mode: 0x%2.2x", arm_algorithm_info->core_mode); buf_set_u32(arm->cpsr->value, 0, 5, arm_algorithm_info->core_mode); @@ -1509,7 +1508,7 @@ int armv4_5_run_algorithm_inner(struct target *target, retval = breakpoint_add(target, exit_point, exit_breakpoint_size, BKPT_HARD); if (retval != ERROR_OK) { - LOG_ERROR("can't add HW breakpoint to terminate algorithm"); + LOG_TARGET_ERROR(target, "can't add HW breakpoint to terminate algorithm"); return ERROR_TARGET_FAILURE; } } @@ -1542,13 +1541,13 @@ int armv4_5_run_algorithm_inner(struct target *target, reg_params[i].reg_name, false); if (!reg) { - LOG_ERROR("BUG: register '%s' not found", reg_params[i].reg_name); + LOG_TARGET_ERROR(target, "BUG: register '%s' not found", reg_params[i].reg_name); retval = ERROR_COMMAND_SYNTAX_ERROR; continue; } if (reg->size != reg_params[i].size) { - LOG_ERROR( + LOG_TARGET_ERROR(target, "BUG: register '%s' size doesn't match reg_params[i].size", reg_params[i].reg_name); retval = ERROR_COMMAND_SYNTAX_ERROR; @@ -1667,7 +1666,7 @@ int arm_checksum_memory(struct target *target, if (retval == ERROR_OK) *checksum = buf_get_u32(reg_params[0].value, 0, 32); else - LOG_ERROR("error executing ARM crc algorithm"); + LOG_TARGET_ERROR(target, "error executing ARM CRC algorithm"); destroy_reg_param(®_params[0]); destroy_reg_param(®_params[1]); @@ -1702,7 +1701,7 @@ int arm_blank_check_memory(struct target *target, assert(sizeof(check_code_le) % 4 == 0); if (erased_value != 0xff) { - LOG_ERROR("Erase value 0x%02" PRIx8 " not yet supported for ARMv4/v5 targets", + LOG_TARGET_ERROR(target, "Erase value 0x%02" PRIx8 " not yet supported for ARMv4/v5 targets", erased_value); return ERROR_FAIL; } @@ -1781,7 +1780,7 @@ static int arm_default_mrc(struct target *target, int cpnum, uint32_t crn, uint32_t crm, uint32_t *value) { - LOG_ERROR("%s doesn't implement MRC", target_type_name(target)); + LOG_TARGET_ERROR(target, "%s doesn't implement MRC", target_type_name(target)); return ERROR_FAIL; } @@ -1789,7 +1788,7 @@ static int arm_default_mrrc(struct target *target, int cpnum, uint32_t op, uint32_t crm, uint64_t *value) { - LOG_ERROR("%s doesn't implement MRRC", target_type_name(target)); + LOG_TARGET_ERROR(target, "%s doesn't implement MRRC", target_type_name(target)); return ERROR_FAIL; } @@ -1798,7 +1797,7 @@ static int arm_default_mcr(struct target *target, int cpnum, uint32_t crn, uint32_t crm, uint32_t value) { - LOG_ERROR("%s doesn't implement MCR", target_type_name(target)); + LOG_TARGET_ERROR(target, "%s doesn't implement MCR", target_type_name(target)); return ERROR_FAIL; } @@ -1806,7 +1805,7 @@ static int arm_default_mcrr(struct target *target, int cpnum, uint32_t op, uint32_t crm, uint64_t value) { - LOG_ERROR("%s doesn't implement MCRR", target_type_name(target)); + LOG_TARGET_ERROR(target, "%s doesn't implement MCRR", target_type_name(target)); return ERROR_FAIL; } commit 7fa8a5c257dcf3dbf072103f69959448e57dfa2c Author: Marc Schink <de...@za...> Date: Fri Jun 20 10:30:03 2025 +0200 target/armv7a: Use LOG_TARGET_xxx() Use LOG_TARGET_xxx() to indicate which target the message belongs to. Change-Id: Ic40c61a779c1a1ebdc96ebc56b27541fff5e6205 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8966 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/target/armv7a.c b/src/target/armv7a.c index 651241b77..2bbafd420 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -68,9 +68,9 @@ static void armv7a_show_fault_registers(struct target *target) if (retval != ERROR_OK) goto done; - LOG_USER("Data fault registers DFSR: %8.8" PRIx32 + LOG_TARGET_USER(target, "Data fault registers DFSR: %8.8" PRIx32 ", DFAR: %8.8" PRIx32, dfsr, dfar); - LOG_USER("Instruction fault registers IFSR: %8.8" PRIx32 + LOG_TARGET_USER(target, "Instruction fault registers IFSR: %8.8" PRIx32 ", IFAR: %8.8" PRIx32, ifsr, ifar); done: @@ -134,7 +134,7 @@ int armv7a_read_ttbcr(struct target *target) if (retval != ERROR_OK) goto done; - LOG_DEBUG("ttbcr %" PRIx32, ttbcr); + LOG_TARGET_DEBUG(target, "ttbcr %" PRIx32, ttbcr); ttbcr_n = ttbcr & 0x7; armv7a->armv7a_mmu.ttbcr = ttbcr; @@ -169,7 +169,7 @@ int armv7a_read_ttbcr(struct target *target) armv7a->armv7a_mmu.ttbr_mask[0] = 7 << (32 - ttbcr_n); } - LOG_DEBUG("ttbr1 %s, ttbr0_mask %" PRIx32 " ttbr1_mask %" PRIx32, + LOG_TARGET_DEBUG(target, "ttbr1 %s, ttbr0_mask %" PRIx32 " ttbr1_mask %" PRIx32, (ttbcr_n != 0) ? "used" : "not used", armv7a->armv7a_mmu.ttbr_mask[0], armv7a->armv7a_mmu.ttbr_mask[1]); @@ -248,14 +248,13 @@ static int armv7a_read_mpidr(struct target *target) /* Is register in Multiprocessing Extensions register format? */ if (mpidr & MPIDR_MP_EXT) { - LOG_DEBUG("%s: MPIDR 0x%" PRIx32, target_name(target), mpidr); + LOG_TARGET_DEBUG(target, "%s: MPIDR 0x%" PRIx32, target_name(target), mpidr); armv7a->multi_processor_system = (mpidr >> 30) & 1; armv7a->multi_threading_processor = (mpidr >> 24) & 1; armv7a->level2_id = (mpidr >> 16) & 0xf; armv7a->cluster_id = (mpidr >> 8) & 0xf; armv7a->cpu_id = mpidr & 0xf; - LOG_INFO("%s: MPIDR level2 %x, cluster %x, core %x, %s, %s", - target_name(target), + LOG_TARGET_INFO(target, "MPIDR level2 %x, cluster %x, core %x, %s, %s", armv7a->level2_id, armv7a->cluster_id, armv7a->cpu_id, @@ -263,7 +262,7 @@ static int armv7a_read_mpidr(struct target *target) armv7a->multi_threading_processor == 1 ? "SMT" : "no SMT"); } else - LOG_DEBUG("MPIDR not in multiprocessor format"); + LOG_TARGET_DEBUG(target, "MPIDR not in multiprocessor format"); done: dpm->finish(dpm); @@ -338,7 +337,7 @@ int armv7a_identify_cache(struct target *target) cache->iminline = 4UL << (ctr & 0xf); cache->dminline = 4UL << ((ctr & 0xf0000) >> 16); - LOG_DEBUG("ctr %" PRIx32 " ctr.iminline %" PRIu32 " ctr.dminline %" PRIu32, + LOG_TARGET_DEBUG(target, "ctr %" PRIx32 " ctr.iminline %" PRIu32 " ctr.dminline %" PRIu32, ctr, cache->iminline, cache->dminline); /* retrieve CLIDR @@ -350,7 +349,7 @@ int armv7a_identify_cache(struct target *target) goto done; cache->loc = (clidr & 0x7000000) >> 24; - LOG_DEBUG("Number of cache levels to PoC %" PRId32, cache->loc); + LOG_TARGET_DEBUG(target, "Number of cache levels to PoC %" PRId32, cache->loc); /* retrieve selected cache for later restore * MRC p15, 2,<Rd>, c0, c0, 0; Read CSSELR */ @@ -378,13 +377,13 @@ int armv7a_identify_cache(struct target *target) goto done; cache->arch[cl].d_u_size = decode_cache_reg(cache_reg); - LOG_DEBUG("data/unified cache index %" PRIu32 " << %" PRIu32 ", way %" PRIu32 " << %" PRIu32, + LOG_TARGET_DEBUG(target, "data/unified cache index %" PRIu32 " << %" PRIu32 ", way %" PRIu32 " << %" PRIu32, cache->arch[cl].d_u_size.index, cache->arch[cl].d_u_size.index_shift, cache->arch[cl].d_u_size.way, cache->arch[cl].d_u_size.way_shift); - LOG_DEBUG("cacheline %" PRIu32 " bytes %" PRIu32 " KBytes asso %" PRIu32 " ways", + LOG_TARGET_DEBUG(target, "cacheline %" PRIu32 " bytes %" PRIu32 " KBytes asso %" PRIu32 " ways", cache->arch[cl].d_u_size.linelen, cache->arch[cl].d_u_size.cachesize, cache->arch[cl].d_u_size.associativity); @@ -398,13 +397,13 @@ int armv7a_identify_cache(struct target *target) goto done; cache->arch[cl].i_size = decode_cache_reg(cache_reg); - LOG_DEBUG("instruction cache index %" PRIu32 " << %" PRIu32 ", way %" PRIu32 " << %" PRIu32, + LOG_TARGET_DEBUG(target, "instruction cache index %" PRIu32 " << %" PRIu32 ", way %" PRIu32 " << %" PRIu32, cache->arch[cl].i_size.index, cache->arch[cl].i_size.index_shift, cache->arch[cl].i_size.way, cache->arch[cl].i_size.way_shift); - LOG_DEBUG("cacheline %" PRIu32 " bytes %" PRIu32 " KBytes asso %" PRIu32 " ways", + LOG_TARGET_DEBUG(target, "cacheline %" PRIu32 " bytes %" PRIu32 " KBytes asso %" PRIu32 " ways", cache->arch[cl].i_size.linelen, cache->arch[cl].i_size.cachesize, cache->arch[cl].i_size.associativity); @@ -445,7 +444,7 @@ static int armv7a_setup_semihosting(struct target *target, int enable) armv7a->debug_base + CPUDBG_VCR, &vcr); if (ret < 0) { - LOG_ERROR("Failed to read VCR register\n"); + LOG_TARGET_ERROR(target, "Failed to read VCR register"); return ret; } @@ -458,7 +457,7 @@ static int armv7a_setup_semihosting(struct target *target, int enable) armv7a->debug_base + CPUDBG_VCR, vcr); if (ret < 0) - LOG_ERROR("Failed to write VCR register\n"); + LOG_TARGET_ERROR(target, "Failed to write VCR register"); return ret; } @@ -489,18 +488,18 @@ int armv7a_arch_state(struct target *target) struct arm *arm = &armv7a->arm; if (armv7a->common_magic != ARMV7_COMMON_MAGIC) { - LOG_ERROR("BUG: called for a non-ARMv7A target"); + LOG_TARGET_ERROR(target, "BUG: called for a non-ARMv7A target"); return ERROR_COMMAND_SYNTAX_ERROR; } arm_arch_state(target); if (armv7a->is_armv7r) { - LOG_USER("D-Cache: %s, I-Cache: %s", + LOG_TARGET_USER(target, "D-Cache: %s, I-Cache: %s", state[armv7a->armv7a_mmu.armv7a_cache.d_u_cache_enabled], state[armv7a->armv7a_mmu.armv7a_cache.i_cache_enabled]); } else { - LOG_USER("MMU: %s, D-Cache: %s, I-Cache: %s", + LOG_TARGET_USER(target, "MMU: %s, D-Cache: %s, I-Cache: %s", state[armv7a->armv7a_mmu.mmu_enabled], state[armv7a->armv7a_mmu.armv7a_cache.d_u_cache_enabled], state[armv7a->armv7a_mmu.armv7a_cache.i_cache_enabled]); ----------------------------------------------------------------------- Summary of changes: src/target/armv4_5.c | 63 ++++++++++++++++++------------------- src/target/armv7a.c | 37 +++++++++++----------- tcl/board/ti/launchxl2-tms57012.cfg | 10 ++++++ 3 files changed, 59 insertions(+), 51 deletions(-) create mode 100644 tcl/board/ti/launchxl2-tms57012.cfg hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:36: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 d008a02a74cb4edf18d99b0a6d7d1a698ccc4890 (commit) via 4d56d580ce9e2f10e8659bd0d0c4e1b333efa45c (commit) from 46aa9c0e526f39c61b2c08ac1d21c998ad34259e (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 d008a02a74cb4edf18d99b0a6d7d1a698ccc4890 Author: Marc Schink <de...@za...> Date: Fri Jun 20 10:53:09 2025 +0200 target/armv7a: Hide multiprocessing support message Print a debug message about missing multiprocessing support rather than an error message. Change-Id: Ia1581f7284747d8a92096d6f5515f891c8069f71 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8965 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/armv7a.c b/src/target/armv7a.c index 4d353dec6..651241b77 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -263,7 +263,7 @@ static int armv7a_read_mpidr(struct target *target) armv7a->multi_threading_processor == 1 ? "SMT" : "no SMT"); } else - LOG_ERROR("MPIDR not in multiprocessor format"); + LOG_DEBUG("MPIDR not in multiprocessor format"); done: dpm->finish(dpm); commit 4d56d580ce9e2f10e8659bd0d0c4e1b333efa45c Author: Marc Schink <de...@za...> Date: Fri Jun 20 10:17:12 2025 +0200 target/arm_dpm: Use LOG_TARGET_xxx() Use LOG_TARGET_xxx() to indicate which target the message belongs to. While at it, rework the log messages. For example, using correct format specifiers. Change-Id: I05031e0ae25fe9e7bc38dfb781b6623a967fd533 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8964 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/arm_dpm.c b/src/target/arm_dpm.c index 0b2db77c5..8ab464d0a 100644 --- a/src/target/arm_dpm.c +++ b/src/target/arm_dpm.c @@ -50,9 +50,8 @@ static int dpm_mrc(struct target *target, int cpnum, if (retval != ERROR_OK) return retval; - LOG_DEBUG("MRC p%d, %d, r0, c%d, c%d, %d", cpnum, - (int) op1, (int) crn, - (int) crm, (int) op2); + LOG_TARGET_DEBUG(target, "MRC p%d, %" PRId32 ", r0, c%" PRId32 ", c%" PRId32 ", %" PRId32, + cpnum, op1, crn, crm, op2); /* read coprocessor register into R0; return via DCC */ retval = dpm->instr_read_data_r0(dpm, @@ -74,8 +73,8 @@ static int dpm_mrrc(struct target *target, int cpnum, if (retval != ERROR_OK) return retval; - LOG_DEBUG("MRRC p%d, %d, r0, r1, c%d", cpnum, - (int)op, (int)crm); + LOG_TARGET_DEBUG(target, "MRRC p%d, %" PRId32 ", r0, r1, c%" PRId32, + cpnum, op, crm); /* read coprocessor register into R0, R1; return via DCC */ retval = dpm->instr_read_data_r0_r1(dpm, @@ -98,9 +97,8 @@ static int dpm_mcr(struct target *target, int cpnum, if (retval != ERROR_OK) return retval; - LOG_DEBUG("MCR p%d, %d, r0, c%d, c%d, %d", cpnum, - (int) op1, (int) crn, - (int) crm, (int) op2); + LOG_TARGET_DEBUG(target, "MCR p%d, %" PRId32 ", r0, c%" PRId32 ", c%" PRId32 ", %" PRId32, + cpnum, op1, crn, crm, op2); /* read DCC into r0; then write coprocessor register from R0 */ retval = dpm->instr_write_data_r0(dpm, @@ -122,8 +120,8 @@ static int dpm_mcrr(struct target *target, int cpnum, if (retval != ERROR_OK) return retval; - LOG_DEBUG("MCRR p%d, %d, r0, r1, c%d", cpnum, - (int)op, (int)crm); + LOG_TARGET_DEBUG(target, "MCRR p%d, %" PRId32 ", r0, r1, c%" PRId32, + cpnum, op, crm); /* read DCC into r0, r1; then write coprocessor register from R0, R1 */ retval = dpm->instr_write_data_r0_r1(dpm, @@ -198,7 +196,8 @@ static int dpm_read_reg_u64(struct arm_dpm *dpm, struct reg *r, unsigned int reg buf_set_u32(r->value + 4, 0, 32, value_r1); r->valid = true; r->dirty = false; - LOG_DEBUG("READ: %s, %8.8" PRIx32 ", %8.8" PRIx32, r->name, value_r0, value_r1); + LOG_TARGET_DEBUG(dpm->arm->target, "READ: %s, %8.8" PRIx32 ", %8.8" PRIx32, + r->name, value_r0, value_r1); } return retval; @@ -237,10 +236,10 @@ int arm_dpm_read_reg(struct arm_dpm *dpm, struct reg *r, unsigned int regnum) break; case ARM_STATE_JAZELLE: /* core-specific ... ? */ - LOG_WARNING("Jazelle PC adjustment unknown"); + LOG_TARGET_WARNING(dpm->arm->target, "Jazelle PC adjustment unknown"); break; default: - LOG_WARNING("unknown core state"); + LOG_TARGET_WARNING(dpm->arm->target, "unknown core state"); break; } break; @@ -265,7 +264,8 @@ int arm_dpm_read_reg(struct arm_dpm *dpm, struct reg *r, unsigned int regnum) buf_set_u32(r->value, 0, 32, value); r->valid = true; r->dirty = false; - LOG_DEBUG("READ: %s, %8.8" PRIx32, r->name, value); + LOG_TARGET_DEBUG(dpm->arm->target, "READ: %s, %8.8" PRIx32, r->name, + value); } return retval; @@ -301,7 +301,8 @@ static int dpm_write_reg_u64(struct arm_dpm *dpm, struct reg *r, unsigned int re if (retval == ERROR_OK) { r->dirty = false; - LOG_DEBUG("WRITE: %s, %8.8" PRIx32 ", %8.8" PRIx32, r->name, value_r0, value_r1); + LOG_TARGET_DEBUG(dpm->arm->target, "WRITE: %s, %8.8" PRIx32 ", %8.8" PRIx32, + r->name, value_r0, value_r1); } return retval; @@ -349,7 +350,8 @@ static int dpm_write_reg(struct arm_dpm *dpm, struct reg *r, unsigned int regnum if (retval == ERROR_OK) { r->dirty = false; - LOG_DEBUG("WRITE: %s, %8.8" PRIx32, r->name, value); + LOG_TARGET_DEBUG(dpm->arm->target, "WRITE: %s, %8.8" PRIx32, r->name, + value); } return retval; @@ -463,9 +465,8 @@ static int dpm_maybe_update_bpwp(struct arm_dpm *dpm, bool bpwp, xp->address, xp->control); if (retval != ERROR_OK) - LOG_ERROR("%s: can't %s HW %spoint %d", + LOG_TARGET_ERROR(dpm->arm->target, "can't %s HW %spoint %d", disable ? "disable" : "enable", - target_name(dpm->arm->target), (xp->number < 16) ? "break" : "watch", xp->number & 0xf); done: @@ -670,7 +671,7 @@ static enum arm_mode dpm_mapmode(struct arm *arm, case ARM_VFP_V3_D0 ... ARM_VFP_V3_FPSCR: return mode; default: - LOG_WARNING("invalid register #%u", num); + LOG_TARGET_WARNING(arm->target, "invalid register #%u", num); break; } return ARM_MODE_ANY; @@ -885,7 +886,7 @@ static int dpm_bpwp_setup(struct arm_dpm *dpm, struct dpm_bpwp *xp, } /* FALL THROUGH */ default: - LOG_ERROR("unsupported {break,watch}point length/alignment"); + LOG_TARGET_ERROR(dpm->arm->target, "unsupported {break,watch}point length/alignment"); return ERROR_COMMAND_SYNTAX_ERROR; } @@ -899,7 +900,7 @@ static int dpm_bpwp_setup(struct arm_dpm *dpm, struct dpm_bpwp *xp, xp->control = control; xp->dirty = true; - LOG_DEBUG("BPWP: addr %8.8" PRIx32 ", control %" PRIx32 ", number %d", + LOG_TARGET_DEBUG(dpm->arm->target, "BPWP: addr %8.8" PRIx32 ", control %" PRIx32 ", number %d", xp->address, control, xp->number); /* hardware is updated in write_dirty_registers() */ @@ -919,7 +920,7 @@ static int dpm_add_breakpoint(struct target *target, struct breakpoint *bp) /* FIXME we need a generic solution for software breakpoints. */ if (bp->type == BKPT_SOFT) - LOG_DEBUG("using HW bkpt, not SW..."); + LOG_TARGET_DEBUG(dpm->arm->target, "using HW breakpoint instead of SW"); for (unsigned int i = 0; i < dpm->nbp; i++) { if (!dpm->dbp[i].bp) { @@ -963,7 +964,7 @@ static int dpm_watchpoint_setup(struct arm_dpm *dpm, unsigned int index_t, /* this hardware doesn't support data value matching or masking */ if (wp->mask != WATCHPOINT_IGNORE_DATA_VALUE_MASK) { - LOG_DEBUG("watchpoint values and masking not supported"); + LOG_TARGET_ERROR(dpm->arm->target, "watchpoint values and masking not supported"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } @@ -1143,8 +1144,8 @@ int arm_dpm_setup(struct arm_dpm *dpm) return ERROR_FAIL; } - LOG_INFO("%s: hardware has %d breakpoints, %d watchpoints", - target_name(target), dpm->nbp, dpm->nwp); + LOG_TARGET_INFO(target, "hardware has %d breakpoints, %d watchpoints", + dpm->nbp, dpm->nwp); /* REVISIT ... and some of those breakpoints could match * execution context IDs... @@ -1172,8 +1173,7 @@ int arm_dpm_initialize(struct arm_dpm *dpm) (void) dpm->bpwp_disable(dpm, 16 + i); } } else - LOG_WARNING("%s: can't disable breakpoints and watchpoints", - target_name(dpm->arm->target)); + LOG_TARGET_WARNING(dpm->arm->target, "can't disable breakpoints and watchpoints"); return ERROR_OK; } ----------------------------------------------------------------------- Summary of changes: src/target/arm_dpm.c | 54 ++++++++++++++++++++++++++-------------------------- src/target/armv7a.c | 2 +- 2 files changed, 28 insertions(+), 28 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:34: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 46aa9c0e526f39c61b2c08ac1d21c998ad34259e (commit) from 9b660bbd1957ffc1fd86485ceef5200f8968aeb6 (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 46aa9c0e526f39c61b2c08ac1d21c998ad34259e Author: Jan Matyas <jan...@co...> Date: Tue Jun 17 13:17:23 2025 +0200 openocd.c: 'init' should fail if GDB service cannot be created If it is not possible to create a GDB service for a certain target (for example the given TCP port is already occupied), the "init" command should fail, but it currently does not. Fix this by checking the return code of gdb_target_add_all(). Steps to reproduce: 1) Make the port 3333/tcp occupied. For example by: nc -l 3333 2) In another terminal, launch OpenOCD. Use the gdb_port 3333 (which is the default). For example: path/to/your/openocd \ -c "adapter driver ..." \ -c "jtag newtap ..." -c "target create ..." 3) Observe the outcome: Before this patch: Error "couldn't bind gdb to socket on port 3333: Address already in use" is displayed but OpenOCD keeps running. After this patch: The error message is displayed and OpenOCD exits - as expected. Change-Id: I63c283a9a1095167b78e69e9ee879c378a6b9f2a Signed-off-by: Jan Matyas <jan...@co...> Reviewed-on: https://review.openocd.org/c/openocd/+/8957 Tested-by: jenkins Reviewed-by: zapb <de...@za...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/openocd.c b/src/openocd.c index 3fbece395..e63a9661a 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -170,7 +170,8 @@ COMMAND_HANDLER(handle_init_command) jtag_poll_unmask(save_poll_mask); /* initialize telnet subsystem */ - gdb_target_add_all(all_targets); + if (gdb_target_add_all(all_targets) != ERROR_OK) + return ERROR_FAIL; target_register_event_callback(log_target_callback_event_handler, CMD_CTX); ----------------------------------------------------------------------- Summary of changes: src/openocd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:33: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 9b660bbd1957ffc1fd86485ceef5200f8968aeb6 (commit) from df525290cb11ab40968253b7d4c5588b1aab7d82 (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 9b660bbd1957ffc1fd86485ceef5200f8968aeb6 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 15:07:50 2025 +0200 rtos: sort the rtos by alphabetic order Add comments to require the list of rtos to be kept sorted. Change-Id: Iecf9250a14f6593d0a24a9f9b8930c0ec8d74bd2 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8953 Tested-by: jenkins diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 216129b97..2ccccf1b0 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -17,20 +17,22 @@ #include "server/gdb_server.h" static const struct rtos_type *rtos_types[] = { - &threadx_rtos, - &freertos_rtos, - &ecos_rtos, - &linux_rtos, + // Keep in alphabetic order this list of rtos, except hwthread &chibios_rtos, &chromium_ec_rtos, + &ecos_rtos, &embkernel_rtos, + &freertos_rtos, + &linux_rtos, &mqx_rtos, - &ucos_iii_rtos, &nuttx_rtos, &riot_rtos, - &zephyr_rtos, &rtkernel_rtos, - /* keep this as last, as it always matches with rtos auto */ + &threadx_rtos, + &ucos_iii_rtos, + &zephyr_rtos, + + // keep this as last, as it always matches with rtos auto &hwthread_rtos, }; diff --git a/src/rtos/rtos.h b/src/rtos/rtos.h index 05beab145..dbaa7e8ce 100644 --- a/src/rtos/rtos.h +++ b/src/rtos/rtos.h @@ -136,6 +136,7 @@ int rtos_read_buffer(struct target *target, target_addr_t address, int rtos_write_buffer(struct target *target, target_addr_t address, uint32_t size, const uint8_t *buffer); +// Keep in alphabetic order this list of rtos extern const struct rtos_type chibios_rtos; extern const struct rtos_type chromium_ec_rtos; extern const struct rtos_type ecos_rtos; ----------------------------------------------------------------------- Summary of changes: src/rtos/rtos.c | 16 +++++++++------- src/rtos/rtos.h | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:32: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 df525290cb11ab40968253b7d4c5588b1aab7d82 (commit) via cd749419caae4f083daa2e0717fb2c6747ba033a (commit) via c92cf66c6714ebf367d1ccb1ba59010491924063 (commit) via 5d192a9f70a706f8639721a636156547875e9fa8 (commit) via 6ab6d3475fb3758b60ad670b1b0d2cf3b2d10768 (commit) via fa0fa25764b4737b42fbceab9f56a467263e12b0 (commit) from a64ae963be55a3a7e12d8f7a91c9787bf4047778 (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 df525290cb11ab40968253b7d4c5588b1aab7d82 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 15:02:04 2025 +0200 target: use array size to constraint the loop Instead of using NULL terminated arrays to determine the last element of the array, use the size of the array. Change-Id: I3cdc0f6aef8a5110073aeef333c439e61fc54032 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8952 Tested-by: jenkins Reviewed-by: Brandon Martin diff --git a/src/target/target.c b/src/target/target.c index 8bf654a27..995adbc9d 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -110,7 +110,6 @@ static struct target_type *target_types[] = { &testee_target, &xscale_target, &xtensa_chip_target, - NULL, }; struct target *all_targets; @@ -5708,7 +5707,6 @@ static const struct command_registration target_instance_command_handlers[] = { COMMAND_HANDLER(handle_target_create) { int retval = ERROR_OK; - int x; if (CMD_ARGC < 2) return ERROR_COMMAND_SYNTAX_ERROR; @@ -5732,15 +5730,16 @@ COMMAND_HANDLER(handle_target_create) LOG_INFO("The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD"); } /* now does target type exist */ - for (x = 0 ; target_types[x] ; x++) { + size_t x; + for (x = 0 ; x < ARRAY_SIZE(target_types) ; x++) { if (strcmp(cp, target_types[x]->name) == 0) { /* found */ break; } } - if (!target_types[x]) { + if (x == ARRAY_SIZE(target_types)) { char *all = NULL; - for (x = 0 ; target_types[x] ; x++) { + for (x = 0 ; x < ARRAY_SIZE(target_types) ; x++) { char *prev = all; if (all) all = alloc_printf("%s, %s", all, target_types[x]->name); @@ -5942,7 +5941,7 @@ COMMAND_HANDLER(handle_target_types) if (CMD_ARGC != 0) return ERROR_COMMAND_SYNTAX_ERROR; - for (unsigned int x = 0; target_types[x]; x++) + for (size_t x = 0; x < ARRAY_SIZE(target_types); x++) command_print(CMD, "%s", target_types[x]->name); return ERROR_OK; commit cd749419caae4f083daa2e0717fb2c6747ba033a Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 14:51:43 2025 +0200 target: sort the targets by alphabetic order Add comments to require the list of targets to be kept sorted. Change-Id: Ie3d7e3f5d55a9f9214dc179c5c986b6682f59412 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8951 Tested-by: jenkins diff --git a/src/target/target.c b/src/target/target.c index fd0e0116b..8bf654a27 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -71,44 +71,45 @@ static int target_gdb_fileio_end_default(struct target *target, int retcode, int fileio_errno, bool ctrl_c); static struct target_type *target_types[] = { + // Keep in alphabetic order this list of targets + &aarch64_target, + &arcv2_target, + &arm11_target, + &arm720t_target, &arm7tdmi_target, - &arm9tdmi_target, &arm920t_target, - &arm720t_target, - &arm966e_target, - &arm946e_target, &arm926ejs_target, - &fa526_target, - &feroceon_target, - &dragonite_target, - &xscale_target, - &xtensa_chip_target, - &cortexm_target, + &arm946e_target, + &arm966e_target, + &arm9tdmi_target, + &armv8r_target, + &avr32_ap7k_target, + &avr_target, &cortexa_target, + &cortexm_target, &cortexr4_target, - &arm11_target, - &ls1_sap_target, - &mips_m4k_target, - &avr_target, + &dragonite_target, &dsp563xx_target, &dsp5680xx_target, - &testee_target, - &avr32_ap7k_target, - &hla_target, - &esp32_target, + &esirisc_target, &esp32s2_target, &esp32s3_target, + &esp32_target, + &fa526_target, + &feroceon_target, + &hla_target, + &ls1_sap_target, + &mem_ap_target, + &mips_m4k_target, + &mips_mips64_target, &or1k_target, - &quark_x10xx_target, &quark_d20xx_target, - &stm8_target, + &quark_x10xx_target, &riscv_target, - &mem_ap_target, - &esirisc_target, - &arcv2_target, - &aarch64_target, - &armv8r_target, - &mips_mips64_target, + &stm8_target, + &testee_target, + &xscale_target, + &xtensa_chip_target, NULL, }; diff --git a/src/target/target_type.h b/src/target/target_type.h index 5b0dc5a6c..a146fab76 100644 --- a/src/target/target_type.h +++ b/src/target/target_type.h @@ -307,6 +307,7 @@ struct target_type { unsigned int (*data_bits)(struct target *target); }; +// Keep in alphabetic order this list of targets extern struct target_type aarch64_target; extern struct target_type arcv2_target; extern struct target_type arm11_target; commit c92cf66c6714ebf367d1ccb1ba59010491924063 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 14:39:37 2025 +0200 jtag: interfaces: sort the drivers by alphabetic order Add comments to require the list of drivers to be kept sorted. While there: - align the check on BUILD_PRESTO and BUILD_USB_BLASTER; - fix indentation of the closing parenthesis. Change-Id: Ic78281b1cdfb5bf72ea41427233e76516001b429 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8950 Tested-by: jenkins diff --git a/src/jtag/interface.h b/src/jtag/interface.h index 475dbed36..834997361 100644 --- a/src/jtag/interface.h +++ b/src/jtag/interface.h @@ -371,6 +371,7 @@ int adapter_config_trace(bool enabled, enum tpiu_pin_protocol pin_protocol, unsigned int traceclkin_freq, uint16_t *prescaler); int adapter_poll_trace(uint8_t *buf, size_t *size); +// Keep in alphabetic order this list of drivers extern struct adapter_driver am335xgpio_adapter_driver; extern struct adapter_driver amt_jtagaccel_adapter_driver; extern struct adapter_driver angie_adapter_driver; diff --git a/src/jtag/interfaces.c b/src/jtag/interfaces.c index e49bd9e0f..834247245 100644 --- a/src/jtag/interfaces.c +++ b/src/jtag/interfaces.c @@ -36,125 +36,128 @@ * drivers that were enabled by the @c configure script. */ struct adapter_driver *adapter_drivers[] = { -#if BUILD_PARPORT == 1 - &parport_adapter_driver, + // Keep in alphabetic order this list of drivers + +#if BUILD_AM335XGPIO == 1 + &am335xgpio_adapter_driver, #endif -#if BUILD_DUMMY == 1 - &dummy_adapter_driver, +#if BUILD_AMTJTAGACCEL == 1 + &amt_jtagaccel_adapter_driver, #endif -#if BUILD_FTDI == 1 - &ftdi_adapter_driver, +#if BUILD_ANGIE == 1 + &angie_adapter_driver, #endif -#if BUILD_USB_BLASTER || BUILD_USB_BLASTER_2 == 1 - &usb_blaster_adapter_driver, +#if BUILD_ARMJTAGEW == 1 + &armjtagew_adapter_driver, #endif -#if BUILD_ESP_USB_JTAG == 1 - &esp_usb_adapter_driver, +#if BUILD_AT91RM9200 == 1 + &at91rm9200_adapter_driver, #endif -#if BUILD_JTAG_VPI == 1 - &jtag_vpi_adapter_driver, +#if BUILD_BCM2835GPIO == 1 + &bcm2835gpio_adapter_driver, #endif -#if BUILD_VDEBUG == 1 - &vdebug_adapter_driver, +#if BUILD_BUS_PIRATE == 1 + &buspirate_adapter_driver, #endif -#if BUILD_JTAG_DPI == 1 - &jtag_dpi_adapter_driver, +#if BUILD_CMSIS_DAP_USB == 1 || BUILD_CMSIS_DAP_HID == 1 + &cmsis_dap_adapter_driver, #endif -#if BUILD_FT232R == 1 - &ft232r_adapter_driver, +#if BUILD_DMEM == 1 + &dmem_dap_adapter_driver, #endif -#if BUILD_AMTJTAGACCEL == 1 - &amt_jtagaccel_adapter_driver, +#if BUILD_DUMMY == 1 + &dummy_adapter_driver, #endif #if BUILD_EP93XX == 1 &ep93xx_adapter_driver, #endif -#if BUILD_AT91RM9200 == 1 - &at91rm9200_adapter_driver, +#if BUILD_ESP_USB_JTAG == 1 + &esp_usb_adapter_driver, +#endif +#if BUILD_FT232R == 1 + &ft232r_adapter_driver, +#endif +#if BUILD_FTDI == 1 + &ftdi_adapter_driver, #endif #if BUILD_GW16012 == 1 &gw16012_adapter_driver, #endif -#if BUILD_PRESTO - &presto_adapter_driver, -#endif -#if BUILD_USBPROG == 1 - &usbprog_adapter_driver, +#if BUILD_HLADAPTER == 1 + &hl_adapter_driver, #endif -#if BUILD_OPENJTAG == 1 - &openjtag_adapter_driver, +#if BUILD_IMX_GPIO == 1 + &imx_gpio_adapter_driver, #endif #if BUILD_JLINK == 1 &jlink_adapter_driver, #endif -#if BUILD_VSLLINK == 1 - &vsllink_adapter_driver, -#endif -#if BUILD_RLINK == 1 - &rlink_adapter_driver, +#if BUILD_JTAG_DPI == 1 + &jtag_dpi_adapter_driver, #endif -#if BUILD_ULINK == 1 - &ulink_adapter_driver, +#if BUILD_JTAG_VPI == 1 + &jtag_vpi_adapter_driver, #endif -#if BUILD_ANGIE == 1 - &angie_adapter_driver, +#if BUILD_KITPROG == 1 + &kitprog_adapter_driver, #endif -#if BUILD_ARMJTAGEW == 1 - &armjtagew_adapter_driver, +#if BUILD_LINUXGPIOD == 1 + &linuxgpiod_adapter_driver, #endif -#if BUILD_BUS_PIRATE == 1 - &buspirate_adapter_driver, +#if BUILD_LINUXSPIDEV == 1 + &linuxspidev_adapter_driver, #endif -#if BUILD_REMOTE_BITBANG == 1 - &remote_bitbang_adapter_driver, +#if BUILD_OPENDOUS == 1 + &opendous_adapter_driver, #endif -#if BUILD_HLADAPTER == 1 - &hl_adapter_driver, +#if BUILD_OPENJTAG == 1 + &openjtag_adapter_driver, #endif #if BUILD_OSBDM == 1 &osbdm_adapter_driver, #endif -#if BUILD_OPENDOUS == 1 - &opendous_adapter_driver, +#if BUILD_PARPORT == 1 + &parport_adapter_driver, #endif -#if BUILD_SYSFSGPIO == 1 - &sysfsgpio_adapter_driver, +#if BUILD_PRESTO == 1 + &presto_adapter_driver, #endif -#if BUILD_LINUXGPIOD == 1 - &linuxgpiod_adapter_driver, +#if BUILD_REMOTE_BITBANG == 1 + &remote_bitbang_adapter_driver, #endif -#if BUILD_LINUXSPIDEV == 1 - &linuxspidev_adapter_driver, +#if BUILD_RLINK == 1 + &rlink_adapter_driver, #endif -#if BUILD_XLNX_PCIE_XVC == 1 - &xlnx_pcie_xvc_adapter_driver, +#if BUILD_RSHIM == 1 + &rshim_dap_adapter_driver, #endif -#if BUILD_BCM2835GPIO == 1 - &bcm2835gpio_adapter_driver, +#if BUILD_HLADAPTER_STLINK == 1 + &stlink_dap_adapter_driver, #endif -#if BUILD_CMSIS_DAP_USB == 1 || BUILD_CMSIS_DAP_HID == 1 - &cmsis_dap_adapter_driver, +#if BUILD_SYSFSGPIO == 1 + &sysfsgpio_adapter_driver, #endif -#if BUILD_KITPROG == 1 - &kitprog_adapter_driver, +#if BUILD_ULINK == 1 + &ulink_adapter_driver, #endif -#if BUILD_IMX_GPIO == 1 - &imx_gpio_adapter_driver, +#if BUILD_USB_BLASTER == 1 || BUILD_USB_BLASTER_2 == 1 + &usb_blaster_adapter_driver, #endif -#if BUILD_XDS110 == 1 - &xds110_adapter_driver, +#if BUILD_USBPROG == 1 + &usbprog_adapter_driver, #endif -#if BUILD_HLADAPTER_STLINK == 1 - &stlink_dap_adapter_driver, +#if BUILD_VDEBUG == 1 + &vdebug_adapter_driver, #endif -#if BUILD_RSHIM == 1 - &rshim_dap_adapter_driver, +#if BUILD_VSLLINK == 1 + &vsllink_adapter_driver, #endif -#if BUILD_DMEM == 1 - &dmem_dap_adapter_driver, +#if BUILD_XDS110 == 1 + &xds110_adapter_driver, #endif -#if BUILD_AM335XGPIO == 1 - &am335xgpio_adapter_driver, +#if BUILD_XLNX_PCIE_XVC == 1 + &xlnx_pcie_xvc_adapter_driver, #endif + NULL, - }; +}; commit 5d192a9f70a706f8639721a636156547875e9fa8 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 13:58:38 2025 +0200 flash: nand: use array size to constraint the loop Instead of using NULL terminated arrays to determine the last element of the array, use the size of the array. Change-Id: I532a51a223061348e57bae3bd66ee6b346c1b070 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8949 Tested-by: jenkins Reviewed-by: Brandon Martin diff --git a/src/flash/nand/driver.c b/src/flash/nand/driver.c index 69b3ba961..eda033b5b 100644 --- a/src/flash/nand/driver.c +++ b/src/flash/nand/driver.c @@ -10,6 +10,8 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif + +#include <helper/types.h> #include "core.h" #include "driver.h" @@ -29,12 +31,11 @@ static struct nand_flash_controller *nand_flash_controllers[] = { &s3c2440_nand_controller, &s3c2443_nand_controller, &s3c6400_nand_controller, - NULL }; struct nand_flash_controller *nand_driver_find_by_name(const char *name) { - for (unsigned int i = 0; nand_flash_controllers[i]; i++) { + for (size_t i = 0; i < ARRAY_SIZE(nand_flash_controllers); i++) { struct nand_flash_controller *controller = nand_flash_controllers[i]; if (strcmp(name, controller->name) == 0) return controller; @@ -43,7 +44,7 @@ struct nand_flash_controller *nand_driver_find_by_name(const char *name) } int nand_driver_walk(nand_driver_walker_t f, void *x) { - for (unsigned int i = 0; nand_flash_controllers[i]; i++) { + for (size_t i = 0; i < ARRAY_SIZE(nand_flash_controllers); i++) { int retval = (*f)(nand_flash_controllers[i], x); if (retval != ERROR_OK) return retval; commit 6ab6d3475fb3758b60ad670b1b0d2cf3b2d10768 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 13:53:50 2025 +0200 flash: nand: sort the drivers by alphabetic order Add comments to require the list of drivers to be kept sorted. Change-Id: I21b52cc1f5e679b0ebf7797e204248507f53557b Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8948 Tested-by: jenkins diff --git a/src/flash/nand/driver.c b/src/flash/nand/driver.c index 5d99102c8..69b3ba961 100644 --- a/src/flash/nand/driver.c +++ b/src/flash/nand/driver.c @@ -14,20 +14,21 @@ #include "driver.h" static struct nand_flash_controller *nand_flash_controllers[] = { - &nonce_nand_controller, + // Keep in alphabetic order the list of drivers + &at91sam9_nand_controller, &davinci_nand_controller, + &imx31_nand_flash_controller, &lpc3180_nand_controller, &lpc32xx_nand_controller, + &mxc_nand_flash_controller, + &nonce_nand_controller, + &nuc910_nand_controller, &orion_nand_controller, &s3c2410_nand_controller, &s3c2412_nand_controller, &s3c2440_nand_controller, &s3c2443_nand_controller, &s3c6400_nand_controller, - &mxc_nand_flash_controller, - &imx31_nand_flash_controller, - &at91sam9_nand_controller, - &nuc910_nand_controller, NULL }; diff --git a/src/flash/nand/driver.h b/src/flash/nand/driver.h index 4e84f10fb..d26e77c75 100644 --- a/src/flash/nand/driver.h +++ b/src/flash/nand/driver.h @@ -89,6 +89,7 @@ typedef int (*nand_driver_walker_t)(struct nand_flash_controller *c, void *); */ int nand_driver_walk(nand_driver_walker_t f, void *x); +// Keep in alphabetic order the list of drivers extern struct nand_flash_controller at91sam9_nand_controller; extern struct nand_flash_controller davinci_nand_controller; extern struct nand_flash_controller imx31_nand_flash_controller; commit fa0fa25764b4737b42fbceab9f56a467263e12b0 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 14:02:25 2025 +0200 flash: nor: use array size to constraint the loop Instead of using NULL terminated arrays to determine the last element of the array, use the size of the array. Change-Id: Ia3d739b0a9f201ba2e7b1d1244d60c8e5546c9c1 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8947 Reviewed-by: Brandon Martin Tested-by: jenkins diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c index 4f468848b..cb807ec62 100644 --- a/src/flash/nor/drivers.c +++ b/src/flash/nor/drivers.c @@ -7,6 +7,8 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif + +#include <helper/types.h> #include "imp.h" /** @@ -89,12 +91,11 @@ static const struct flash_driver * const flash_drivers[] = { &xcf_flash, &xmc1xxx_flash, &xmc4xxx_flash, - NULL, }; const struct flash_driver *flash_driver_find_by_name(const char *name) { - for (unsigned int i = 0; flash_drivers[i]; i++) { + for (size_t i = 0; i < ARRAY_SIZE(flash_drivers); i++) { if (strcmp(name, flash_drivers[i]->name) == 0) return flash_drivers[i]; } ----------------------------------------------------------------------- Summary of changes: src/flash/nand/driver.c | 18 +++--- src/flash/nand/driver.h | 1 + src/flash/nor/drivers.c | 5 +- src/jtag/interface.h | 1 + src/jtag/interfaces.c | 153 ++++++++++++++++++++++++----------------------- src/target/target.c | 64 ++++++++++---------- src/target/target_type.h | 1 + 7 files changed, 126 insertions(+), 117 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-29 07:32:35
|
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 a64ae963be55a3a7e12d8f7a91c9787bf4047778 (commit) from a9015ba79d73fcc68fac7b98e679e6d4818472ee (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 a64ae963be55a3a7e12d8f7a91c9787bf4047778 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 12:36:07 2025 +0200 flash: nor: sort the drivers by alphabetic order Add comments to require the list of drivers to be kept sorted. Change-Id: I57382605edc6a38d6c1ac18393421b18ae72215b Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8946 Tested-by: jenkins diff --git a/src/flash/nor/driver.h b/src/flash/nor/driver.h index 3b57ef9ff..da649e783 100644 --- a/src/flash/nor/driver.h +++ b/src/flash/nor/driver.h @@ -237,6 +237,7 @@ struct flash_driver { */ const struct flash_driver *flash_driver_find_by_name(const char *name); +// Keep in alphabetic order this list of drivers extern const struct flash_driver aduc702x_flash; extern const struct flash_driver aducm360_flash; extern const struct flash_driver ambiqmicro_flash; diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c index 3770bfbd3..4f468848b 100644 --- a/src/flash/nor/drivers.c +++ b/src/flash/nor/drivers.c @@ -14,6 +14,7 @@ * @todo Make this dynamically extendable with loadable modules. */ static const struct flash_driver * const flash_drivers[] = { + // Keep in alphabetic order the list of drivers &aduc702x_flash, &aducm360_flash, &ambiqmicro_flash, @@ -27,8 +28,8 @@ static const struct flash_driver * const flash_drivers[] = { &atsamv_flash, &avr_flash, &bluenrgx_flash, - &cc3220sf_flash, &cc26xx_flash, + &cc3220sf_flash, &cfi_flash, &dsp5680xx_flash, &dw_spi_flash, @@ -37,9 +38,9 @@ static const struct flash_driver * const flash_drivers[] = { &eneispif_flash, &esirisc_flash, &faux_flash, + &fespi_flash, &fm3_flash, &fm4_flash, - &fespi_flash, &jtagspi_flash, &kinetis_flash, &kinetis_ke_flash, @@ -54,40 +55,40 @@ static const struct flash_driver * const flash_drivers[] = { &mspm0_flash, &niietcm4_flash, &npcx_flash, - &nrf5_flash, &nrf51_flash, + &nrf5_flash, &numicro_flash, &ocl_flash, &pic32mx_flash, &psoc4_flash, - &psoc5lp_flash, &psoc5lp_eeprom_flash, + &psoc5lp_flash, &psoc5lp_nvl_flash, &psoc6_flash, &qn908x_flash, &renesas_rpchf_flash, &rp2xxx_flash, + &rsl10_flash, &sh_qspi_flash, &sim3x_flash, &stellaris_flash, &stm32f1x_flash, &stm32f2x_flash, - &stm32lx_flash, - &stm32l4x_flash, &stm32h7x_flash, - &stmsmi_flash, + &stm32l4x_flash, + &stm32lx_flash, &stmqspi_flash, + &stmsmi_flash, &str7x_flash, &str9x_flash, &str9xpec_flash, &swm050_flash, &tms470_flash, &virtual_flash, + &w600_flash, &xcf_flash, &xmc1xxx_flash, &xmc4xxx_flash, - &w600_flash, - &rsl10_flash, NULL, }; ----------------------------------------------------------------------- Summary of changes: src/flash/nor/driver.h | 1 + src/flash/nor/drivers.c | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-21 07:39:26
|
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 a9015ba79d73fcc68fac7b98e679e6d4818472ee (commit) from 1040bdec79d430440a31e77585547eb15c39966a (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 a9015ba79d73fcc68fac7b98e679e6d4818472ee Author: Marc Schink <de...@za...> Date: Thu Jun 19 10:28:36 2025 +0200 tcl/target/lsch3_common: Remove 'mem2array' The 'mem2array' function is deprecated and replaced by 'read_memory'. Change-Id: Iea54a390d67978d20dbb99ab6f7f4178dda481c2 Reported-by: Paul Fertser <fer...@gm...> Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8962 Reviewed-by: Paul Fertser <fer...@gm...> Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/target/lsch3_common.cfg b/tcl/target/lsch3_common.cfg index f48d59b9d..ad88b2e1b 100644 --- a/tcl/target/lsch3_common.cfg +++ b/tcl/target/lsch3_common.cfg @@ -51,8 +51,8 @@ proc release_cpu {cpu} { } # Release the cpu; it will start executing something bogus - mem2array regs 32 $RST_BRRL 1 - mww $RST_BRRL [expr {$regs(0) | 1 << $cpu}] + set reg [read_memory $RST_BRRL 32 1] + mww $RST_BRRL [expr {$reg | 1 << $cpu}] if {$not_halted} { resume ----------------------------------------------------------------------- Summary of changes: tcl/target/lsch3_common.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-21 07:38:45
|
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 1040bdec79d430440a31e77585547eb15c39966a (commit) from 99d642ca5b9c6c56c14325d6128a661cedae41a3 (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 1040bdec79d430440a31e77585547eb15c39966a Author: Vitaly Cheptsov <vi...@pr...> Date: Sun May 18 08:49:30 2025 +0300 jlink: add nickname support Using nicknames provides a human-readable alternative to serial numbers for convenience purposes. Allow matching adapter serial with device nickname. Change-Id: I03b8d28a6c89412a825d42f4f66b3b528f217d9c Signed-off-by: Vitaly Cheptsov <vi...@pr...> Reviewed-on: https://review.openocd.org/c/openocd/+/8886 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> Reviewed-by: zapb <de...@za...> diff --git a/doc/openocd.texi b/doc/openocd.texi index 948372c7c..494042530 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -2499,6 +2499,9 @@ If this command is not specified, serial strings are not checked. Only the following adapter drivers use the serial string from this command: arm-jtag-ew, cmsis_dap, esp_usb_jtag, ft232r, ftdi, hla (stlink, ti-icdi), jlink, kitprog, opendus, openjtag, osbdm, presto, rlink, st-link, usb_blaster (ublast2), usbprog, vsllink, xds110. + +For jlink adapters, the @var{serial_string} is also compared +against the adapter's nickname. @end deffn @section Interface Drivers diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c index 9caf37f6f..f6bb3099d 100644 --- a/src/jtag/drivers/jlink.c +++ b/src/jtag/drivers/jlink.c @@ -23,6 +23,7 @@ #include <stdint.h> #include <math.h> +#include <string.h> #include <jtag/interface.h> #include <jtag/swd.h> @@ -40,8 +41,6 @@ static struct jaylink_connection connlist[JAYLINK_MAX_CONNECTIONS]; static enum jaylink_jtag_version jtag_command_version; static uint8_t caps[JAYLINK_DEV_EXT_CAPS_SIZE]; -static uint32_t serial_number; -static bool use_serial_number; static bool use_usb_location; static enum jaylink_usb_address usb_address; static bool use_usb_address; @@ -561,8 +560,9 @@ static int jlink_open_device(uint32_t ifaces, bool *found_device) } use_usb_location = !!adapter_usb_get_location(); + const char *adapter_serial = adapter_get_required_serial(); - if (!use_serial_number && !use_usb_address && !use_usb_location && num_devices > 1) { + if (!adapter_serial && !use_usb_address && !use_usb_location && num_devices > 1) { LOG_ERROR("Multiple devices found, specify the desired device"); LOG_INFO("Found devices:"); for (size_t i = 0; devs[i]; i++) { @@ -575,7 +575,12 @@ static int jlink_open_device(uint32_t ifaces, bool *found_device) jaylink_strerror(ret)); continue; } - LOG_INFO("Device %zu serial: %" PRIu32, i, serial); + char name[JAYLINK_NICKNAME_MAX_LENGTH]; + int name_ret = jaylink_device_get_nickname(devs[i], name); + if (name_ret == JAYLINK_OK) + LOG_INFO("Device %zu serial: %" PRIu32 ", nickname %s", i, serial, name); + else + LOG_INFO("Device %zu serial: %" PRIu32, i, serial); } jaylink_free_devices(devs, true); @@ -585,23 +590,39 @@ static int jlink_open_device(uint32_t ifaces, bool *found_device) *found_device = false; + uint32_t serial_number; + ret = jaylink_parse_serial_number(adapter_serial, &serial_number); + if (ret != JAYLINK_OK) + serial_number = 0; + for (size_t i = 0; devs[i]; i++) { struct jaylink_device *dev = devs[i]; - if (use_serial_number) { - uint32_t tmp; - ret = jaylink_device_get_serial_number(dev, &tmp); - - if (ret == JAYLINK_ERR_NOT_AVAILABLE) { - continue; - } else if (ret != JAYLINK_OK) { - LOG_WARNING("jaylink_device_get_serial_number() failed: %s", - jaylink_strerror(ret)); - continue; + if (adapter_serial) { + /* + * Treat adapter serial as a nickname first as it can also be numeric. + * If it fails to match (optional) device nickname try to compare + * adapter serial with the actual device serial number. + */ + char nickname[JAYLINK_NICKNAME_MAX_LENGTH]; + ret = jaylink_device_get_nickname(dev, nickname); + if (ret != JAYLINK_OK || strcmp(nickname, adapter_serial) != 0) { + if (!serial_number) + continue; + + uint32_t tmp; + ret = jaylink_device_get_serial_number(dev, &tmp); + if (ret == JAYLINK_ERR_NOT_AVAILABLE) { + continue; + } else if (ret != JAYLINK_OK) { + LOG_WARNING("jaylink_device_get_serial_number() failed: %s", + jaylink_strerror(ret)); + continue; + } + + if (serial_number != tmp) + continue; } - - if (serial_number != tmp) - continue; } if (use_usb_address) { @@ -670,29 +691,15 @@ static int jlink_init(void) return ERROR_JTAG_INIT_FAILED; } - const char *serial = adapter_get_required_serial(); - if (serial) { - ret = jaylink_parse_serial_number(serial, &serial_number); - if (ret == JAYLINK_ERR) { - LOG_ERROR("Invalid serial number: %s", serial); - jaylink_exit(jayctx); - return ERROR_JTAG_INIT_FAILED; - } - if (ret != JAYLINK_OK) { - LOG_ERROR("jaylink_parse_serial_number() failed: %s", jaylink_strerror(ret)); - jaylink_exit(jayctx); - return ERROR_JTAG_INIT_FAILED; - } - use_serial_number = true; + if (adapter_get_required_serial()) use_usb_address = false; - } bool found_device; ret = jlink_open_device(JAYLINK_HIF_USB, &found_device); if (ret != ERROR_OK) return ret; - if (!found_device && use_serial_number) { + if (!found_device && adapter_get_required_serial()) { ret = jlink_open_device(JAYLINK_HIF_TCP, &found_device); if (ret != ERROR_OK) return ret; ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 3 ++ src/jtag/drivers/jlink.c | 73 ++++++++++++++++++++++++++---------------------- 2 files changed, 43 insertions(+), 33 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-21 07:38:26
|
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 99d642ca5b9c6c56c14325d6128a661cedae41a3 (commit) from 06a0b8451fd7bb81e463abcaa79a9dcaaa8c0e84 (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 99d642ca5b9c6c56c14325d6128a661cedae41a3 Author: Marc Schink <de...@za...> Date: Thu Jun 19 23:44:23 2025 +0200 doc: Fix 'add_help_text' and 'add_usage_text' usage Remove the quotation marks as they are used for strings and not parameter names. Change-Id: I7bb25eb251427e89256b73cf697d8ec5c1b401dc Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8963 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/doc/openocd.texi b/doc/openocd.texi index df1d8d0be..948372c7c 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -9870,11 +9870,11 @@ Requests the current target to map the specified @var{virtual_address} to its corresponding physical address, and displays the result. @end deffn -@deffn {Command} {add_help_text} 'command_name' 'help-string' +@deffn {Command} {add_help_text} command_name help_string Add or replace help text on the given @var{command_name}. @end deffn -@deffn {Command} {add_usage_text} 'command_name' 'help-string' +@deffn {Command} {add_usage_text} command_name help_string Add or replace usage text on the given @var{command_name}. @end deffn ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-21 07:38: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 06a0b8451fd7bb81e463abcaa79a9dcaaa8c0e84 (commit) from 1afa12005ca84d549bddf31cc8a39308b7bdd197 (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 06a0b8451fd7bb81e463abcaa79a9dcaaa8c0e84 Author: Marc Schink <de...@za...> Date: Mon Jun 16 10:04:44 2025 +0200 doc: Fix 'find' and 'ocd_find' usage Remove the quotation marks as they are used for strings and not parameter names. Change-Id: Ib0629e1465f821f91cd1e837f4ef8c752013b6b7 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8955 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/doc/openocd.texi b/doc/openocd.texi index ec856757d..df1d8d0be 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -1382,11 +1382,11 @@ Read the OpenOCD source code (and Developer's Guide) if you have a new kind of hardware interface and need to provide a driver for it. -@deffn {Command} {find} 'filename' +@deffn {Command} {find} filename Prints full path to @var{filename} according to OpenOCD search rules. @end deffn -@deffn {Command} {ocd_find} 'filename' +@deffn {Command} {ocd_find} filename Prints full path to @var{filename} according to OpenOCD search rules. This is a low level function used by the @command{find}. Usually you want to use @command{find}, instead. ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-21 07:37:29
|
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 1afa12005ca84d549bddf31cc8a39308b7bdd197 (commit) from 82dc399e5e73495c0464283cff331854271706be (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 1afa12005ca84d549bddf31cc8a39308b7bdd197 Author: Marc Schink <de...@za...> Date: Sun Jun 15 22:44:53 2025 +0200 doc: Fix 'add_script_search_dir' usage The 'directory' parameter is not optional. Change-Id: Ifbc7b311692157dae0621dfa6d35a24b8fe8cbb2 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8954 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/doc/openocd.texi b/doc/openocd.texi index 4ad66ee5f..ec856757d 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -9335,7 +9335,7 @@ Redirect logging to @var{filename}. If used without an argument or stderr. @end deffn -@deffn {Command} {add_script_search_dir} [directory] +@deffn {Command} {add_script_search_dir} directory Add @var{directory} to the file/script search path. @end deffn ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-21 07:37:10
|
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 82dc399e5e73495c0464283cff331854271706be (commit) from 9e4b6b90c960b769bf87cf233e638198d96da647 (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 82dc399e5e73495c0464283cff331854271706be Author: Tomas Vanek <va...@fb...> Date: Sat Jun 14 12:18:53 2025 +0200 target/cortex_m: fix debug reason after reset halt [1] removed target_halt() from cortex_m_assert_reset() It broke debug_reason tracking and the previous reason was shown after reset halt. Set debug_reason to DBG_REASON_DBGRQ during reset halt preparation. Fixes: [1] commit 226085065bdf ("target/cortex_m: drop useless target_halt() call") Reported-by: Marc Schink <de...@za...> Change-Id: I685618ed158abde11f6e00eeeee1dfa8ed90952d Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8945 Tested-by: jenkins Reviewed-by: zapb <de...@za...> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index ba9d83d79..8eaf70f60 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -1779,6 +1779,7 @@ static int cortex_m_assert_reset(struct target *target) int retval2; retval2 = mem_ap_write_atomic_u32(armv7m->debug_ap, DCB_DEMCR, TRCENA | VC_HARDERR | VC_BUSERR | VC_CORERESET); + target->debug_reason = DBG_REASON_DBGRQ; if (retval != ERROR_OK || retval2 != ERROR_OK) LOG_TARGET_INFO(target, "AP write error, reset will not halt"); } ----------------------------------------------------------------------- Summary of changes: src/target/cortex_m.c | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-21 07:36: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 9e4b6b90c960b769bf87cf233e638198d96da647 (commit) from 33ebae9abde0b67ad33bb527cf5a2c2f761ab2c4 (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 9e4b6b90c960b769bf87cf233e638198d96da647 Author: R. Diez <rdi...@rd...> Date: Sun Jun 8 10:37:21 2025 +0200 configure.ac: show 5 ARM adapters in config summary Adapters: bcm2835gpio, imx_gpio, am335xgpio, ep93xx and at91rm9200 Allow the user to enable them regardless of the target architecture. Change-Id: I9fbc7cbefe770ea2e2239b95a3305fd29127fa85 Signed-off-by: R. Diez <rdi...@rd...> Reviewed-on: https://review.openocd.org/c/openocd/+/8892 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/configure.ac b/configure.ac index b13af86d8..4b9471629 100644 --- a/configure.ac +++ b/configure.ac @@ -197,6 +197,15 @@ m4_define([RSHIM_ADAPTER], m4_define([AMTJTAGACCEL_ADAPTER], [[[amtjtagaccel], [Amontec JTAG-Accelerator driver], [AMTJTAGACCEL]]]) +m4_define([HOST_ARM_BITBANG_ADAPTERS], + [[[ep93xx], [Bitbanging on EP93xx-based SBCs], [EP93XX]], + [[at91rm9200], [Bitbanging on AT91RM9200-based SBCs], [AT91RM9200]]]) + +m4_define([HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS], + [[[bcm2835gpio], [Bitbanging on BCM2835 (as found in Raspberry Pi)], [BCM2835GPIO]], + [[imx_gpio], [Bitbanging on NXP IMX processors], [IMX_GPIO]], + [[am335xgpio], [Bitbanging on AM335x (as found in Beaglebones)], [AM335XGPIO]]]) + # The word 'Adapter' in "Dummy Adapter" below must begin with a capital letter # because there is an M4 macro called 'adapter'. m4_define([DUMMY_ADAPTER], @@ -336,6 +345,16 @@ AC_ARG_ADAPTERS([ AMTJTAGACCEL_ADAPTER ],[no]) +# The following adapters use bitbanging and can actually be built on all architectures, +# which is useful to verify that they still build fine. +# We could enable them automatically only on the architectures where they actually occur: +# HOST_ARM_BITBANG_ADAPTERS: when ${host_cpu} matches arm* +# HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS: when ${host_cpu} matches arm*|aarch64 +# However, conditionally changing the meaning of 'auto' requires +# a more flexible logic around. +AC_ARG_ADAPTERS([HOST_ARM_BITBANG_ADAPTERS],[no]) +AC_ARG_ADAPTERS([HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS],[no]) + AC_ARG_ENABLE([parport], AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]), [build_parport=$enableval], [build_parport=no]) @@ -350,39 +369,6 @@ AC_ARG_ENABLE([parport_giveio], [Enable use of giveio for parport (for CygWin only)]), [parport_use_giveio=$enableval], [parport_use_giveio=]) -AS_CASE(["${host_cpu}"], - [arm*|aarch64], [ - AC_ARG_ENABLE([bcm2835gpio], - AS_HELP_STRING([--enable-bcm2835gpio], [Enable building support for bitbanging on BCM2835 (as found in Raspberry Pi)]), - [build_bcm2835gpio=$enableval], [build_bcm2835gpio=no]) - AC_ARG_ENABLE([imx_gpio], - AS_HELP_STRING([--enable-imx_gpio], [Enable building support for bitbanging on NXP IMX processors]), - [build_imx_gpio=$enableval], [build_imx_gpio=no]) - AC_ARG_ENABLE([am335xgpio], - AS_HELP_STRING([--enable-am335xgpio], [Enable building support for bitbanging on AM335x (as found in Beaglebones)]), - [build_am335xgpio=$enableval], [build_am335xgpio=no]) - ], - [ - build_bcm2835gpio=no - build_imx_gpio=no - build_am335xgpio=no -]) - -AS_CASE(["${host_cpu}"], - [arm*], [ - AC_ARG_ENABLE([ep93xx], - AS_HELP_STRING([--enable-ep93xx], [Enable building support for EP93xx based SBCs]), - [build_ep93xx=$enableval], [build_ep93xx=no]) - - AC_ARG_ENABLE([at91rm9200], - AS_HELP_STRING([--enable-at91rm9200], [Enable building support for AT91RM9200 based SBCs]), - [build_at91rm9200=$enableval], [build_at91rm9200=no]) - ], - [ - build_ep93xx=no - build_at91rm9200=no -]) - AC_ARG_ENABLE([gw16012], AS_HELP_STRING([--enable-gw16012], [Enable building support for the Gateworks GW16012 JTAG Programmer]), [build_gw16012=$enableval], [build_gw16012=no]) @@ -529,41 +515,6 @@ AS_IF([test "x$ADAPTER_VAR([dummy])" != "xno"], [ build_bitbang=yes ]) -AS_IF([test "x$build_ep93xx" = "xyes"], [ - build_bitbang=yes - AC_DEFINE([BUILD_EP93XX], [1], [1 if you want ep93xx.]) -], [ - AC_DEFINE([BUILD_EP93XX], [0], [0 if you don't want ep93xx.]) -]) - -AS_IF([test "x$build_at91rm9200" = "xyes"], [ - build_bitbang=yes - AC_DEFINE([BUILD_AT91RM9200], [1], [1 if you want at91rm9200.]) -], [ - AC_DEFINE([BUILD_AT91RM9200], [0], [0 if you don't want at91rm9200.]) -]) - -AS_IF([test "x$build_bcm2835gpio" = "xyes"], [ - build_bitbang=yes - AC_DEFINE([BUILD_BCM2835GPIO], [1], [1 if you want bcm2835gpio.]) -], [ - AC_DEFINE([BUILD_BCM2835GPIO], [0], [0 if you don't want bcm2835gpio.]) -]) - -AS_IF([test "x$build_imx_gpio" = "xyes"], [ - build_bitbang=yes - AC_DEFINE([BUILD_IMX_GPIO], [1], [1 if you want imx_gpio.]) -], [ - AC_DEFINE([BUILD_IMX_GPIO], [0], [0 if you don't want imx_gpio.]) -]) - -AS_IF([test "x$build_am335xgpio" = "xyes"], [ - build_bitbang=yes - AC_DEFINE([BUILD_AM335XGPIO], [1], [1 if you want am335xgpio.]) -], [ - AC_DEFINE([BUILD_AM335XGPIO], [0], [0 if you don't want am335xgpio.]) -]) - AS_IF([test "x$parport_use_ppdev" = "xyes"], [ AC_DEFINE([PARPORT_USE_PPDEV], [1], [1 if you want parport to use ppdev.]) ], [ @@ -709,6 +660,8 @@ PROCESS_ADAPTERS([JTAG_VPI_ADAPTER], [true], [unused]) PROCESS_ADAPTERS([RSHIM_ADAPTER], ["x$can_build_rshim" = "xyes"], [internal error: validation should happen beforehand]) PROCESS_ADAPTERS([AMTJTAGACCEL_ADAPTER], [true], [unused]) +PROCESS_ADAPTERS([HOST_ARM_BITBANG_ADAPTERS], [true], [unused]) +PROCESS_ADAPTERS([HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS], [true], [unused]) PROCESS_ADAPTERS([DUMMY_ADAPTER], [true], [unused]) AS_IF([test "x$enable_linuxgpiod" != "xno"], [ @@ -723,6 +676,26 @@ AS_IF([test "x$enable_remote_bitbang" != "xno"], [ build_bitbang=yes ]) +AS_IF([test "x$enable_bcm2835gpio" != "xno"], [ + build_bitbang=yes +]) + +AS_IF([test "x$enable_imx_gpio" != "xno"], [ + build_bitbang=yes +]) + +AS_IF([test "x$enable_am335xgpio" != "xno"], [ + build_bitbang=yes +]) + +AS_IF([test "x$enable_ep93xx" != "xno"], [ + build_bitbang=yes +]) + +AS_IF([test "x$enable_at91rm9200" != "xno"], [ + build_bitbang=yes +]) + AS_IF([test "x$enable_stlink" != "xno" -o "x$enable_ti_icdi" != "xno" -o "x$enable_nulink" != "xno"], [ AC_DEFINE([BUILD_HLADAPTER], [1], [1 if you want the High Level JTAG driver.]) AM_CONDITIONAL([HLADAPTER], [true]) @@ -758,11 +731,6 @@ AS_IF([test "x$enable_esp_usb_jtag" != "xno"], [ AM_CONDITIONAL([RELEASE], [test "x$build_release" = "xyes"]) AM_CONDITIONAL([PARPORT], [test "x$build_parport" = "xyes"]) AM_CONDITIONAL([GIVEIO], [test "x$parport_use_giveio" = "xyes"]) -AM_CONDITIONAL([EP93XX], [test "x$build_ep93xx" = "xyes"]) -AM_CONDITIONAL([AT91RM9200], [test "x$build_at91rm9200" = "xyes"]) -AM_CONDITIONAL([BCM2835GPIO], [test "x$build_bcm2835gpio" = "xyes"]) -AM_CONDITIONAL([IMX_GPIO], [test "x$build_imx_gpio" = "xyes"]) -AM_CONDITIONAL([AM335XGPIO], [test "x$build_am335xgpio" = "xyes"]) AM_CONDITIONAL([BITBANG], [test "x$build_bitbang" = "xyes"]) AM_CONDITIONAL([USB_BLASTER_DRIVER], [test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"]) AM_CONDITIONAL([GW16012], [test "x$build_gw16012" = "xyes"]) @@ -884,10 +852,12 @@ m4_foreach([adapter], [USB1_ADAPTERS, JTAG_VPI_ADAPTER, RSHIM_ADAPTER, AMTJTAGACCEL_ADAPTER, + HOST_ARM_BITBANG_ADAPTERS, + HOST_ARM_OR_AARCH64_BITBANG_ADAPTERS, DUMMY_ADAPTER, OPTIONAL_LIBRARIES, COVERAGE], - [s=m4_format(["%-41s"], ADAPTER_DESC([adapter])) + [s=m4_format(["%-49s"], ADAPTER_DESC([adapter])) AS_CASE([$ADAPTER_VAR([adapter])], [auto], [ echo "$s"yes '(auto)' ----------------------------------------------------------------------- Summary of changes: configure.ac | 118 ++++++++++++++++++++++------------------------------------- 1 file changed, 44 insertions(+), 74 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-21 07:36:00
|
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 33ebae9abde0b67ad33bb527cf5a2c2f761ab2c4 (commit) from 1ebff3ab33c77e3f8fb4e1ddda262b606b572af1 (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 33ebae9abde0b67ad33bb527cf5a2c2f761ab2c4 Author: Daniel Goehring <dgo...@os...> Date: Tue Jan 18 12:34:25 2022 -0500 target/armv8: update MPIDR decoding Update MPIDR decode to support the multithreading (MT) bit. If detected, socket, cluster, core and multithread affinity levels are decoded and displayed. Change-Id: I43569141fa0eef8ee8fc16c187a4af3c23e97db8 Signed-off-by: Daniel Goehring <dgo...@os...> Reviewed-on: https://review.openocd.org/c/openocd/+/7190 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/target/armv8.c b/src/target/armv8.c index 40390731e..ece49c2a2 100644 --- a/src/target/armv8.c +++ b/src/target/armv8.c @@ -883,12 +883,27 @@ int armv8_read_mpidr(struct armv8_common *armv8) int retval = ERROR_FAIL; struct arm *arm = &armv8->arm; struct arm_dpm *dpm = armv8->arm.dpm; - uint32_t mpidr; + uint64_t mpidr; + uint8_t multi_processor_system; + uint8_t aff3; + uint8_t aff2; + uint8_t aff1; + uint8_t aff0; + uint8_t mt; retval = dpm->prepare(dpm); if (retval != ERROR_OK) goto done; + /* + * TODO: BUG - routine armv8_dpm_modeswitch() doesn't re-evaluate 'arm->dpm->core_state'. + * If the core is halted in EL0 AArch32 while EL1 is in AArch64, the modeswitch moves the core + * to EL1, but there is no re-evaluation of dpm->arm->core_state. As a result, while the core + * is in AArch64, the code considers the system still in AArch32. The read of MPIDR would + * select the instruction based on the old core_state. The call to 'armv8_dpm_get_core_state()' + * below could also potentially return the incorrect execution state for the current EL. + */ + /* check if we're in an unprivileged mode */ if (armv8_curel_from_core_mode(arm->core_mode) < SYSTEM_CUREL_EL1) { retval = armv8_dpm_modeswitch(dpm, ARMV8_64_EL1H); @@ -896,17 +911,39 @@ int armv8_read_mpidr(struct armv8_common *armv8) return retval; } - retval = dpm->instr_read_data_r0(dpm, armv8_opcode(armv8, READ_REG_MPIDR), &mpidr); + retval = dpm->instr_read_data_r0_64(dpm, armv8_opcode(armv8, READ_REG_MPIDR), &mpidr); if (retval != ERROR_OK) goto done; if (mpidr & 1U<<31) { - armv8->multi_processor_system = (mpidr >> 30) & 1; - armv8->cluster_id = (mpidr >> 8) & 0xf; - armv8->cpu_id = mpidr & 0x3; - LOG_INFO("%s cluster %x core %x %s", target_name(armv8->arm.target), - armv8->cluster_id, - armv8->cpu_id, - armv8->multi_processor_system == 0 ? "multi core" : "single core"); + multi_processor_system = (mpidr >> 30) & 1; + aff3 = (mpidr >> 32) & 0xff; + aff2 = (mpidr >> 16) & 0xff; + aff1 = (mpidr >> 8) & 0xff; + aff0 = mpidr & 0xff; + mt = (mpidr >> 24) & 0x1; + if (armv8_dpm_get_core_state(&armv8->dpm) == ARM_STATE_AARCH64) { + if (mt) + LOG_INFO("%s socket %" PRIu32 " cluster %" PRIu32 " core %" PRIu32 " thread %" PRIu32 " %s", + target_name(armv8->arm.target), + aff3, aff2, aff1, aff0, + multi_processor_system == 0 ? "multi core" : "single core"); + else + LOG_INFO("%s socket %" PRIu32 " cluster %" PRIu32 " core %" PRIu32 " %s", + target_name(armv8->arm.target), + aff3, aff1, aff0, + multi_processor_system == 0 ? "multi core" : "single core"); + } else { + if (mt) + LOG_INFO("%s cluster %" PRIu32 " core %" PRIu32 " thread %" PRIu32 " %s", + target_name(armv8->arm.target), + aff2, aff1, aff0, + multi_processor_system == 0 ? "multi core" : "single core"); + else + LOG_INFO("%s cluster %" PRIu32 " core %" PRIu32 " %s", + target_name(armv8->arm.target), + aff1, aff0, + multi_processor_system == 0 ? "multi core" : "single core"); + } } else LOG_ERROR("mpidr not in multiprocessor format"); diff --git a/src/target/armv8.h b/src/target/armv8.h index dba12f966..64ca5ec9d 100644 --- a/src/target/armv8.h +++ b/src/target/armv8.h @@ -195,11 +195,6 @@ struct armv8_common { const uint32_t *opcodes; - /* mdir */ - uint8_t multi_processor_system; - uint8_t cluster_id; - uint8_t cpu_id; - /* armv8 aarch64 need below information for page translation */ uint8_t va_size; uint8_t pa_size; ----------------------------------------------------------------------- Summary of changes: src/target/armv8.c | 55 +++++++++++++++++++++++++++++++++++++++++++++--------- src/target/armv8.h | 5 ----- 2 files changed, 46 insertions(+), 14 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-14 13:57: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 1ebff3ab33c77e3f8fb4e1ddda262b606b572af1 (commit) from 9a7c85b163d409ff48e9d445afe4cefbc6c28394 (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 1ebff3ab33c77e3f8fb4e1ddda262b606b572af1 Author: Antonio Borneo <bor...@gm...> Date: Sat Jun 14 09:52:57 2025 +0200 jep106: update to revision JEP106BM Jun 2025 Update to latest available document. Change-Id: Ic1c892b42d3efbb35ad4a6c85deb17ab31ad9997 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8944 Tested-by: jenkins diff --git a/src/helper/jep106.inc b/src/helper/jep106.inc index 8bbaf4ca5..5e50e1955 100644 --- a/src/helper/jep106.inc +++ b/src/helper/jep106.inc @@ -8,7 +8,7 @@ * identification code list, please visit the JEDEC website at www.jedec.org . */ -/* This file is aligned to revision JEP106BL February 2025. */ +/* This file is aligned to revision JEP106BM June 2025. */ [0][0x01 - 1] = "AMD", [0][0x02 - 1] = "AMI", @@ -78,7 +78,7 @@ [0][0x42 - 1] = "Macronix", [0][0x43 - 1] = "Xerox", [0][0x44 - 1] = "Plus Logic", -[0][0x45 - 1] = "Western Digital Technologies Inc", +[0][0x45 - 1] = "SanDisk Technologies Inc", [0][0x46 - 1] = "Elan Circuit Tech.", [0][0x47 - 1] = "European Silicon Str.", [0][0x48 - 1] = "Apple Computer", @@ -1798,7 +1798,7 @@ [14][0x16 - 1] = "Chiplego Technology (Shanghai) Co Ltd", [14][0x17 - 1] = "StoreSkill", [14][0x18 - 1] = "Shenzhen Astou Technology Company", -[14][0x19 - 1] = "Guangdong LeafFive Technology Limited", +[14][0x19 - 1] = "Guangdong LeapFive Technology Limited", [14][0x1a - 1] = "Jin JuQuan", [14][0x1b - 1] = "Huaxuan Technology (Shenzhen) Co Ltd", [14][0x1c - 1] = "Gigastone Corporation", @@ -2049,4 +2049,39 @@ [16][0x15 - 1] = "Hangzhou Lishu Technology Co Ltd", [16][0x16 - 1] = "Tier IV Inc", [16][0x17 - 1] = "Wuhan Xuanluzhe Network Technology Co", +[16][0x18 - 1] = "EA Semi (Shanghai) Limited", +[16][0x19 - 1] = "Tech Vision Information Technology Co", +[16][0x1a - 1] = "Zhihe Computing Technology", +[16][0x1b - 1] = "Beijing Apexichips Tech", +[16][0x1c - 1] = "Yemas Holdingsl Limited", +[16][0x1d - 1] = "Eluktronics", +[16][0x1e - 1] = "Walton Digi-Tech Industries Ltd", +[16][0x1f - 1] = "Beijing Qixin Gongli Technology Co Ltd", +[16][0x20 - 1] = "M.RED", +[16][0x21 - 1] = "Shenzhen Damay Semiconductor Co Ltd", +[16][0x22 - 1] = "Corelab Tech Singapore Holding PTE LTD", +[16][0x23 - 1] = "EmBestor Technology Inc", +[16][0x24 - 1] = "XConn Technologies", +[16][0x25 - 1] = "Flagchip", +[16][0x26 - 1] = "CUNNUC", +[16][0x27 - 1] = "SGMicro", +[16][0x28 - 1] = "Lanxin Computing (Shenzhen) Technology", +[16][0x29 - 1] = "FuturePlus Systems LLC", +[16][0x2a - 1] = "Shenzhen Jielong Storage Technology Co", +[16][0x2b - 1] = "Precision Planting LLC", +[16][0x2c - 1] = "Sichuan ZeroneStor Microelectronics Tech", +[16][0x2d - 1] = "The University of Tokyo", +[16][0x2e - 1] = "Aodu (Fujian) Information Technology Co", +[16][0x2f - 1] = "Bytera Memory Inc", +[16][0x30 - 1] = "XSemitron Technology Inc", +[16][0x31 - 1] = "Cloud Ridge Ltd", +[16][0x32 - 1] = "Shenzhen XinChiTai Technology Co Ltd", +[16][0x33 - 1] = "Shenzhen Xinxin Semiconductor Co Ltd", +[16][0x34 - 1] = "Shenzhen ShineKing Electronics Co Ltd.", +[16][0x35 - 1] = "Shenzhen Shande Semiconductor Co. Ltd.", +[16][0x36 - 1] = "AheadComputing", +[16][0x37 - 1] = "Beijing Ronghua Kangweiye Technology", +[16][0x38 - 1] = "Shanghai Yunsilicon Technology Co Ltd", +[16][0x39 - 1] = "Shenzhen Wolongtai Technology Co Ltd.", +[16][0x3a - 1] = "Vervesemi Microelectronics", /* EOF */ ----------------------------------------------------------------------- Summary of changes: src/helper/jep106.inc | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-13 16:32:01
|
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 9a7c85b163d409ff48e9d445afe4cefbc6c28394 (commit) from 8046f2a38f8af0048c0d2d0842b8a708b79c0c57 (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 9a7c85b163d409ff48e9d445afe4cefbc6c28394 Author: R. Diez <rdi...@rd...> Date: Sun Jun 8 11:22:39 2025 +0200 configure.ac: remove usage of obsolete Automake macro AM_PROG_CC_C_O Macro AM_PROG_CC_C_O has been obsolete since Automake 1.14, released in June 2013 (12 years ago). It used to check whether the C compiler supports the -c and -o options, but that is now included in AC_PROG_CC. Increase the minimum required Automake version to 1.14 accordingly. Also remove the "not a GNU package" comment, which does not really make sense. Change-Id: I987ba8686721c7f36fba81e100f1c3ddf77f636d Signed-off-by: R. Diez <rdi...@rd...> Reviewed-on: https://review.openocd.org/c/openocd/+/8942 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/Makefile.am b/Makefile.am index b2b6cef00..845543721 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later -# not a GNU package. You can remove this line, if -# have all needed files, that a GNU package needs -AUTOMAKE_OPTIONS = gnu 1.6 +AUTOMAKE_OPTIONS = gnu 1.14 .DELETE_ON_ERROR: diff --git a/configure.ac b/configure.ac index 0bac37e5d..b13af86d8 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,6 @@ AC_LANG([C]) AC_PROG_CC # autoconf 2.70 obsoletes AC_PROG_CC_C99 and includes it in AC_PROG_CC m4_version_prereq([2.70],[],[AC_PROG_CC_C99]) -AM_PROG_CC_C_O AC_PROG_RANLIB # If macro PKG_PROG_PKG_CONFIG is not available, Autoconf generates a misleading error message, ----------------------------------------------------------------------- Summary of changes: Makefile.am | 4 +--- configure.ac | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-13 16:28:05
|
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 8046f2a38f8af0048c0d2d0842b8a708b79c0c57 (commit) from 207ecaab33b985b16a067fc2c054a4f2cc161dc3 (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 8046f2a38f8af0048c0d2d0842b8a708b79c0c57 Author: kryvosheiaivan <Iva...@in...> Date: Wed May 28 16:52:42 2025 +0300 cmsis-dap: Fix freeing pending transfers on close Freeing pending transfers on shutdown is done in openOCD and on libusb side. This created concurrency in freeing memory and segmentation faults: https://github.com/libusb/libusb/issues/1627 Bug is reproduced better if many targets are laucnhed. Bug was reproduced with CMSIS-DAP on targets: cyw20829, psoc4, stm32l5 if launching multiple times. Proposed working fix: if some transfers pending/in-flight on 'shutdown' then apply libusb_handle_events_timeout_completed() to make transfer complete. In all cases transfer completed due to tests. Change-Id: I44621ac6096791714910220d04614d0a19ce47bd Signed-off-by: kryvosheiaivan <Iva...@in...> Reviewed-on: https://review.openocd.org/c/openocd/+/8876 Reviewed-by: Tomas Vanek <va...@fb...> Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/jtag/drivers/cmsis_dap_usb_bulk.c b/src/jtag/drivers/cmsis_dap_usb_bulk.c index 8fbcb029d..0dd6b2bbc 100644 --- a/src/jtag/drivers/cmsis_dap_usb_bulk.c +++ b/src/jtag/drivers/cmsis_dap_usb_bulk.c @@ -414,7 +414,19 @@ static int cmsis_dap_usb_open(struct cmsis_dap *dap, uint16_t vids[], uint16_t p static void cmsis_dap_usb_close(struct cmsis_dap *dap) { for (unsigned int i = 0; i < MAX_PENDING_REQUESTS; i++) { - libusb_free_transfer(dap->bdata->command_transfers[i].transfer); + if (dap->bdata->command_transfers[i].status == CMSIS_DAP_TRANSFER_PENDING) { + LOG_DEBUG("busy command USB transfer at %u", dap->pending_fifo_put_idx); + struct timeval tv = { + .tv_sec = 1, + .tv_usec = 1000 + }; + /* Complete pending commands */ + int res = libusb_handle_events_timeout_completed(dap->bdata->usb_ctx, &tv, NULL); + if (res == 0) + libusb_free_transfer(dap->bdata->command_transfers[i].transfer); + } else { + libusb_free_transfer(dap->bdata->command_transfers[i].transfer); + } libusb_free_transfer(dap->bdata->response_transfers[i].transfer); } cmsis_dap_usb_free(dap); ----------------------------------------------------------------------- Summary of changes: src/jtag/drivers/cmsis_dap_usb_bulk.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2025-06-13 16:27:22
|
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 207ecaab33b985b16a067fc2c054a4f2cc161dc3 (commit) from 88aec4b49939a3f29fd3d9d5e8954e5bffeda8c9 (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 207ecaab33b985b16a067fc2c054a4f2cc161dc3 Author: Marc Schink <de...@za...> Date: Wed Oct 9 11:14:21 2024 +0200 adapter: Deprecate Gateworks GW16012 driver The adapter is not available for years now. There is also no information about this device from Gateworks. The poor hardware availability and the lack of users prevents testing, maintenance and adaptations to future changes. Mark the adapter as deprecated as a first step to give potential users the opportunity to upgrade the hardware until the next OpenOCD release. Change-Id: I037325a6b018b26608733a36bef30db2785858f8 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8651 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/configure.ac b/configure.ac index 9561f2ba0..0bac37e5d 100644 --- a/configure.ac +++ b/configure.ac @@ -862,6 +862,11 @@ AS_IF([test "x$enable_amtjtagaccel" != "xno"], [ echo AC_MSG_WARN([Amontec JTAG-Accelerator adapter is deprecated and support will be removed in the next release!]) ]) +AS_IF([test "x$build_gw16012" = "xyes"], [ + echo + echo + AC_MSG_WARN([Gateworks GW16012 JTAG adapter is deprecated and support will be removed in the next release!]) +]) echo echo diff --git a/doc/openocd.texi b/doc/openocd.texi index 04fa77bd4..4ad66ee5f 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -2929,6 +2929,8 @@ image. To be used with USB-Blaster II only. @end deffn @deffn {Interface Driver} {gw16012} +@b{Note: This adapter is deprecated and support will be removed in the next release!} + Gateworks GW16012 JTAG programmer. This has one driver-specific command: diff --git a/src/jtag/drivers/gw16012.c b/src/jtag/drivers/gw16012.c index 805065f1f..98f775422 100644 --- a/src/jtag/drivers/gw16012.c +++ b/src/jtag/drivers/gw16012.c @@ -461,6 +461,8 @@ static int gw16012_init(void) { uint8_t status_port; + LOG_WARNING("This adapter is deprecated and support will be removed in the next release!"); + if (gw16012_init_device() != ERROR_OK) return ERROR_JTAG_INIT_FAILED; ----------------------------------------------------------------------- Summary of changes: configure.ac | 5 +++++ doc/openocd.texi | 2 ++ src/jtag/drivers/gw16012.c | 2 ++ 3 files changed, 9 insertions(+) hooks/post-receive -- Main OpenOCD repository |