You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: openocd-gerrit <ope...@us...> - 2024-12-29 07:28:20
|
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 5284a5f3eca63099fc0f3e19e69d1c55a99b214b (commit) from 15d90dd21cfc480714fbefa238998e6b00b9c4b1 (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 5284a5f3eca63099fc0f3e19e69d1c55a99b214b Author: Tomas Vanek <va...@fb...> Date: Fri Oct 25 17:17:22 2024 +0200 tcl/interface: Find proper alias for RP1 on Raspberry Pi 5 Previously, Linux assigned gpiochip numbers sequentially depending on when the chip driver was probed. As RP1 is on the end of a PCIe link, it is probed later than the on-board chips (including expanders connected over SPI/I2C). This meant that RP1's gpiochip assignment was at an offset that could potentially change. A downstream kernel patch now assigns fixed offsets for RP1 and the onboard gpiochips. Query the device tree to get proper GPIO_CHIP index. Change-Id: I759978d4b3021c815a7d9febb41961cd1d3d185c Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/8650 Reviewed-by: Jonathan Bell <jon...@ra...> Tested-by: jenkins diff --git a/tcl/interface/raspberrypi5-gpiod.cfg b/tcl/interface/raspberrypi5-gpiod.cfg index 9624ad511..03f3fdb6e 100644 --- a/tcl/interface/raspberrypi5-gpiod.cfg +++ b/tcl/interface/raspberrypi5-gpiod.cfg @@ -18,11 +18,19 @@ proc read_file { name } { return $result } +proc find_rp1_alias {} { + foreach f [glob -directory "/proc/device-tree/aliases" "gpio\[0-9\]"] { + if {[string match "*/rp1/*" [read_file $f]]} { + return $f + } + } +} + set pcie_aspm [read_file /sys/module/pcie_aspm/parameters/policy] if {![string match {*\[performance\]*} $pcie_aspm]} { echo "Warn : Switch PCIe power saving off or the first couple of pulses gets clocked as fast as 20 MHz" echo "Warn : Issue 'echo performance | sudo tee /sys/module/pcie_aspm/parameters/policy'" } -set GPIO_CHIP 4 +set GPIO_CHIP [string index [find_rp1_alias] end] source [find interface/raspberrypi-gpio-connector.cfg] ----------------------------------------------------------------------- Summary of changes: tcl/interface/raspberrypi5-gpiod.cfg | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-29 07:26:42
|
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 15d90dd21cfc480714fbefa238998e6b00b9c4b1 (commit) from 66faa420a468d5961a0799785042e130cb7441f8 (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 15d90dd21cfc480714fbefa238998e6b00b9c4b1 Author: Marc Schink <de...@za...> Date: Fri Dec 13 07:34:03 2024 +0000 tcl/target: Add config for STM32U0x Tested with NUCLEO-U083RC development board. Change-Id: Iec668b45166543adcd1fa5077d41c57a35d3becf Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8648 Tested-by: jenkins Reviewed-by: Tomas Vanek <va...@fb...> diff --git a/tcl/target/stm32u0x.cfg b/tcl/target/stm32u0x.cfg new file mode 100644 index 000000000..d3aaed3cb --- /dev/null +++ b/tcl/target/stm32u0x.cfg @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# Configuration file for STM32U0x series. +# +# STM32U0 devices support only SWD transport. +# + +source [find mem_helper.tcl] + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME stm32u0x +} + +# Work-area is a space in RAM used for flash programming, by default use 4 KiB. +if { [info exists WORKAREASIZE] } { + set _WORKAREASIZE $WORKAREASIZE +} else { + set _WORKAREASIZE 0x1000 +} + +if { [info exists CPUTAPID] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x6ba02477 +} + +swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID +dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME cortex_m -endian little -dap $_CHIPNAME.dap + +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 + +flash bank $_CHIPNAME.flash stm32l4x 0x08000000 0 0 0 $_TARGETNAME +flash bank $_CHIPNAME.otp stm32l4x 0x1FFF6800 0 0 0 $_TARGETNAME + +adapter speed 2000 + +if {![using_hla]} { + # Use SYSRESETREQ to perform a soft reset if SRST is not fitted. + cortex_m reset_config sysresetreq +} + +$_TARGETNAME configure -event examine-end { + # Enable debug during low power modes (uses more power). + # DBGMCU_CR |= DBG_STANDBY | DBG_STOP + mmw 0x40015804 0x00000006 0 + + # Stop watchdog counters when core is halted. + # DBGMCU_APB1_FZR |= DBG_IWDG_STOP | DBG_WWDG_STOP + mmw 0x40015808 0x00001800 0 +} ----------------------------------------------------------------------- Summary of changes: tcl/target/stm32u0x.cfg | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tcl/target/stm32u0x.cfg hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-29 07:26:09
|
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 66faa420a468d5961a0799785042e130cb7441f8 (commit) from 7d5a0b6a27455aec21d0900183dc6812ccb031b6 (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 66faa420a468d5961a0799785042e130cb7441f8 Author: Marc Schink <de...@za...> Date: Fri Dec 13 07:14:02 2024 +0000 flash/nor/stm32l4x: Add support for STM32U0 series Tested flash programming / erasing and write protection feature on the STM32U083RC microcontroller. Change-Id: I3af51452f76d1f046d34d61b22d51abe2d0db3e8 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8647 Reviewed-by: Tomas Vanek <va...@fb...> Tested-by: jenkins diff --git a/doc/openocd.texi b/doc/openocd.texi index 9b5cfbb83..594f7a7f0 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -8001,7 +8001,7 @@ The @var{num} parameter is a value shown by @command{flash banks}. @end deffn @deffn {Flash Driver} {stm32l4x} -All members of the STM32 G0, G4, L4, L4+, L5, U5, WB and WL +All members of the STM32 G0, G4, L4, L4+, L5, U0, U5, WB and WL microcontroller families from STMicroelectronics include internal flash and use ARM Cortex-M0+, M4 and M33 cores. The driver automatically recognizes a number of these chips using diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c index d66a83dd3..d2e8f3050 100644 --- a/src/flash/nor/stm32l4x.c +++ b/src/flash/nor/stm32l4x.c @@ -120,6 +120,12 @@ * http://www.st.com/resource/en/reference_manual/dm00346336.pdf */ +/* STM32U0xxx series for reference. + * + * RM0503 (STM32U0xx) + * https://www.st.com/resource/en/reference_manual/rm0503-stm32u0-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf + */ + /* STM32U5xxx series for reference. * * RM0456 (STM32U5xx) @@ -278,7 +284,7 @@ struct stm32l4_wrp { }; /* human readable list of families this drivers supports (sorted alphabetically) */ -static const char *device_families = "STM32C0/G0/G4/L4/L4+/L5/U5/WB/WL"; +static const char *device_families = "STM32C0/G0/G4/L4/L4+/L5/U0/U5/WB/WL"; static const struct stm32l4_rev stm32l47_l48xx_revs[] = { { 0x1000, "1" }, { 0x1001, "2" }, { 0x1003, "3" }, { 0x1007, "4" } @@ -325,6 +331,10 @@ static const struct stm32l4_rev stm32g0b_g0cxx_revs[] = { { 0x1000, "A" }, }; +static const struct stm32l4_rev stm32u0xx_revs[] = { + { 0x1000, "A" }, +}; + static const struct stm32l4_rev stm32g43_g44xx_revs[] = { { 0x1000, "A" }, { 0x2000, "B" }, { 0x2001, "Z" }, }; @@ -600,6 +610,30 @@ static const struct stm32l4_part_info stm32l4_parts[] = { .otp_base = 0x1FFF7000, .otp_size = 1024, }, + { + .id = DEVID_STM32U031XX, + .revs = stm32u0xx_revs, + .num_revs = ARRAY_SIZE(stm32u0xx_revs), + .device_str = "STM32U031xx", + .max_flash_size_kb = 64, + .flags = F_NONE, + .flash_regs_base = 0x40022000, + .fsize_addr = 0x1FFF3EA0, + .otp_base = 0x1FFF6800, + .otp_size = 1024, + }, + { + .id = DEVID_STM32U073_U083XX, + .revs = stm32u0xx_revs, + .num_revs = ARRAY_SIZE(stm32u0xx_revs), + .device_str = "STM32U073/U083xx", + .max_flash_size_kb = 256, + .flags = F_NONE, + .flash_regs_base = 0x40022000, + .fsize_addr = 0x1FFF6EA0, + .otp_base = 0x1FFF6800, + .otp_size = 1024, + }, { .id = DEVID_STM32U59_U5AXX, .revs = stm32u59_u5axx_revs, @@ -1957,6 +1991,8 @@ static int stm32l4_probe(struct flash_bank *bank) case DEVID_STM32C03XX: case DEVID_STM32G05_G06XX: case DEVID_STM32G07_G08XX: + case DEVID_STM32U031XX: + case DEVID_STM32U073_U083XX: case DEVID_STM32L45_L46XX: case DEVID_STM32L41_L42XX: case DEVID_STM32G03_G04XX: diff --git a/src/flash/nor/stm32l4x.h b/src/flash/nor/stm32l4x.h index 5f3bc2657..b1e8f9870 100644 --- a/src/flash/nor/stm32l4x.h +++ b/src/flash/nor/stm32l4x.h @@ -91,6 +91,7 @@ #define DEVID_STM32C03XX 0x453 #define DEVID_STM32U53_U54XX 0x455 #define DEVID_STM32G05_G06XX 0x456 +#define DEVID_STM32U031XX 0x459 #define DEVID_STM32G07_G08XX 0x460 #define DEVID_STM32L49_L4AXX 0x461 #define DEVID_STM32L45_L46XX 0x462 @@ -105,6 +106,7 @@ #define DEVID_STM32G49_G4AXX 0x479 #define DEVID_STM32U59_U5AXX 0x481 #define DEVID_STM32U57_U58XX 0x482 +#define DEVID_STM32U073_U083XX 0x489 #define DEVID_STM32WBA5X 0x492 #define DEVID_STM32WB1XX 0x494 #define DEVID_STM32WB5XX 0x495 ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 2 +- src/flash/nor/stm32l4x.c | 38 +++++++++++++++++++++++++++++++++++++- src/flash/nor/stm32l4x.h | 2 ++ 3 files changed, 40 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:57:41
|
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 7d5a0b6a27455aec21d0900183dc6812ccb031b6 (commit) via 4d1b3cbafc7a1bf44ca695103cf4701d8e8ef8e9 (commit) from 1f2db5d59a51262ef824a99fb6b77ce241250e47 (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 7d5a0b6a27455aec21d0900183dc6812ccb031b6 Author: Marc Schink <de...@za...> Date: Fri Nov 29 20:39:21 2024 +0000 tcl/board: Add nRF54L15-DK config file This patch adds support for the nRF54L15 development kit from Nordic Semiconductor. Change-Id: I5e362227fed3982ef21f36e41aade196e0ac7031 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8610 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/tcl/board/nordic/nrf54l15-dk.cfg b/tcl/board/nordic/nrf54l15-dk.cfg new file mode 100644 index 000000000..d785d852d --- /dev/null +++ b/tcl/board/nordic/nrf54l15-dk.cfg @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# +# Nordic Semiconductor nRF54L15 Development kit +# https://www.nordicsemi.com/Products/Development-hardware/nRF54L15-DK +# + +source [find interface/jlink.cfg] +source [find target/nordic/nrf54l.cfg] commit 4d1b3cbafc7a1bf44ca695103cf4701d8e8ef8e9 Author: Marc Schink <de...@za...> Date: Fri Nov 29 20:29:18 2024 +0000 tcl/target: Add support for Nordic nRF54L series The RISC-V coprocessor is currently not supported. It is attached to the DAP via AP#2 but the AP implementation is unknown. The nRFL54L series uses resistive RAM (RRAM) as non-volatile memory which can be programmed directly. Since it does not fit in the current flash memory infrastructure of OpenOCD there is no NVM support so far. Change-Id: I9934af4fd3bb8b7272954fc4b17638c7dabbbee0 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8609 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/target/nordic/nrf54l.cfg b/tcl/target/nordic/nrf54l.cfg new file mode 100644 index 000000000..70ead1365 --- /dev/null +++ b/tcl/target/nordic/nrf54l.cfg @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# +# Nordic nRF54L series +# +# Arm Cortex-M33 processor with RISC-V coprocessor +# +# The device uses resistive RAM (RRAM) as non-volatile memory. +# + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME nrf54l +} + +# Work-area is a space in RAM used for flash programming, by default use 16 KiB. +if { [info exists WORKAREASIZE] } { + set _WORKAREASIZE $WORKAREASIZE +} else { + set _WORKAREASIZE 0x4000 +} + +if { [info exists CPUTAPID] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x6ba02477 +} + +transport select swd + +swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID +dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap -ap-num 0 + +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 + +# Create target for the control access port (CTRL-AP). +target create $_CHIPNAME.ctrl mem_ap -dap $_CHIPNAME.dap -ap-num 1 + +adapter speed 1000 + +# Use main processor as default target. +targets $_TARGETNAME + +if {![using_hla]} { + $_TARGETNAME cortex_m reset_config sysresetreq +} ----------------------------------------------------------------------- Summary of changes: tcl/board/nordic/nrf54l15-dk.cfg | 9 ++++++++ tcl/target/nordic/nrf54l.cfg | 50 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 tcl/board/nordic/nrf54l15-dk.cfg create mode 100644 tcl/target/nordic/nrf54l.cfg hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:56:53
|
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 1f2db5d59a51262ef824a99fb6b77ce241250e47 (commit) from 3be1bee75347ab1eac835591eae3ca53a58008c5 (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 1f2db5d59a51262ef824a99fb6b77ce241250e47 Author: Marc Schink <de...@za...> Date: Sat Nov 30 15:35:39 2024 +0100 rtos/rtos: Remove 'ERROR: ' prefix in error log Remove the prefix since it is redundant. Change-Id: Ib064d1031f5ad14ed7711c09bb5f5254d0054d59 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8633 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 0dd538e8f..f218f6369 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -608,7 +608,7 @@ int rtos_generic_stack_read(struct target *target, int retval; if (stack_ptr == 0) { - LOG_ERROR("Error: null stack pointer in thread"); + LOG_ERROR("null stack pointer in thread"); return -5; } /* Read the stack */ ----------------------------------------------------------------------- Summary of changes: src/rtos/rtos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:56:40
|
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 3be1bee75347ab1eac835591eae3ca53a58008c5 (commit) via 9cd0b37112dc49e41c84d673ae24e473e757a920 (commit) from 7f9d25d58aeaba8eb0856604ce6e8abe739ead8d (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 3be1bee75347ab1eac835591eae3ca53a58008c5 Author: Marc Schink <de...@za...> Date: Sat Nov 30 15:34:20 2024 +0100 target/mips: Remove 'ERROR: ' prefix in error log Remove the prefix since it is redundant. Change-Id: Ieecfb3583d484847514f1298e819ccf6d26abd84 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8632 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 587e20d2b..ea90d6f83 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -400,7 +400,7 @@ int mips32_pracc_queue_exec(struct mips_ejtag *ejtag_info, struct pracc_queue_in ejtag_ctrl = buf_get_u32(scan_in[scan_count].scan_32.ctrl, 0, 32); uint32_t addr = buf_get_u32(scan_in[scan_count].scan_32.addr, 0, 32); if (!(ejtag_ctrl & EJTAG_CTRL_PRACC)) { - LOG_ERROR("Error: access not pending count: %d", scan_count); + LOG_ERROR("Access not pending, count: %d", scan_count); retval = ERROR_FAIL; goto exit; } diff --git a/src/target/mips64_pracc.c b/src/target/mips64_pracc.c index 8cfce32e3..11783fe97 100644 --- a/src/target/mips64_pracc.c +++ b/src/target/mips64_pracc.c @@ -76,12 +76,12 @@ static int mips64_pracc_exec_read(struct mips64_pracc_context *ctx, uint64_t add offset = (address - MIPS64_PRACC_PARAM_IN) / MIPS64_PRACC_DATA_STEP; if (offset >= MIPS64_PRACC_PARAM_IN_SIZE) { - LOG_ERROR("Error: iparam size exceeds MIPS64_PRACC_PARAM_IN_SIZE"); + LOG_ERROR("iparam size exceeds MIPS64_PRACC_PARAM_IN_SIZE"); return ERROR_JTAG_DEVICE_ERROR; } if (!ctx->local_iparam) { - LOG_ERROR("Error: unexpected reading of input parameter"); + LOG_ERROR("unexpected reading of input parameter"); return ERROR_JTAG_DEVICE_ERROR; } @@ -93,7 +93,7 @@ static int mips64_pracc_exec_read(struct mips64_pracc_context *ctx, uint64_t add offset = (address - MIPS64_PRACC_PARAM_OUT) / MIPS64_PRACC_DATA_STEP; if (!ctx->local_oparam) { - LOG_ERROR("Error: unexpected reading of output parameter"); + LOG_ERROR("unexpected reading of output parameter"); return ERROR_JTAG_DEVICE_ERROR; } @@ -181,7 +181,7 @@ static int mips64_pracc_exec_write(struct mips64_pracc_context *ctx, uint64_t ad && (address < MIPS64_PRACC_PARAM_IN + ctx->num_iparam * MIPS64_PRACC_DATA_STEP)) { offset = (address - MIPS64_PRACC_PARAM_IN) / MIPS64_PRACC_DATA_STEP; if (!ctx->local_iparam) { - LOG_ERROR("Error: unexpected writing of input parameter"); + LOG_ERROR("unexpected writing of input parameter"); return ERROR_JTAG_DEVICE_ERROR; } ctx->local_iparam[offset] = data; @@ -189,14 +189,14 @@ static int mips64_pracc_exec_write(struct mips64_pracc_context *ctx, uint64_t ad && (address < MIPS64_PRACC_PARAM_OUT + ctx->num_oparam * MIPS64_PRACC_DATA_STEP)) { offset = (address - MIPS64_PRACC_PARAM_OUT) / MIPS64_PRACC_DATA_STEP; if (!ctx->local_oparam) { - LOG_ERROR("Error: unexpected writing of output parameter"); + LOG_ERROR("unexpected writing of output parameter"); return ERROR_JTAG_DEVICE_ERROR; } ctx->local_oparam[offset] = data; } else if (address == MIPS64_PRACC_STACK) { /* save data onto our stack */ if (ctx->stack_offset >= STACK_DEPTH) { - LOG_ERROR("Error: PrAcc stack depth exceeded"); + LOG_ERROR("PrAcc stack depth exceeded"); return ERROR_FAIL; } ctx->stack[ctx->stack_offset++] = data; commit 9cd0b37112dc49e41c84d673ae24e473e757a920 Author: Marc Schink <de...@za...> Date: Sat Nov 30 15:32:09 2024 +0100 target/xtensa: Remove 'ERROR: ' prefix in error log Remove the prefix since it is redundant. While at it, also get rid of the useless exclamation mark. Change-Id: I16fd6a88b533fac19b4c622cf9740fd32ba7892c Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8611 Reviewed-by: Richard Allen <rs...@gm...> Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c index fe1b83bc3..3b888fe5f 100644 --- a/src/target/xtensa/xtensa.c +++ b/src/target/xtensa/xtensa.c @@ -503,7 +503,7 @@ static enum xtensa_reg_id xtensa_windowbase_offset_to_canonical(struct xtensa *x } else if (reg_idx >= XT_REG_IDX_A0 && reg_idx <= XT_REG_IDX_A15) { idx = reg_idx - XT_REG_IDX_A0; } else { - LOG_ERROR("Error: can't convert register %d to non-windowbased register!", reg_idx); + LOG_ERROR("Can't convert register %d to non-windowbased register", reg_idx); return -1; } /* Each windowbase value represents 4 registers on LX and 8 on NX */ ----------------------------------------------------------------------- Summary of changes: src/target/mips32_pracc.c | 2 +- src/target/mips64_pracc.c | 12 ++++++------ src/target/xtensa/xtensa.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:55: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 7f9d25d58aeaba8eb0856604ce6e8abe739ead8d (commit) from bb2fc63357a01a106ea628fb4b7e789f6a747901 (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 7f9d25d58aeaba8eb0856604ce6e8abe739ead8d Author: R. Diez <rdi...@ya...> Date: Fri Nov 29 21:09:50 2024 +0100 configure.ac: switch from $host to $host_os Suggested during review https://review.openocd.org/c/openocd/+/8533 Only the OS part was being checked anyway. The aim is to facilitate merging all $host_os checks in the future. Change-Id: Idce1d5872cf19ef423429fa0c3b2ff7ee3945332 Signed-off-by: R. Diez <rdi...@ya...> Reviewed-on: https://review.openocd.org/c/openocd/+/8607 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/configure.ac b/configure.ac index 1e545dcc4..b353bced7 100644 --- a/configure.ac +++ b/configure.ac @@ -415,8 +415,8 @@ AS_CASE(["${host_cpu}"], can_build_buspirate=yes -AS_CASE([$host], - [*-cygwin*], [ +AS_CASE([$host_os], + [cygwin*], [ is_win32=yes parport_use_ppdev=no @@ -436,7 +436,7 @@ AS_CASE([$host], ]) ]) ], - [*-mingw* | *-msys*], [ + [mingw* | msys*], [ is_mingw=yes is_win32=yes parport_use_ppdev=no @@ -455,7 +455,7 @@ AS_CASE([$host], AC_SUBST([HOST_CPPFLAGS], ["-D__USE_MINGW_ANSI_STDIO -DFD_SETSIZE=128"]) ], - [*darwin*], [ + [darwin*], [ is_darwin=yes AS_IF([test "x$parport_use_giveio" = "xyes"], [ ----------------------------------------------------------------------- Summary of changes: configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:55: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 bb2fc63357a01a106ea628fb4b7e789f6a747901 (commit) from cd9e64a25ac167d188859e991201d3fe492a91e1 (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 bb2fc63357a01a106ea628fb4b7e789f6a747901 Author: R. Diez <rdi...@ya...> Date: Fri Nov 29 21:24:23 2024 +0100 configure.ac: enable the Dummy adapter by default The Dummy adapter is useful when developing generic JimTcl code. Besides, the distributed BUGS file states that you should try to reproduce any crashes with the Dummy adapter, so it does not make sense that it is not enabled by default. Change-Id: I145de06de4d2c0011619b1b941200b63e200db23 Signed-off-by: R. Diez <rdi...@ya...> Reviewed-on: https://review.openocd.org/c/openocd/+/8608 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins Reviewed-by: Paul Fertser <fer...@gm...> diff --git a/configure.ac b/configure.ac index 567152b0a..1e545dcc4 100644 --- a/configure.ac +++ b/configure.ac @@ -290,12 +290,11 @@ AC_ARG_ADAPTERS([ LIBFTDI_USB1_ADAPTERS, LIBGPIOD_ADAPTERS, SERIAL_PORT_ADAPTERS, + DUMMY_ADAPTER, PCIE_ADAPTERS, LIBJAYLINK_ADAPTERS ],[auto]) -AC_ARG_ADAPTERS([DUMMY_ADAPTER],[no]) - AC_ARG_ENABLE([parport], AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]), [build_parport=$enableval], [build_parport=no]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:52: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 cd9e64a25ac167d188859e991201d3fe492a91e1 (commit) via dca76cd5dad974996e7231ba0ede544c626ba43d (commit) from 42f70a3b95ea708d0e4fd5d83a6bc6965fd65ac6 (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 cd9e64a25ac167d188859e991201d3fe492a91e1 Author: Antonio Borneo <bor...@gm...> Date: Wed Nov 27 09:25:01 2024 +0100 rtos: mqx: minor rework to avoid a cast Change the type of task_name[] to char in order to drop a cast. Change-Id: I233fc862e972e52130fd4ffcb29a3da36f4f8923 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8599 Reviewed-by: Paul Fertser <fer...@gm...> Tested-by: jenkins diff --git a/src/rtos/mqx.c b/src/rtos/mqx.c index 90154db3f..017fd2b01 100644 --- a/src/rtos/mqx.c +++ b/src/rtos/mqx.c @@ -319,7 +319,7 @@ static int mqx_update_threads( i < (uint32_t)rtos->thread_count; i++ ) { - uint8_t task_name[MQX_THREAD_NAME_LENGTH + 1]; + char task_name[MQX_THREAD_NAME_LENGTH + 1]; uint32_t task_addr = 0, task_template = 0, task_state = 0; uint32_t task_name_addr = 0, task_id = 0, task_errno = 0; uint32_t state_index = 0; @@ -380,7 +380,7 @@ static int mqx_update_threads( rtos->thread_details[i].threadid = task_id; rtos->thread_details[i].exists = true; /* set thread name */ - rtos->thread_details[i].thread_name_str = strdup((char *)task_name); + rtos->thread_details[i].thread_name_str = strdup(task_name); if (!rtos->thread_details[i].thread_name_str) return ERROR_FAIL; /* set thread extra info commit dca76cd5dad974996e7231ba0ede544c626ba43d Author: Paul Fertser <fer...@gm...> Date: Tue Nov 26 22:55:55 2024 +0200 rtos: mqx: replace malloc+strcpy with strdup Using strcpy is potentially dangerous so just use a safer and easier way to do the same. Signed-off-by: Paul Fertser <fer...@gm...> Change-Id: Id85f3b7f8af1eaf14c9951ae710546d2437c70b5 Reviewed-on: https://review.openocd.org/c/openocd/+/8597 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/rtos/mqx.c b/src/rtos/mqx.c index b4a182135..90154db3f 100644 --- a/src/rtos/mqx.c +++ b/src/rtos/mqx.c @@ -380,10 +380,9 @@ static int mqx_update_threads( rtos->thread_details[i].threadid = task_id; rtos->thread_details[i].exists = true; /* set thread name */ - rtos->thread_details[i].thread_name_str = malloc(strlen((void *)task_name) + 1); + rtos->thread_details[i].thread_name_str = strdup((char *)task_name); if (!rtos->thread_details[i].thread_name_str) return ERROR_FAIL; - strcpy(rtos->thread_details[i].thread_name_str, (void *)task_name); /* set thread extra info * - task state * - task address ----------------------------------------------------------------------- Summary of changes: src/rtos/mqx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:52:18
|
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 42f70a3b95ea708d0e4fd5d83a6bc6965fd65ac6 (commit) from 1710954977a0262e6987426f117aab0f73b27024 (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 42f70a3b95ea708d0e4fd5d83a6bc6965fd65ac6 Author: Antonio Borneo <bor...@gm...> Date: Fri Nov 22 18:06:40 2024 +0100 target: aarch64: fix out-of-bound access to array The command 'arm core_state' uses the enum in 'arm->core_state' as an index in the table of strings to print the core state. With [1] the enum has been extended with the new state for AArch64 but not the corresponding table of strings. This causes an access after the limit of arm_state_strings[]. Rewrite the table using c99 array designators to better show the link between the enum list and the table. Add the function arm_core_state_string() to check for out-of-bound values allover the file. Change-Id: I06473c2c8088b38ee07118bcc9e49bc8eafbc6e2 Fixes: [1] 9cbfc9feb35c ("arm_dpm: Add new state ARM_STATE_AARCH64") Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8594 Tested-by: jenkins diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index c1836bc7a..ceec3619b 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -248,7 +248,11 @@ enum arm_mode armv4_5_number_to_mode(int number) } static const char *arm_state_strings[] = { - "ARM", "Thumb", "Jazelle", "ThumbEE", + [ARM_STATE_ARM] = "ARM", + [ARM_STATE_THUMB] = "Thumb", + [ARM_STATE_JAZELLE] = "Jazelle", + [ARM_STATE_THUMB_EE] = "ThumbEE", + [ARM_STATE_AARCH64] = "AArch64", }; /* Templates for ARM core registers. @@ -430,6 +434,16 @@ 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"); + return "Unknown"; + } + + return arm_state_strings[arm->core_state]; +} + /** * Configures host-side ARM records to reflect the specified CPSR. * Later, code can use arm_reg_current() to map register numbers @@ -484,7 +498,7 @@ void arm_set_cpsr(struct arm *arm, uint32_t cpsr) LOG_DEBUG("set CPSR %#8.8" PRIx32 ": %s mode, %s state", cpsr, arm_mode_name(mode), - arm_state_strings[arm->core_state]); + arm_core_state_string(arm)); } /** @@ -794,7 +808,7 @@ int arm_arch_state(struct target *target) LOG_USER("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_state_strings[arm->core_state], + arm_core_state_string(arm), debug_reason_name(target), arm_mode_name(arm->core_mode), buf_get_u32(arm->cpsr->value, 0, 32), @@ -929,7 +943,7 @@ COMMAND_HANDLER(handle_arm_core_state_command) arm->core_state = ARM_STATE_THUMB; } - command_print(CMD, "core state: %s", arm_state_strings[arm->core_state]); + command_print(CMD, "core state: %s", arm_core_state_string(arm)); return ret; } ----------------------------------------------------------------------- Summary of changes: src/target/armv4_5.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:46: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 1710954977a0262e6987426f117aab0f73b27024 (commit) from cc02bd752c13e1810b0b56593e6c5edcd179f484 (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 1710954977a0262e6987426f117aab0f73b27024 Author: Marc Schink <de...@za...> Date: Wed Oct 23 15:42:16 2024 +0200 doc/manual: Add section about logging The log messages are very inconsistent across the code base. Add a guideline for log messages to help improve consistency. The guideline is based on the most commonly used style in the current code base. Change-Id: I076d68abe588dd04b59580379e97b82d537def23 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8576 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins Reviewed-by: Tomas Vanek <va...@fb...> diff --git a/doc/manual/style.txt b/doc/manual/style.txt index a1e6b8f01..dc27e8767 100644 --- a/doc/manual/style.txt +++ b/doc/manual/style.txt @@ -225,6 +225,21 @@ if (!buf) { } @endcode +@section stylelogging Logging + +Logging is intended to provide human-readable information to users. +Do not confuse logging with the output of commands. +The latter is intended for the result of a command and should be able to be processed by Tcl scripts. + + - Use one of the following functions to generate log messages, never use `printf()` or similar functions. + - Use `LOG_ERROR()` to provide information in case an operation failed in an unrecoverable way. For example, if necessary memory cannot be allocated. + - Use `LOG_WARNING()` to inform the user of about an unexpected behavior that can be handled and the intended operation is still be performed. For example, in case a command is deprecated but is nevertheless executed. + - Use `LOG_INFO()` to provide insightful or necessary information to the user. For example, features or capabilities of a discovered target. + - Use `LOG_DEBUG()` to provide information for troubleshooting. For example, detailed information which makes it easier to debug a specific operation. Try to avoid flooding the log with frequently generated messages. For example, do not use LOG_DEBUG() in operations used for polling the target. Use LOG_DEBUG_IO() for such frequent messages. + - Use `LOG_DEBUG_IO()` to provide I/O related information for troubleshooting. For example, details about the communication between OpenOCD and a debug adapter. + - If the log message is related to a target, use the corresponding `LOG_TARGET_xxx()` functions. + - Do not use a period or exclamation mark at the end of a message. + */ /** @page styledoxygen Doxygen Style Guide ----------------------------------------------------------------------- Summary of changes: doc/manual/style.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 09:44: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 cc02bd752c13e1810b0b56593e6c5edcd179f484 (commit) from cb3b8afe47ef791b2671f1af9415bd28dedffb6d (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 cc02bd752c13e1810b0b56593e6c5edcd179f484 Author: fanoush <fa...@gm...> Date: Mon Sep 2 13:49:19 2024 +0200 rtt server: fix for dropped data when target has no space rtt_write_channel may write less data than requested, default device buffer size for channel 0 is 16 bytes, so currently anything larger than this is dropped. This fix implements per connection buffer and uses the connection->input_pending flag to retry writes. Change-Id: I00c845fccb0248550ad0f0fd9cda7bac7976b92b Signed-off-by: fanoush <fa...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8360 Reviewed-by: zapb <de...@za...> Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/server/rtt_server.c b/src/server/rtt_server.c index 976915347..b44101c3d 100644 --- a/src/server/rtt_server.c +++ b/src/server/rtt_server.c @@ -28,6 +28,12 @@ struct rtt_service { char *hello_message; }; +struct rtt_connection_data { + unsigned char buffer[64]; + unsigned int length; + unsigned int offset; +}; + static int read_callback(unsigned int channel, const uint8_t *buffer, size_t length, void *user_data) { @@ -56,7 +62,16 @@ static int rtt_new_connection(struct connection *connection) { int ret; struct rtt_service *service; + struct rtt_connection_data *data; + + data = calloc(1, sizeof(struct rtt_connection_data)); + if (!data) { + LOG_ERROR("Out of memory"); + return ERROR_FAIL; + } + + connection->priv = data; service = connection->service->priv; LOG_DEBUG("rtt: New connection for channel %u", service->channel); @@ -79,31 +94,53 @@ static int rtt_connection_closed(struct connection *connection) service = (struct rtt_service *)connection->service->priv; rtt_unregister_sink(service->channel, &read_callback, connection); - LOG_DEBUG("rtt: Connection for channel %u closed", service->channel); + free(connection->priv); + LOG_DEBUG("rtt: Connection for channel %u closed", service->channel); return ERROR_OK; } static int rtt_input(struct connection *connection) { - int bytes_read; - unsigned char buffer[1024]; struct rtt_service *service; - size_t length; + struct rtt_connection_data *data; - service = (struct rtt_service *)connection->service->priv; - bytes_read = connection_read(connection, buffer, sizeof(buffer)); + data = connection->priv; + service = connection->service->priv; - if (!bytes_read) - return ERROR_SERVER_REMOTE_CLOSED; - else if (bytes_read < 0) { - LOG_ERROR("error during read: %s", strerror(errno)); - return ERROR_SERVER_REMOTE_CLOSED; - } + if (!connection->input_pending) { + int bytes_read; - length = bytes_read; - rtt_write_channel(service->channel, buffer, &length); + bytes_read = connection_read(connection, data->buffer, sizeof(data->buffer)); + + if (!bytes_read) { + return ERROR_SERVER_REMOTE_CLOSED; + } else if (bytes_read < 0) { + LOG_ERROR("error during read: %s", strerror(errno)); + return ERROR_SERVER_REMOTE_CLOSED; + } + data->length = bytes_read; + data->offset = 0; + } + if (data->length > 0) { + unsigned char *ptr; + size_t length, to_write; + + ptr = data->buffer + data->offset; + length = data->length - data->offset; + to_write = length; + rtt_write_channel(service->channel, ptr, &length); + + if (length < to_write) { + data->offset += length; + connection->input_pending = true; + } else { + data->offset = 0; + data->length = 0; + connection->input_pending = false; + } + } return ERROR_OK; } @@ -126,8 +163,10 @@ COMMAND_HANDLER(handle_rtt_start_command) service = calloc(1, sizeof(struct rtt_service)); - if (!service) + if (!service) { + LOG_ERROR("Out of memory"); return ERROR_FAIL; + } COMMAND_PARSE_NUMBER(uint, CMD_ARGV[1], service->channel); ----------------------------------------------------------------------- Summary of changes: src/server/rtt_server.c | 69 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 15 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-22 00:41:04
|
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 cb3b8afe47ef791b2671f1af9415bd28dedffb6d (commit) from d60e1f6693e52800603eac7c8de3ade14eb6a514 (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 cb3b8afe47ef791b2671f1af9415bd28dedffb6d Author: Pete Moore <pm...@mo...> Date: Mon Dec 16 14:02:14 2024 +0100 jimtcl: Fix command not found During the ./configure build stage, error './configure.gnu: line 1: -e: command not found' can occur. Problem: the -e flag with echo is not portable. While some shells support it (e.g., Bash), others (e.g., POSIX /bin/sh on some systems) do not. Solution: replacing echo -e with printf, since printf is POSIX-compliant and works consistently across different shells. Change-Id: I9efbba662599a61bbe1fc56a33dc1ee7ad58826c Signed-off-by: Pete Moore <pm...@mo...> Reviewed-on: https://review.openocd.org/c/openocd/+/8653 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> Reviewed-by: Andreas Fritiofson <and...@gm...> diff --git a/config_subdir.m4 b/config_subdir.m4 index 2be590e44..5549c760a 100644 --- a/config_subdir.m4 +++ b/config_subdir.m4 @@ -7,6 +7,6 @@ AC_DEFUN([AX_CONFIG_SUBDIR_OPTION], AC_CONFIG_SUBDIRS([$1]) m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu], -[echo -e '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" '"$2"' "'\$'@"' > "$srcdir/$1/configure.gnu" +[printf '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" '"$2"' "'\$'@"\n' > "$srcdir/$1/configure.gnu" ]) ]) ----------------------------------------------------------------------- Summary of changes: config_subdir.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-12-21 10:26: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 d60e1f6693e52800603eac7c8de3ade14eb6a514 (commit) from 133dd9d669e5b8beb7c7787b0be677621808e72d (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 d60e1f6693e52800603eac7c8de3ade14eb6a514 Author: Pete Moore <pm...@mo...> Date: Mon Dec 16 16:55:06 2024 +0100 flash/nor/sfdp: Fix broken DEBUG log line on macOS https://review.openocd.org/c/openocd/+/8439 changed variable `words` from uint8_t to unsigned int in sfdp.c but failed to update the LOG_DEBUG line to reflect the new type. On macOS this caused: src/flash/nor/sfdp.c:107:28: error: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Werror,-Wformat] The formatting of the debug line has been updated to reflect the updated type. Change-Id: Ifc7ddb1279ab2603901c969d9c09af847f3a3caf Signed-off-by: Pete Moore <pm...@mo...> Reviewed-on: https://review.openocd.org/c/openocd/+/8660 Tested-by: jenkins Reviewed-by: Tomas Vanek <va...@fb...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/sfdp.c b/src/flash/nor/sfdp.c index 917f1626f..8e25ba680 100644 --- a/src/flash/nor/sfdp.c +++ b/src/flash/nor/sfdp.c @@ -103,7 +103,7 @@ int spi_sfdp(struct flash_bank *bank, struct flash_device *dev, uint16_t id = (((pheaders[k].ptr) >> 16) & 0xFF00) | (pheaders[k].revision & 0xFF); uint32_t ptr = pheaders[k].ptr & 0xFFFFFF; - LOG_DEBUG("pheader %d len=0x%02" PRIx8 " id=0x%04" PRIx16 + LOG_DEBUG("pheader %d len=0x%02x id=0x%04" PRIx16 " ptr=0x%06" PRIx32, k, words, id, ptr); /* retrieve parameter table */ ----------------------------------------------------------------------- Summary of changes: src/flash/nor/sfdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:55:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 133dd9d669e5b8beb7c7787b0be677621808e72d (commit) from 76e228f733af8f685cfd96a25c92f17256562d1c (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 133dd9d669e5b8beb7c7787b0be677621808e72d Author: Henrik Mau <hen...@an...> Date: Wed Nov 13 15:43:23 2024 +0000 target/xtensa: add maskisr command support for NX Add maskisr command support to Xtensa NX targets allowing masking of interrupts during single stepping. Change-Id: I3835479de8015f1a2842afd1aeab24829e385031 Signed-off-by: Henrik Mau <hen...@an...> Reviewed-on: https://review.openocd.org/c/openocd/+/8575 Reviewed-by: Ian Thompson <ia...@ca...> Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c index 284bfc9c6..fe1b83bc3 100644 --- a/src/target/xtensa/xtensa.c +++ b/src/target/xtensa/xtensa.c @@ -1727,7 +1727,7 @@ int xtensa_do_step(struct target *target, int current, target_addr_t address, in xtensa_reg_val_t dbreakc[XT_WATCHPOINTS_NUM_MAX]; xtensa_reg_val_t icountlvl, cause; xtensa_reg_val_t oldps, oldpc, cur_pc; - bool ps_lowered = false; + bool ps_modified = false; LOG_TARGET_DEBUG(target, "current=%d, address=" TARGET_ADDR_FMT ", handle_breakpoints=%i", current, address, handle_breakpoints); @@ -1783,14 +1783,23 @@ int xtensa_do_step(struct target *target, int current, target_addr_t address, in * RFI >= DBGLEVEL. */ if (xtensa->stepping_isr_mode == XT_STEPPING_ISR_OFF) { - if (!xtensa->core_config->high_irq.enabled) { - LOG_TARGET_WARNING( - target, - "disabling IRQs while stepping is not implemented w/o high prio IRQs option!"); - return ERROR_FAIL; + if (xtensa->core_config->core_type == XT_LX) { + if (!xtensa->core_config->high_irq.enabled) { + LOG_TARGET_WARNING(target, + "disabling IRQs while stepping is not implemented w/o high prio IRQs option!"); + return ERROR_FAIL; + } + /* Update ICOUNTLEVEL accordingly */ + icountlvl = MIN((oldps & 0xF) + 1, xtensa->core_config->debug.irq_level); + } else { + /* Xtensa NX does not have the ICOUNTLEVEL feature present in Xtensa LX + * and instead disable interrupts while stepping. This could change + * the timing of the system while under debug */ + xtensa_reg_val_t newps = oldps | XT_PS_DI_MSK; + xtensa_reg_set(target, XT_REG_IDX_PS, newps); + icountlvl = xtensa->core_config->debug.irq_level; + ps_modified = true; } - /* Update ICOUNTLEVEL accordingly */ - icountlvl = MIN((oldps & 0xF) + 1, xtensa->core_config->debug.irq_level); } else { icountlvl = xtensa->core_config->debug.irq_level; } @@ -1815,7 +1824,7 @@ int xtensa_do_step(struct target *target, int current, target_addr_t address, in xtensa_cause_clear(target); /* so we don't recurse into the same routine */ if (xtensa->core_config->core_type == XT_LX && ((oldps & 0xf) >= icountlvl)) { /* Lower interrupt level to allow stepping, but flag eps[dbglvl] to be restored */ - ps_lowered = true; + ps_modified = true; uint32_t newps = (oldps & ~0xf) | (icountlvl - 1); xtensa_reg_set(target, xtensa->eps_dbglevel_idx, newps); LOG_TARGET_DEBUG(target, @@ -1916,11 +1925,12 @@ int xtensa_do_step(struct target *target, int current, target_addr_t address, in } /* Restore int level */ - if (ps_lowered) { + if (ps_modified) { LOG_DEBUG("Restoring %s after stepping: 0x%08" PRIx32, - xtensa->core_cache->reg_list[xtensa->eps_dbglevel_idx].name, - oldps); - xtensa_reg_set(target, xtensa->eps_dbglevel_idx, oldps); + xtensa->core_cache->reg_list[(xtensa->core_config->core_type == XT_LX) ? + xtensa->eps_dbglevel_idx : XT_REG_IDX_PS].name, oldps); + xtensa_reg_set(target, (xtensa->core_config->core_type == XT_LX) ? + xtensa->eps_dbglevel_idx : XT_REG_IDX_PS, oldps); } /* write ICOUNTLEVEL back to zero */ @@ -4191,11 +4201,6 @@ COMMAND_HELPER(xtensa_cmd_mask_interrupts_do, struct xtensa *xtensa) return ERROR_OK; } - if (xtensa->core_config->core_type == XT_NX) { - command_print(CMD, "ERROR: ISR step mode only supported on Xtensa LX"); - return ERROR_FAIL; - } - /* Masking is ON -> interrupts during stepping are OFF, and vice versa */ if (!strcasecmp(CMD_ARGV[0], "off")) state = XT_STEPPING_ISR_ON; diff --git a/src/target/xtensa/xtensa.h b/src/target/xtensa/xtensa.h index 1d56f8368..419277675 100644 --- a/src/target/xtensa/xtensa.h +++ b/src/target/xtensa/xtensa.h @@ -45,6 +45,7 @@ /* PS register bits (NX) */ #define XT_PS_DIEXC_MSK BIT(2) +#define XT_PS_DI_MSK BIT(3) /* MS register bits (NX) */ #define XT_MS_DE_MSK BIT(5) ----------------------------------------------------------------------- Summary of changes: src/target/xtensa/xtensa.c | 41 +++++++++++++++++++++++------------------ src/target/xtensa/xtensa.h | 1 + 2 files changed, 24 insertions(+), 18 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:54:33
|
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 76e228f733af8f685cfd96a25c92f17256562d1c (commit) from c837beaf5d70685a4c3236b1680897985adafe5f (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 76e228f733af8f685cfd96a25c92f17256562d1c Author: Marc Schink <de...@za...> Date: Tue Oct 22 18:22:36 2024 +0200 target/cortex_m: Use LOG_TARGET_xxx() Use LOG_TARGET_xxx() for the remaining log messages. Change-Id: If52e3935b57e4c39212ce6b5111ff65159de1373 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8580 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index e78d2e29b..fa95fcbc7 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -1469,7 +1469,7 @@ static int cortex_m_resume(struct target *target, int current, if (target->smp && !debug_execution) { retval = cortex_m_restore_smp(target, !!handle_breakpoints); if (retval != ERROR_OK) - LOG_WARNING("resume of a SMP target failed, trying to resume current one"); + LOG_TARGET_WARNING(target, "resume of a SMP target failed, trying to resume current one"); } cortex_m_restart_one(target, !!debug_execution); @@ -2553,7 +2553,7 @@ static bool cortex_m_has_tz(struct target *target) int retval = target_read_u32(target, DAUTHSTATUS, &dauthstatus); if (retval != ERROR_OK) { - LOG_WARNING("Error reading DAUTHSTATUS register"); + LOG_TARGET_WARNING(target, "Error reading DAUTHSTATUS register"); return false; } return (dauthstatus & DAUTHSTATUS_SID_MASK) != 0; @@ -2602,7 +2602,7 @@ int cortex_m_examine(struct target *target) } else { armv7m->debug_ap = dap_get_ap(swjdp, cortex_m->apsel); if (!armv7m->debug_ap) { - LOG_ERROR("Cannot get AP"); + LOG_TARGET_ERROR(target, "Cannot get AP"); return ERROR_FAIL; } } @@ -2659,9 +2659,9 @@ int cortex_m_examine(struct target *target) LOG_TARGET_WARNING(target, "Erratum 3092511: Cortex-M7 can halt in an incorrect address when breakpoint and exception occurs simultaneously"); cortex_m->incorrect_halt_erratum = true; if (armv7m->is_hla_target) - LOG_WARNING("No erratum 3092511 workaround on hla adapter"); + LOG_TARGET_WARNING(target, "No erratum 3092511 workaround on hla adapter"); else - LOG_INFO("The erratum 3092511 workaround will resume after an incorrect halt"); + LOG_TARGET_INFO(target, "The erratum 3092511 workaround will resume after an incorrect halt"); } LOG_TARGET_DEBUG(target, "cpuid: 0x%8.8" PRIx32 "", cpuid); ----------------------------------------------------------------------- Summary of changes: src/target/cortex_m.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:54:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via c837beaf5d70685a4c3236b1680897985adafe5f (commit) from 69736131754c1b742beb8bf3058b72ae4ffc3d32 (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 c837beaf5d70685a4c3236b1680897985adafe5f Author: Marc Schink <de...@za...> Date: Tue Oct 22 17:31:20 2024 +0200 target/breakpoints: Use LOG_TARGET_ERROR() Use LOG_TARGET_xxx() for the remaining log messages. Change-Id: I4b86b206d17dead0662388e827204b40a7d29edd Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8579 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/breakpoints.c b/src/target/breakpoints.c index 9378abcb1..a08041629 100644 --- a/src/target/breakpoints.c +++ b/src/target/breakpoints.c @@ -114,7 +114,7 @@ static int context_breakpoint_add_internal(struct target *target, * breakpoint" ... check all the parameters before * succeeding. */ - LOG_ERROR("Duplicate Breakpoint asid: 0x%08" PRIx32 " (BP %" PRIu32 ")", + LOG_TARGET_ERROR(target, "Duplicate Breakpoint asid: 0x%08" PRIx32 " (BP %" PRIu32 ")", asid, breakpoint->unique_id); return ERROR_TARGET_DUPLICATE_BREAKPOINT; } @@ -643,8 +643,7 @@ int watchpoint_remove(struct target *target, target_addr_t address) int watchpoint_clear_target(struct target *target) { - LOG_DEBUG("Delete all watchpoints for target: %s", - target_name(target)); + LOG_TARGET_DEBUG(target, "Delete all watchpoints"); struct watchpoint *watchpoint = target->watchpoints; int retval = ERROR_OK; ----------------------------------------------------------------------- Summary of changes: src/target/breakpoints.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:54: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 69736131754c1b742beb8bf3058b72ae4ffc3d32 (commit) from f5036aff3a83f9b92ee5939e5a32a13396b53dd5 (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 69736131754c1b742beb8bf3058b72ae4ffc3d32 Author: Marc Schink <de...@za...> Date: Wed Oct 23 15:02:10 2024 +0200 rtos: Remove 'ERROR: ' prefix in error log Remove the prefix since it is redundant. While at it, also get rid of the useless exclamation mark. Change-Id: I8707342c602cea735c5a423b37ebe40a3aafb137 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8578 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index cc0fecebe..0dd538e8f 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -309,7 +309,7 @@ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_s reply_len += 2 * strlen(next_suffix); /* hexify(..., next_suffix, ...) */ reply_len += 1; /* Terminating NUL */ if (reply_len > sizeof(reply)) { - LOG_ERROR("ERROR: RTOS symbol '%s%s' name is too long for GDB!", next_sym->symbol_name, next_suffix); + LOG_ERROR("RTOS symbol '%s%s' name is too long for GDB", next_sym->symbol_name, next_suffix); goto done; } ----------------------------------------------------------------------- Summary of changes: src/rtos/rtos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:53:28
|
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 f5036aff3a83f9b92ee5939e5a32a13396b53dd5 (commit) from 11f24fc2f2bef1868e17f9b3b53ec8264b164611 (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 f5036aff3a83f9b92ee5939e5a32a13396b53dd5 Author: Marc Schink <de...@za...> Date: Tue Oct 22 17:32:37 2024 +0200 target/xtensa: Remove 'ERROR: ' prefix in error log Remove the prefix since it is redundant. Change-Id: I9c23c0479ba40be24e471309e720060cd03763ee Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8577 Tested-by: jenkins Reviewed-by: Ian Thompson <ia...@ca...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c index 8369cc4e5..284bfc9c6 100644 --- a/src/target/xtensa/xtensa.c +++ b/src/target/xtensa/xtensa.c @@ -3000,13 +3000,13 @@ static int xtensa_build_reg_cache(struct target *target) /* Construct empty-register list for handling unknown register requests */ xtensa->empty_regs = calloc(xtensa->dbregs_num, sizeof(struct reg)); if (!xtensa->empty_regs) { - LOG_TARGET_ERROR(target, "ERROR: Out of memory"); + LOG_TARGET_ERROR(target, "Out of memory"); goto fail; } for (unsigned int i = 0; i < xtensa->dbregs_num; i++) { xtensa->empty_regs[i].name = calloc(8, sizeof(char)); if (!xtensa->empty_regs[i].name) { - LOG_TARGET_ERROR(target, "ERROR: Out of memory"); + LOG_TARGET_ERROR(target, "Out of memory"); goto fail; } sprintf((char *)xtensa->empty_regs[i].name, "?0x%04x", i & 0x0000FFFF); @@ -3024,7 +3024,7 @@ static int xtensa_build_reg_cache(struct target *target) if (xtensa->regmap_contiguous && xtensa->contiguous_regs_desc) { xtensa->contiguous_regs_list = calloc(xtensa->total_regs_num, sizeof(struct reg *)); if (!xtensa->contiguous_regs_list) { - LOG_TARGET_ERROR(target, "ERROR: Out of memory"); + LOG_TARGET_ERROR(target, "Out of memory"); goto fail; } for (unsigned int i = 0; i < xtensa->total_regs_num; i++) { ----------------------------------------------------------------------- Summary of changes: src/target/xtensa/xtensa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:51:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 11f24fc2f2bef1868e17f9b3b53ec8264b164611 (commit) from 2627f8ce6daebd4ab148165a8797595c04052695 (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 11f24fc2f2bef1868e17f9b3b53ec8264b164611 Author: R. Diez <rdi...@ya...> Date: Tue Nov 5 14:40:50 2024 +0100 configure.ac: improve validation of some --enable-xxx options Catch an invalid option like "--enable-buspirate=rubbish". Also mention all valid values in the help text for those options. Change-Id: Ib0fb8904132d07cc5cde421aa816ca6971a08769 Signed-off-by: R. Diez <rdi...@ya...> Reviewed-on: https://review.openocd.org/c/openocd/+/8540 Reviewed-by: R. Diez <rdi...@rd...> Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/configure.ac b/configure.ac index 31e57a3cd..567152b0a 100644 --- a/configure.ac +++ b/configure.ac @@ -272,9 +272,13 @@ AC_ARG_ENABLE([dmem], m4_define([AC_ARG_ADAPTERS], [ m4_foreach([adapter], [$1], [AC_ARG_ENABLE(ADAPTER_OPT([adapter]), - AS_HELP_STRING([--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)]), - [], [ADAPTER_VAR([adapter])=$2]) + [case "${enableval}" in + yes|no|auto) ;; + *) AC_MSG_ERROR([Option --enable-ADAPTER_OPT([adapter]) has invalid value "${enableval}".]) ;; + esac], + [ADAPTER_VAR([adapter])=$2]) ]) ]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:51: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 2627f8ce6daebd4ab148165a8797595c04052695 (commit) from 9ff79fd61fb0bd763d09820672e9e7ce50df4c41 (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 2627f8ce6daebd4ab148165a8797595c04052695 Author: R. Diez <rdi...@ya...> Date: Sun Nov 3 10:52:45 2024 +0100 configure.ac: show the linuxgpiod adapter in the configuration summary List AC_ARG_ADAPTERS was missing a comma separating two of the elements. Also verify that each adapter is set to either 'auto', 'yes' or 'no', which should prevent such issues from going unnoticed in the future. Change-Id: I0d407e03b1e5a3edc61d7dc93d5ffa70fe079b3c Signed-off-by: R. Diez <rdi...@ya...> Reviewed-on: https://review.openocd.org/c/openocd/+/8534 Tested-by: jenkins Reviewed-by: R. Diez <rdi...@rd...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/configure.ac b/configure.ac index 687c5c974..31e57a3cd 100644 --- a/configure.ac +++ b/configure.ac @@ -283,7 +283,7 @@ AC_ARG_ADAPTERS([ HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS, - LIBFTDI_USB1_ADAPTERS + LIBFTDI_USB1_ADAPTERS, LIBGPIOD_ADAPTERS, SERIAL_PORT_ADAPTERS, PCIE_ADAPTERS, @@ -372,10 +372,6 @@ AS_CASE([$host_os], AC_MSG_ERROR([sysfsgpio is only available on linux]) ]) - AS_IF([test "x$enable_linuxgpiod" = "xyes"], [ - AC_MSG_ERROR([linuxgpiod is only available on linux]) - ]) - AS_CASE([$host_os], [freebsd*], [], [ AS_IF([test "x$build_rshim" = "xyes"], [ @@ -722,7 +718,7 @@ PROCESS_ADAPTERS([HIDAPI_ADAPTERS], ["x$use_hidapi" = "xyes"], [hidapi]) PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libusb1" = "xyes"], [hidapi and libusb-1.x]) 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"], [libgpiod]) +PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [Linux libgpiod]) PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2]) PROCESS_ADAPTERS([PCIE_ADAPTERS], ["x$is_linux" = "xyes"], [Linux build]) PROCESS_ADAPTERS([SERIAL_PORT_ADAPTERS], ["x$can_build_buspirate" = "xyes"], @@ -889,6 +885,11 @@ m4_foreach([adapter], [USB1_ADAPTERS, ], [no], [ echo "$s"no + ], + [ + AC_MSG_ERROR(m4_normalize([ + Error in [adapter] "ADAPTER_ARG([adapter])": Variable "ADAPTER_VAR([adapter])" + has invalid value "$ADAPTER_VAR([adapter])".])) ]) ]) echo ----------------------------------------------------------------------- Summary of changes: configure.ac | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:50:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 9ff79fd61fb0bd763d09820672e9e7ce50df4c41 (commit) from c582cfbf758fdf188b02d8e57e0f57ce9c36663e (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 9ff79fd61fb0bd763d09820672e9e7ce50df4c41 Author: R. Diez <rdi...@ya...> Date: Sat Nov 2 23:34:23 2024 +0100 enable the Bus Pirate adapter by default on most systems Also convert the Bus Pirate to the common PROCESS_ADAPTERS logic. Change-Id: Ifa8ebcee380c16d7e308ba7a75dbffdb74208285 Signed-off-by: R. Diez <rdi...@ya...> Reviewed-on: https://review.openocd.org/c/openocd/+/8533 Reviewed-by: Antonio Borneo <bor...@gm...> Reviewed-by: R. Diez <rdi...@rd...> Tested-by: jenkins diff --git a/configure.ac b/configure.ac index 291e854a4..687c5c974 100644 --- a/configure.ac +++ b/configure.ac @@ -414,6 +414,8 @@ AS_CASE(["${host_cpu}"], parport_use_ppdev=yes ]) +can_build_buspirate=yes + AS_CASE([$host], [*-cygwin*], [ is_win32=yes @@ -445,12 +447,12 @@ AS_CASE([$host], ]) parport_use_giveio=yes - AS_IF([test "x$enable_buspirate" = "xyes"], [ - AC_MSG_ERROR([buspirate currently not supported by MinGW32 hosts]) + AS_IF([test "x$ADAPTER_VAR([buspirate])" = "xyes"], [ + AC_MSG_ERROR([The Bus Pirate adapter is currently not supported by MinGW32 hosts.]) ]) # In case enable_buspirate=auto, make sure it will not be built. - enable_buspirate=no + can_build_buspirate=no AC_SUBST([HOST_CPPFLAGS], ["-D__USE_MINGW_ANSI_STDIO -DFD_SETSIZE=128"]) ], @@ -594,12 +596,6 @@ AS_IF([test "x$build_gw16012" = "xyes"], [ AC_DEFINE([BUILD_GW16012], [0], [0 if you don't want the Gateworks GW16012 driver.]) ]) -AS_IF([test "x$enable_buspirate" != "xno"], [ - AC_DEFINE([BUILD_BUSPIRATE], [1], [1 if you want the Buspirate JTAG driver.]) -], [ - AC_DEFINE([BUILD_BUSPIRATE], [0], [0 if you don't want the Buspirate JTAG driver.]) -]) - AS_IF([test "x$use_internal_jimtcl" = "xyes"], [ AS_IF([test -f "$srcdir/jimtcl/configure"], [ AS_IF([test "x$use_internal_jimtcl_maintainer" = "xyes"], [ @@ -712,7 +708,7 @@ m4_define([PROCESS_ADAPTERS], [ ]) ], [ AS_IF([test "x$ADAPTER_VAR([adapter])" = "xyes"], [ - AC_MSG_ERROR([$3 is required for [adapter] ADAPTER_DESC([adapter]).]) + AC_MSG_ERROR([$3 is required for [adapter] "ADAPTER_DESC([adapter])".]) ]) ADAPTER_VAR([adapter])=no AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [0], [0 if you do not want the ]ADAPTER_DESC([adapter]).) @@ -729,6 +725,8 @@ PROCESS_ADAPTERS([LIBFTDI_USB1_ADAPTERS], ["x$use_libftdi" = "xyes" -a "x$use_li PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [libgpiod]) PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2]) PROCESS_ADAPTERS([PCIE_ADAPTERS], ["x$is_linux" = "xyes"], [Linux build]) +PROCESS_ADAPTERS([SERIAL_PORT_ADAPTERS], ["x$can_build_buspirate" = "xyes"], + [internal error: validation should happen beforehand]) PROCESS_ADAPTERS([DUMMY_ADAPTER], [true], [unused]) AS_IF([test "x$enable_linuxgpiod" != "xno"], [ @@ -783,7 +781,6 @@ AM_CONDITIONAL([USB_BLASTER_DRIVER], [test "x$enable_usb_blaster" != "xno" -o "x AM_CONDITIONAL([AMTJTAGACCEL], [test "x$build_amtjtagaccel" = "xyes"]) AM_CONDITIONAL([GW16012], [test "x$build_gw16012" = "xyes"]) AM_CONDITIONAL([REMOTE_BITBANG], [test "x$build_remote_bitbang" = "xyes"]) -AM_CONDITIONAL([BUSPIRATE], [test "x$enable_buspirate" != "xno"]) AM_CONDITIONAL([SYSFSGPIO], [test "x$build_sysfsgpio" = "xyes"]) AM_CONDITIONAL([USE_LIBUSB1], [test "x$use_libusb1" = "xyes"]) AM_CONDITIONAL([IS_CYGWIN], [test "x$is_cygwin" = "xyes"]) diff --git a/src/jtag/drivers/Makefile.am b/src/jtag/drivers/Makefile.am index e404afe9f..8be834859 100644 --- a/src/jtag/drivers/Makefile.am +++ b/src/jtag/drivers/Makefile.am @@ -143,7 +143,7 @@ endif if ARMJTAGEW DRIVERFILES += %D%/arm-jtag-ew.c endif -if BUSPIRATE +if BUS_PIRATE DRIVERFILES += %D%/buspirate.c endif if REMOTE_BITBANG diff --git a/src/jtag/interfaces.c b/src/jtag/interfaces.c index c24ead8cd..67f0838e3 100644 --- a/src/jtag/interfaces.c +++ b/src/jtag/interfaces.c @@ -102,7 +102,7 @@ struct adapter_driver *adapter_drivers[] = { #if BUILD_ARMJTAGEW == 1 &armjtagew_adapter_driver, #endif -#if BUILD_BUSPIRATE == 1 +#if BUILD_BUS_PIRATE == 1 &buspirate_adapter_driver, #endif #if BUILD_REMOTE_BITBANG == 1 ----------------------------------------------------------------------- Summary of changes: configure.ac | 19 ++++++++----------- src/jtag/drivers/Makefile.am | 2 +- src/jtag/interfaces.c | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:49: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 c582cfbf758fdf188b02d8e57e0f57ce9c36663e (commit) from 8c739a45a042cf7a9b5bba48f0e20cbc3168ee73 (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 c582cfbf758fdf188b02d8e57e0f57ce9c36663e Author: Antonio Borneo <bor...@gm...> Date: Sun Nov 10 14:30:25 2024 +0100 driver: stlink: get adapter speed through adapter_get_speed_khz() The stlink driver, both in dapdirect and in HLA modes, pretends to store locally the value of the adapter speed in order to use it later-on during adapter initialization. It doesn't work in dapdirect mode since the code to store locally the value will not be executed until the adapter is already fully initialized. This cause an issue in dapdirect mode: - due to the local value, still kept at -1, the adapter will be initialized to the lowest clock speed (5 KHz on stlink v2 in SWD mode); - after the adapter initialization the framework will again set the speed with the value requested by the user. Some target, like nRF51822, only accepts JTAG/SWD speed in a defined range of frequencies. The initial speed of 5 KHz used by dapdirect can be out of range, making the target debug port not working. The adapter framework already stores the value of speed and makes it available through adapter_get_speed_khz(). Drop struct hl_interface_param::initial_interface_speed. Let the code to use adapter_get_speed_khz(). Change-Id: Ie11bf0234574f2a9180d3d3a16efb78e08dfcd86 Reported-by: Andrzej SierżÄga <as...@gm...> Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8574 Reviewed-by: Andrzej SierżÄga <as...@gm...> Tested-by: jenkins diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c index 0385e4d85..d77f28b0f 100644 --- a/src/jtag/drivers/stlink_usb.c +++ b/src/jtag/drivers/stlink_usb.c @@ -3781,7 +3781,7 @@ static int stlink_open(struct hl_interface_param *param, enum stlink_mode mode, } /* initialize the debug hardware */ - err = stlink_usb_init_mode(h, param->connect_under_reset, param->initial_interface_speed); + err = stlink_usb_init_mode(h, param->connect_under_reset, adapter_get_speed_khz()); if (err != ERROR_OK) { LOG_ERROR("init mode failed (unable to connect to the target)"); @@ -5174,7 +5174,6 @@ static int stlink_dap_speed(int speed) return ERROR_JTAG_NOT_IMPLEMENTED; } - stlink_dap_param.initial_interface_speed = speed; stlink_speed(stlink_dap_handle, speed, false); return ERROR_OK; } diff --git a/src/jtag/hla/hla_interface.c b/src/jtag/hla/hla_interface.c index e826f7910..96862b0d0 100644 --- a/src/jtag/hla/hla_interface.c +++ b/src/jtag/hla/hla_interface.c @@ -30,7 +30,6 @@ static struct hl_interface hl_if = { .pid = { 0 }, .transport = HL_TRANSPORT_UNKNOWN, .connect_under_reset = false, - .initial_interface_speed = -1, .use_stlink_tcp = false, .stlink_tcp_port = 7184, }, @@ -165,11 +164,8 @@ static int hl_interface_speed(int speed) if (!hl_if.layout->api->speed) return ERROR_OK; - if (!hl_if.handle) { - /* pass speed as initial param as interface not open yet */ - hl_if.param.initial_interface_speed = speed; + if (!hl_if.handle) return ERROR_OK; - } hl_if.layout->api->speed(hl_if.handle, speed, false); diff --git a/src/jtag/hla/hla_interface.h b/src/jtag/hla/hla_interface.h index c95638b92..f1550d991 100644 --- a/src/jtag/hla/hla_interface.h +++ b/src/jtag/hla/hla_interface.h @@ -31,8 +31,6 @@ struct hl_interface_param { enum hl_transports transport; /** */ bool connect_under_reset; - /** Initial interface clock clock speed */ - int initial_interface_speed; /** */ bool use_stlink_tcp; /** */ ----------------------------------------------------------------------- Summary of changes: src/jtag/drivers/stlink_usb.c | 3 +-- src/jtag/hla/hla_interface.c | 6 +----- src/jtag/hla/hla_interface.h | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:49: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 8c739a45a042cf7a9b5bba48f0e20cbc3168ee73 (commit) from 61fbcbeca83452f3a035f3f4982703096fb5d8ef (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 8c739a45a042cf7a9b5bba48f0e20cbc3168ee73 Author: Marc Schink <de...@za...> Date: Mon Oct 21 10:39:28 2024 +0200 helper/jim-nvp.h: Rework 'isconfigure' variable Change the variable name to 'is_configure' to be compatible with the coding style and use 'bool' as data type. Change-Id: I8609f9807c8bd14eaf6c93acf63fd51b55c9bbbb Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8573 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/helper/jim-nvp.h b/src/helper/jim-nvp.h index 11824cabf..45af6c867 100644 --- a/src/helper/jim-nvp.h +++ b/src/helper/jim-nvp.h @@ -19,6 +19,7 @@ #ifndef OPENOCD_HELPER_JIM_NVP_H #define OPENOCD_HELPER_JIM_NVP_H +#include <stdbool.h> #include <jim.h> /** Name Value Pairs, aka: NVP @@ -136,7 +137,7 @@ struct jim_getopt_info { Jim_Interp *interp; int argc; Jim_Obj *const *argv; - int isconfigure; /* non-zero if configure */ + bool is_configure; }; /** GetOpt - how to. diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 54e31e426..cc0fecebe 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -103,7 +103,7 @@ int rtos_create(struct jim_getopt_info *goi, struct target *target) Jim_Obj *res; int e; - if (!goi->isconfigure && goi->argc != 0) { + if (!goi->is_configure && goi->argc != 0) { Jim_WrongNumArgs(goi->interp, goi->argc, goi->argv, "NO PARAMS"); return JIM_ERR; } diff --git a/src/target/aarch64.c b/src/target/aarch64.c index f0d486f58..9f122070a 100644 --- a/src/target/aarch64.c +++ b/src/target/aarch64.c @@ -2940,7 +2940,7 @@ static int aarch64_jim_configure(struct target *target, struct jim_getopt_info * switch (n->value) { case CFG_CTI: { - if (goi->isconfigure) { + if (goi->is_configure) { Jim_Obj *o_cti; struct arm_cti *cti; e = jim_getopt_obj(goi, &o_cti); diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index eaaa209b9..0c7633bea 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -2359,7 +2359,7 @@ static int adiv5_jim_spot_configure(struct jim_getopt_info *goi, switch (n->value) { case CFG_DAP: - if (goi->isconfigure) { + if (goi->is_configure) { Jim_Obj *o_t; struct adiv5_dap *dap; e = jim_getopt_obj(goi, &o_t); @@ -2388,7 +2388,7 @@ static int adiv5_jim_spot_configure(struct jim_getopt_info *goi, break; case CFG_AP_NUM: - if (goi->isconfigure) { + if (goi->is_configure) { /* jim_wide is a signed 64 bits int, ap_num is unsigned with max 52 bits */ jim_wide ap_num; e = jim_getopt_wide(goi, &ap_num); @@ -2415,7 +2415,7 @@ static int adiv5_jim_spot_configure(struct jim_getopt_info *goi, LOG_WARNING("DEPRECATED! use \'-baseaddr' not \'-ctibase\'"); /* fall through */ case CFG_BASEADDR: - if (goi->isconfigure) { + if (goi->is_configure) { jim_wide base; e = jim_getopt_wide(goi, &base); if (e != JIM_OK) diff --git a/src/target/arm_cti.c b/src/target/arm_cti.c index 97d1fb34b..88eec832e 100644 --- a/src/target/arm_cti.c +++ b/src/target/arm_cti.c @@ -468,7 +468,7 @@ static int cti_create(struct jim_getopt_info *goi) adiv5_mem_ap_spot_init(&cti->spot); /* Do the rest as "configure" options */ - goi->isconfigure = 1; + goi->is_configure = true; e = cti_configure(goi, cti); if (e != JIM_OK) { free(cti); diff --git a/src/target/arm_tpiu_swo.c b/src/target/arm_tpiu_swo.c index 55a977844..c14fd5fc8 100644 --- a/src/target/arm_tpiu_swo.c +++ b/src/target/arm_tpiu_swo.c @@ -358,7 +358,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s { assert(obj); - if (goi->isconfigure && obj->enabled) { + if (goi->is_configure && obj->enabled) { Jim_SetResultFormatted(goi->interp, "Cannot configure TPIU/SWO; %s is enabled!", obj->name); return JIM_ERR; } @@ -382,7 +382,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s switch (n->value) { case CFG_PORT_WIDTH: - if (goi->isconfigure) { + if (goi->is_configure) { jim_wide port_width; e = jim_getopt_wide(goi, &port_width); if (e != JIM_OK) @@ -399,7 +399,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s } break; case CFG_PROTOCOL: - if (goi->isconfigure) { + if (goi->is_configure) { struct jim_nvp *p; e = jim_getopt_nvp(goi, nvp_arm_tpiu_swo_protocol_opts, &p); if (e != JIM_OK) @@ -418,7 +418,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s } break; case CFG_FORMATTER: - if (goi->isconfigure) { + if (goi->is_configure) { struct jim_nvp *p; e = jim_getopt_nvp(goi, nvp_arm_tpiu_swo_bool_opts, &p); if (e != JIM_OK) @@ -437,7 +437,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s } break; case CFG_TRACECLKIN: - if (goi->isconfigure) { + if (goi->is_configure) { jim_wide clk; e = jim_getopt_wide(goi, &clk); if (e != JIM_OK) @@ -450,7 +450,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s } break; case CFG_BITRATE: - if (goi->isconfigure) { + if (goi->is_configure) { jim_wide clk; e = jim_getopt_wide(goi, &clk); if (e != JIM_OK) @@ -463,7 +463,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s } break; case CFG_OUTFILE: - if (goi->isconfigure) { + if (goi->is_configure) { const char *s; e = jim_getopt_string(goi, &s, NULL); if (e != JIM_OK) @@ -491,7 +491,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s } break; case CFG_EVENT: - if (goi->isconfigure) { + if (goi->is_configure) { if (goi->argc < 2) { Jim_WrongNumArgs(goi->interp, goi->argc, goi->argv, "-event ?event-name? ?EVENT-BODY?"); return JIM_ERR; @@ -521,7 +521,7 @@ static int arm_tpiu_swo_configure(struct jim_getopt_info *goi, struct arm_tpiu_s ea = ea->next; } - if (goi->isconfigure) { + if (goi->is_configure) { if (!ea) { ea = calloc(1, sizeof(*ea)); if (!ea) { @@ -560,7 +560,7 @@ static int jim_arm_tpiu_swo_configure(Jim_Interp *interp, int argc, Jim_Obj * co struct jim_getopt_info goi; jim_getopt_setup(&goi, interp, argc - 1, argv + 1); - goi.isconfigure = !strcmp(c->name, "configure"); + goi.is_configure = !strcmp(c->name, "configure"); if (goi.argc < 1) { Jim_WrongNumArgs(goi.interp, goi.argc, goi.argv, "missing: -option ..."); @@ -977,7 +977,7 @@ static int jim_arm_tpiu_swo_create(Jim_Interp *interp, int argc, Jim_Obj *const } /* Do the rest as "configure" options */ - goi.isconfigure = 1; + goi.is_configure = true; int e = arm_tpiu_swo_configure(&goi, obj); if (e != JIM_OK) goto err_exit; diff --git a/src/target/target.c b/src/target/target.c index 49611dfb4..6c474899a 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -4937,7 +4937,7 @@ static int target_configure(struct jim_getopt_info *goi, struct target *target) switch (n->value) { case TCFG_TYPE: /* not settable */ - if (goi->isconfigure) { + if (goi->is_configure) { Jim_SetResultFormatted(goi->interp, "not settable: %s", n->name); return JIM_ERR; @@ -4966,7 +4966,7 @@ no_params: return e; } - if (goi->isconfigure) { + if (goi->is_configure) { if (goi->argc != 1) { Jim_WrongNumArgs(goi->interp, goi->argc, goi->argv, "-event ?event-name? ?EVENT-BODY?"); return JIM_ERR; @@ -4989,7 +4989,7 @@ no_params: teap = teap->next; } - if (goi->isconfigure) { + if (goi->is_configure) { /* START_DEPRECATED_TPIU */ if (n->value == TARGET_EVENT_TRACE_CONFIG) LOG_INFO("DEPRECATED target event %s; use TPIU events {pre,post}-{enable,disable}", n->name); @@ -5037,7 +5037,7 @@ no_params: break; case TCFG_WORK_AREA_VIRT: - if (goi->isconfigure) { + if (goi->is_configure) { target_free_all_working_areas(target); e = jim_getopt_wide(goi, &w); if (e != JIM_OK) @@ -5053,7 +5053,7 @@ no_params: break; case TCFG_WORK_AREA_PHYS: - if (goi->isconfigure) { + if (goi->is_configure) { target_free_all_working_areas(target); e = jim_getopt_wide(goi, &w); if (e != JIM_OK) @@ -5069,7 +5069,7 @@ no_params: break; case TCFG_WORK_AREA_SIZE: - if (goi->isconfigure) { + if (goi->is_configure) { target_free_all_working_areas(target); e = jim_getopt_wide(goi, &w); if (e != JIM_OK) @@ -5084,7 +5084,7 @@ no_params: break; case TCFG_WORK_AREA_BACKUP: - if (goi->isconfigure) { + if (goi->is_configure) { target_free_all_working_areas(target); e = jim_getopt_wide(goi, &w); if (e != JIM_OK) @@ -5101,7 +5101,7 @@ no_params: case TCFG_ENDIAN: - if (goi->isconfigure) { + if (goi->is_configure) { e = jim_getopt_nvp(goi, nvp_target_endian, &n); if (e != JIM_OK) { jim_getopt_nvp_unknown(goi, nvp_target_endian, 1); @@ -5122,7 +5122,7 @@ no_params: break; case TCFG_COREID: - if (goi->isconfigure) { + if (goi->is_configure) { e = jim_getopt_wide(goi, &w); if (e != JIM_OK) return e; @@ -5136,7 +5136,7 @@ no_params: break; case TCFG_CHAIN_POSITION: - if (goi->isconfigure) { + if (goi->is_configure) { Jim_Obj *o_t; struct jtag_tap *tap; @@ -5163,7 +5163,7 @@ no_params: /* loop for more e*/ break; case TCFG_DBGBASE: - if (goi->isconfigure) { + if (goi->is_configure) { e = jim_getopt_wide(goi, &w); if (e != JIM_OK) return e; @@ -5193,7 +5193,7 @@ no_params: break; case TCFG_GDB_PORT: - if (goi->isconfigure) { + if (goi->is_configure) { struct command_context *cmd_ctx = current_command_context(goi->interp); if (cmd_ctx->mode != COMMAND_CONFIG) { Jim_SetResultString(goi->interp, "-gdb-port must be configured before 'init'", -1); @@ -5215,7 +5215,7 @@ no_params: break; case TCFG_GDB_MAX_CONNECTIONS: - if (goi->isconfigure) { + if (goi->is_configure) { struct command_context *cmd_ctx = current_command_context(goi->interp); if (cmd_ctx->mode != COMMAND_CONFIG) { Jim_SetResultString(goi->interp, "-gdb-max-connections must be configured before 'init'", -1); @@ -5246,7 +5246,7 @@ static int jim_target_configure(Jim_Interp *interp, int argc, Jim_Obj * const *a struct jim_getopt_info goi; jim_getopt_setup(&goi, interp, argc - 1, argv + 1); - goi.isconfigure = !strcmp(c->name, "configure"); + goi.is_configure = !strcmp(c->name, "configure"); if (goi.argc < 1) { Jim_WrongNumArgs(goi.interp, goi.argc, goi.argv, "missing: -option ..."); @@ -5823,7 +5823,7 @@ static int target_create(struct jim_getopt_info *goi) target->gdb_max_connections = 1; /* Do the rest as "configure" options */ - goi->isconfigure = 1; + goi->is_configure = true; e = target_configure(goi, target); if (e == JIM_OK) { ----------------------------------------------------------------------- Summary of changes: src/helper/jim-nvp.h | 3 ++- src/rtos/rtos.c | 2 +- src/target/aarch64.c | 2 +- src/target/arm_adi_v5.c | 6 +++--- src/target/arm_cti.c | 2 +- src/target/arm_tpiu_swo.c | 22 +++++++++++----------- src/target/target.c | 30 +++++++++++++++--------------- 7 files changed, 34 insertions(+), 33 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: openocd-gerrit <ope...@us...> - 2024-11-23 13:48: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 61fbcbeca83452f3a035f3f4982703096fb5d8ef (commit) from b04a58e3fcbfd9a701126473279fa17d37f23784 (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 61fbcbeca83452f3a035f3f4982703096fb5d8ef Author: Antonio Borneo <bor...@gm...> Date: Sat Nov 9 19:21:30 2024 +0100 semihosting: make local functions static The functions: - semihosting_opcode_to_str(); - semihosting_write_fields(); - semihosting_set_field(); are not referenced outside the file. Make them static. Change-Id: Ia8d35554673145fdfe0e501543eb18919863039f Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8551 Tested-by: jenkins diff --git a/src/target/semihosting_common.c b/src/target/semihosting_common.c index 1eb195712..ffcd3aafd 100644 --- a/src/target/semihosting_common.c +++ b/src/target/semihosting_common.c @@ -92,6 +92,8 @@ static int semihosting_common_fileio_info(struct target *target, struct gdb_fileio_info *fileio_info); static int semihosting_common_fileio_end(struct target *target, int result, int fileio_errno, bool ctrl_c); +static void semihosting_set_field(struct target *target, uint64_t value, size_t index, uint8_t *fields); +static int semihosting_write_fields(struct target *target, size_t number, uint8_t *fields); /** * Initialize common semihosting support. @@ -298,7 +300,12 @@ static inline int semihosting_getchar(struct semihosting *semihosting, int fd) */ static char *semihosting_user_op_params; -const char *semihosting_opcode_to_str(const uint64_t opcode) +/** + * @brief Convert the syscall opcode to a human-readable string + * @param[in] opcode Syscall opcode + * @return String representation of syscall opcode + */ +static const char *semihosting_opcode_to_str(const uint64_t opcode) { switch (opcode) { case SEMIHOSTING_SYS_CLOSE: @@ -1729,8 +1736,7 @@ int semihosting_read_fields(struct target *target, size_t number, /** * Write all fields of a command from buffer to target. */ -int semihosting_write_fields(struct target *target, size_t number, - uint8_t *fields) +static int semihosting_write_fields(struct target *target, size_t number, uint8_t *fields) { struct semihosting *semihosting = target->semihosting; /* Use 4-byte multiples to trigger fast memory access. */ @@ -1754,9 +1760,7 @@ uint64_t semihosting_get_field(struct target *target, size_t index, /** * Store a field in the buffer, considering register size and endianness. */ -void semihosting_set_field(struct target *target, uint64_t value, - size_t index, - uint8_t *fields) +static void semihosting_set_field(struct target *target, uint64_t value, size_t index, uint8_t *fields) { struct semihosting *semihosting = target->semihosting; if (semihosting->word_size_bytes == 8) diff --git a/src/target/semihosting_common.h b/src/target/semihosting_common.h index a1848b488..1821ca4e2 100644 --- a/src/target/semihosting_common.h +++ b/src/target/semihosting_common.h @@ -188,13 +188,6 @@ struct semihosting { int (*post_result)(struct target *target); }; -/** - * @brief Convert the syscall opcode to a human-readable string - * @param[in] opcode Syscall opcode - * @return String representation of syscall opcode - */ -const char *semihosting_opcode_to_str(uint64_t opcode); - int semihosting_common_init(struct target *target, void *setup, void *post_result); int semihosting_common(struct target *target); @@ -202,13 +195,8 @@ int semihosting_common(struct target *target); /* utility functions which may also be used by semihosting extensions (custom vendor-defined syscalls) */ int semihosting_read_fields(struct target *target, size_t number, uint8_t *fields); -int semihosting_write_fields(struct target *target, size_t number, - uint8_t *fields); uint64_t semihosting_get_field(struct target *target, size_t index, uint8_t *fields); -void semihosting_set_field(struct target *target, uint64_t value, - size_t index, - uint8_t *fields); extern const struct command_registration semihosting_common_handlers[]; ----------------------------------------------------------------------- Summary of changes: src/target/semihosting_common.c | 16 ++++++++++------ src/target/semihosting_common.h | 12 ------------ 2 files changed, 10 insertions(+), 18 deletions(-) hooks/post-receive -- Main OpenOCD repository |