aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-04-25flash/nor/rp2040: Fix up ROM table lookup for RP2350 A2Luke Wren1-2/+2
which has 16-bit well-known pointers. Change-Id: Ia0838a0b062f73a9c5751abb48f1b4d55100bd1d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: Luke Wren <luke@raspberrypi.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8443 Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com> Tested-by: jenkins
2025-04-25flash/nor/rp2040: RP2350 A1 changesgraham sanderson1-7/+4
TV: cortex_m.c changes removed. Change-Id: I85830f2d64f8afb86690737f9ae70dde5e6143e1 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: graham sanderson <graham.sanderson@raspberrypi.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8442 Tested-by: jenkins
2025-04-25flash/nor/rp2040: Add RISC-V ROM algorithm batch call supportLuke Wren1-277/+599
And add support for A1 ROM table. TV: cortex_m smp change removed. Fixed style problems. 'uint' replaced by unsigned int Change-Id: Iff2710fa0734dc7074d8d490d8fae43dc27c0c2a Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: Luke Wren <wren6991@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8441 Tested-by: jenkins
2025-04-25flash/nor/rp2040: add RP2350 supportgraham sanderson1-209/+274
TV: Extracted RP2040/2350 flash driver part only. Fixed style problems. Change-Id: I88a7d5aa0a239ae93d72bd5671686b19c6ca11ad Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Signed-off-by: graham sanderson <graham.sanderson@raspberrypi.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8440 Tested-by: jenkins
2025-04-19flash: stellaris: fix deprecated commandAntonio Borneo1-1/+1
The driver directly runs a TCL command that has been renamed with commit 4d99e77419e3 ("jtag/hla: Restructure commands"), while the original name has been deprecated. Update the TCL command to the new syntax. Change-Id: I2fc9ef9a209bae1d78951e253d54164b2ac00cdd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 4d99e77419e3 ("jtag/hla: Restructure commands") Reviewed-on: https://review.openocd.org/c/openocd/+/8832 Reviewed-by: zapb <dev@zapb.de> Tested-by: jenkins
2025-04-19tcl/target: Add RCPU support for Spacemit K1Junhui Liu1-15/+35
Add support for the Real-Time CPU (RCPU) of K1, which is a 32-bit RISC-V N308 High-Efficiency Processor Core designed by Nuclei System Technology Co. Ltd. The JTAG interface can be configured to connect to either X60s or RCPU processors. To enable JTAG for RCPU, set TARGET to "rcpu". For example: openocd -c "set TARGET rcpu" -f interface/cmsis-dap.cfg \ -f target/spacemit-k1.cfg Change-Id: I9cd62fac332137afac17efa52702818de8f0b6f5 Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech> Reviewed-on: https://review.openocd.org/c/openocd/+/8821 Reviewed-by: liangzhen <zhen.liang@spacemit.com> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-04-19flash/stm32l4x: support STM32C05/09x devicesHAOUES Ahmed2-0/+36
STM32C05/09x devices are similar to STM32C03/07x devices Change-Id: I77c803356c32f06699c14622828585609c90a136 Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8618 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-04-19target: drop unused parameter to target_create()Antonio Borneo36-42/+40
The parameter Jim_Interp to the target API target_create() is not used by any target. Drop it. Change-Id: I67c492078a6c808db974505f9e297c45165f64d0 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8831 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-04-19target: rewrite function target_configure() as COMMAND_HELPERAntonio Borneo1-209/+225
The function target_configure() is used by the commands 'target create', 'configure' and 'cget', already rewritten as COMMAND_HANDLER. Rewrite the common function as COMMAND_HELPER. While there: - fix the check on arguments, even if it should be coded better; - keep jimtcl code for target_type::target_jim_configure() and for rtos_create(); these would be rewritten later on. Change-Id: I7e5699ca6d124e34d3b2199714e3ce584bfcce80 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8829 Tested-by: jenkins
2025-04-19target: rewrite commands 'configure' and 'cget' as COMMAND_HANDLERAntonio Borneo1-15/+21
Rewrite only the command, but still use the old jimtcl specific code shared with 'target create'. Change-Id: Ie5e1c9eb237531121c2d143d1732cf281dfdc9ff Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8828 Tested-by: jenkins
2025-04-19target: rewrite command 'target create' as COMMAND_HANDLERAntonio Borneo1-82/+65
Rewrite only the command, but still use the old jimtcl specific code shared with 'configure' and 'cget'. Change-Id: I7cf220e494f0ebbf123f8075b1feb9251fd7f569 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8827 Tested-by: jenkins
2025-04-19target: rewrite command 'invoke-event' as COMMAND_HANDLERAntonio Borneo1-22/+18
The command shares with command 'target create' the struct jim_nvp nvp_target_event[] - Convert the 'struct jim_nvp' in 'struct nvp'. - Create an alias 'struct jim_nvp' to decouple the commands 'invoke-event' and 'target create', abusing the fact that the actual layout of the two struct's type is the same. This alias will be dropped in a following change. - Rewrite the command 'invoke-event' and the helper function target_event_name(). Change-Id: I537732fe4c08042cc02bcd0f72142254d7968fa6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8826 Tested-by: jenkins
2025-04-19target: don't free working areas during 'configure -chain-position'Antonio Borneo1-1/+0
Since commit ef1cfb23947b ("Duane Ellis: "target as an [tcl] object" feature.") merged in 2008, the commands: $target_name configure -chain-position ... target create ... -chain-position ... cause the allocated working area to be freed. There is no reason for this, it is probably caused by an incorrect copy/paste from the author. Drop the call to target_free_all_working_areas(). Change-Id: I61a9303afe7fee6953669218330635c0b965b20d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8825 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2025-04-19list: silent scan-build false positiveAntonio Borneo1-0/+4
With commit c023534e7b6f ("target: use list for target events") scan build incorrectly states that list_add() would be called with the field 'next' of the parameter 'head' (thus 'head->next') set to NULL. Then, list_add() would call linux_list_add() with the parameter 'next' set to NULL that will cause a NULL dereference. While this can really happen with broken code, it's not the case with the code from the change above. Add assert() in linux_list_add() to silent scan build on this false positive and to detect future incorrect use of the list. Change-Id: Iec7f3d70237312b646ac58f76ecaab2fa25eab41 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8824 Tested-by: jenkins
2025-04-19command: rewrite command 'capture' as COMMAND_HANDLERAntonio Borneo1-79/+34
While there, use Jim_EvalObj() to execute the subcommand, so any error will correctly report the TCL file and the line number that have originated the error, instead of the silly: > capture {bogus command} command.c:703: Error: invalid command name "bogus" at file "command.c", line 703 Change-Id: Ic75a6146d6cedf49e808d98501fa1a7d4235b58a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8587 Tested-by: jenkins
2025-04-19command: rewrite command 'command mode' as COMMAND_HANDLERAntonio Borneo1-18/+14
Another step to drop jim_handler. Change-Id: I85cb567386a5aceb36aa273f8b66cbfd4a637c3f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8586 Tested-by: jenkins Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2025-04-16Merge pull request #1244 from en-sc/en-sc/from_upstreamEvgeniy Naydanov41-400/+1949
Merge up to 6834f022b96fb1c7f5829166578e01a0ac223cb0 from upstream
2025-04-07Merge up to 6834f022b96fb1c7f5829166578e01a0ac223cb0 from upstreamEvgeniy Naydanov41-400/+1949
Change-Id: Idaef3f5911bde237bd47d1d921acc186a06ea8f8
2025-04-07Revert "enable remote_bitbang by default (#498)"Evgeniy Naydanov1-1/+1
This reverts commit d076d9bbd7bbb7d865dc49ce1285eb80bd33d8fb ("enable remote_bitbang by default"). The intention is to replace it with commit 9eb2426411aa0c1c13f5fc59801ac3cb3319f476 ("configure.ac: show the Remote Bitbang driver in the config summary") Change-Id: If88816b9c3e69880fa2eac11dcb661031050d815 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2025-04-05Makefile.am: Use SOURCE_DATE_EPOCH environment variableSofiane HAMAM1-1/+4
This package defines PKGBLDDATE as build timestamp which makes it non reproducible. Use SOURCE_DATE_EPOCH if it is found, otherwise use build timestamp. Following best practices, see : https://reproducible-builds.org/docs/source-date-epoch/ The patch is BSD compatible too. Change-Id: I26c1a00f2e8059ae31fe72a794b5962af5a84f44 Co-developed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Sofiane HAMAM <sofiane.hamam@smile.fr> Reviewed-on: https://review.openocd.org/c/openocd/+/8619 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: jenkins
2025-04-05configure.ac: show the rshim adapter in the config summaryR. Diez1-14/+15
Also enable this adapter by default (auto). Change-Id: Ic302041ecb9e88ca58b03f9675fa92fb3d558821 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8811 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-04-05configure.ac: show the Remote Bitbang driver in the config summaryR. Diez1-12/+10
Also enable this driver by default (auto). Change-Id: I112d6c8c0796d0dc464651feb1f7f81fa8b93910 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8817 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-04-05target: remove events that are set to empty stringAntonio Borneo2-1/+12
Current code allows replacing the body of an existing event, but it doesn't provides a way to remove it. Replacing the event with an empty string makes the event still present and visible through $target_name eventlist The presence of empty events makes more complex checking for the event not set or set to empty. Remove the event when set to empty string. While there, add 'Jim_Length' to the list of allowed CamelCase symbols, avoiding the associated checkpatch error. Change-Id: I1ec2e1a71d298a0eba0b6863902645bcc6c4cb09 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8814 Tested-by: jenkins
2025-04-05target: use list for target eventsAntonio Borneo2-24/+26
To simplify removing an event when it's set to an empty string, switch event list from hardcoded simply linked list to helper's double linked list. While there, move the declaration of struct target_event_action in 'target.c' as it is not anymore visible outside. Change-Id: I799754c80055dc6d22db55aca483757e833714ff Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8813 Tested-by: jenkins
2025-04-05target: fix memory leak in handle_target_write_memory()Antonio Borneo1-0/+1
Commit f55ec6d44922 ("target: rewrite command 'write_memory' as COMMAND_HANDLER") adds a new return statement without freeing the allocated buffer. Add the needed free(). Fixes: f55ec6d44922 ("target: rewrite command 'write_memory' as COMMAND_HANDLER") Change-Id: I676d658118b32f4d7cc71eda3436bb52f1966cd8 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8822 Tested-by: jenkins
2025-04-01tcl/target/nordic/nrf54l: minor correctionsTomas Vanek1-3/+20
Add SWD multidrop setting. Fix the name of AP #1 to AUX-AP Set AUX-AP CSW Prot bit[0] to make RISC-V debug accessible on AUX-AP. Change-Id: I496e07acfe90dd858e4403176a8330d8c1a0b560 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8752 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
2025-03-31Merge pull request #1222 from sobuch/fix_maskisr_change_unrelated_mstatus_bitsEvgeniy Naydanov2-44/+27
target/riscv: only update mstatus.*ie bits with set_maskisr steponly
2025-03-29target: rewrite command 'get_reg' as COMMAND_HANDLERAntonio Borneo1-55/+26
Print one register per line. Repeated registers will be printed each time. While there, fix the 'usage' string. Change-Id: I4eb21696705bdf15cd2cb7a4a9caa41f9ffdbf64 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8583 Tested-by: jenkins Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2025-03-29target/aarch64: Cleanup on exitAdrien Grassein1-0/+8
Restore target configuration on exit so that OpenOCD get correct values when restarting. Change-Id: I8cbba1fdae1d3c4a580197b7a97691443780ed06 Signed-off-by: Adrien Grassein <agrassein@nanoxplore.com> Signed-off-by: Adrien Charruel <acharruel@nanoxplore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8654 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-03-29tcl/target: Add Renesas R-Car Gen4 R8A779G0 V4H and R8A779H0 V4M targetsMarek Vasut1-7/+22
Add support for Renesas R-Car Gen4 R8A779G0 V4H and R8A779H0 V4M SoCs. Those contain 4x CA76 and 3x CR52 cores. Change-Id: I4a701f0fec4dd574fc099a221d464ccc55db6252 Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8807 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-03-29target: drop last instances of 'target->cmd_name'Antonio Borneo4-16/+15
The helper function 'target_name()' or, better, the log functions 'LOG_TARGET_xxx(target, ...)' should be used in place of taking the target name directly from 'target->cmd_name'. Replace the remaining instances in the code. While there: - address some indentation, - drop trailing punctuation in log message, - replace one LOG WARNING with LOG_TARGET_WARNING. Change-Id: Ie6cf4c174ffe91b975c983e4697c735766267041 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8806 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
2025-03-29target/armv8: Handle instruction cache invalidateAdrien Grassein4-0/+68
Some armv8 target have separate i-cache and d-cache. The actual code only handles the flush of the d-cache. Change-Id: I61a223b43c71646bbbed8fa63825360c67700988 Signed-off-by: Adrien Grassein <agrassein@nanoxplore.com> Signed-off-by: Adrien Charruel <acharruel@nanoxplore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8655 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-03-29flash/stm32l4x: support STM32U5F/U5Gx devicesHAOUES Ahmed2-3/+21
STM32U5F/U5Gx devices are similar to STM32U59/U5Ax devices while at there update STM32U5xx revisions Change-Id: I4f1c302cc91739a89cf4869401e9f5015dbc72b9 Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8616 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-03-29command: factorize jim_command_mode()Antonio Borneo1-42/+36
During 'help' dump, to determine the mode (e.g. COMMAND_CONFIG) of a command, the current code executes the OpenOCD TCL command "command mode", while it could directly call the implementation of the TCL command above. Factorize jim_command_mode() and call the inner implementation instead of executing "command mode". Change-Id: Id8c33d0ed1373b5744dcc3ac354c3e0a88576f75 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8585 Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Tested-by: jenkins
2025-03-29target: rewrite command 'write_memory' as COMMAND_HANDLERAntonio Borneo1-52/+38
While there: - drop the command name from the error messages; - check the returned value from Jim_GetWide() to detect incorrect numeric values. Change-Id: I399402ac11b6d459f1771e59e44210aef3e2a637 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8582 Tested-by: jenkins Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2025-03-29target: read_memory: drop command name from error messagesAntonio Borneo1-4/+4
The error message should not report the command name as it should be already clear from the context. Change-Id: I219e31be808bf6ff1924ce60f3025fb48ed7b125 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8803 Tested-by: jenkins
2025-03-29helper: command: return correct error on command 'echo'Antonio Borneo1-1/+1
In case of incorrect syntax, return ERROR_COMMAND_SYNTAX_ERROR so the command framework will print the usage string. Change-Id: I348debc77f470551d54fa77b4da780a48ff539c0 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8802 Tested-by: jenkins
2025-03-28Merge pull request #1235 from fk-sc/fk-sc/abstract-cmd-cacheEvgeniy Naydanov1-121/+154
target/riscv: implement abstract command cache
2025-03-25target/riscv: implement abstract command cache Implemented cache of ↵Farid Khaydari1-121/+154
unsupported abstract commands. It's purpose is to replace set of caching variables to one. So this commit provides one ac_not_supported_cache instead of abstract_read_csr_supported, abstract_write_csr_supported, abstract_read_fpr_supported, abstract_write_fpr_supported, has_aampostincrement. Dropped check for buggy aampostincrement Fixes #1232 Change-Id: I9690d9d79e3d1f593b63740b989074dcf0285637 Signed-off-by: Farid Khaydari <f.khaydari@syntacore.com>
2025-03-20Merge pull request #1240 from en-sc/en-sc/ebreak-cfg-updateEvgeniy Naydanov1-1/+4
target/riscv: avoid `config` modification on `jim_getopt_obj()` failure
2025-03-17Merge pull request #1221 from aap-sc/aap-sc/expose_csr_fixupEvgeniy Naydanov1-2/+2
fix expose_csr for CSR with address "0"
2025-03-17Merge pull request #1236 from en-sc/en-sc/from_upstreamEvgeniy Naydanov62-393/+661
Merge up to a168c634126e9e6bb95c6e68b2db5afbb099abf7 from upstream
2025-03-17Merge pull request #1228 from ↵Evgeniy Naydanov1-2/+10
JanMatCodasip/jm-codasip/riscv-011-dont-trigger-semihosting-before-examine riscv-011: Don't trigger semihosting before the target is examined
2025-03-15target/armv8: regularly send keep_alive packet.Adrien Grassein1-0/+1
Flushing all d-cache may be a long operation. We need to send keep_alive regularly to keep the connection alive. If not done a warning is emitted. Change-Id: I52c3ee9a9f9b8a1dc0b8d5439e8b71212f56165a Signed-off-by: Adrien Grassein <agrassein@nanoxplore.com> Signed-off-by: Adrien Charruel <acharruel@nanoxplore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8659 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-03-15tcl/ngultra: Use newly created armv8r targetAdrien Grassein1-3/+2
ngultra cores are cortex-r52, so use armv8r target now its created. Change-Id: If2d22593ab1e200ac15e7b883c70937acf1d2a59 Signed-off-by: Adrien Grassein <agrassein@nanoxplore.com> Signed-off-by: Adrien Charruel <acharruel@nanoxplore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8658 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-03-15adapter: simplify command 'adapter list'Antonio Borneo1-6/+11
The code of command 'adapter list' is called by command 'adapter driver' to list the available drivers in case of error. This dual possible entry points require a conditional check on the number of command line arguments, reducing the code readability. Split the command in a simpler code for the command 'adapter list' that only checks the command line, and move in a common helper the code that list the drivers. While there, fix the output and the comments to report 'adapter driver' instead of 'debug adapters'; we are not parsing the HW to know which adapter is present. Change-Id: I17538e86dc4a31a9589d404e49dcc65a29393390 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8672 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-03-15adapter: drop command 'adapter transports'Antonio Borneo4-82/+0
The commit 93f2afa45f4c ("initial "transport" framework") that added the transport framework in 2010 was overly optimistic on the possibility to dynamically add, at runtime, a new adapter and to specify with the command 'adapter transports' the list of the transports supported by the new adapter. Such feature has never become part of OpenOCD, and the command above has never become useful nor ever been used. Drop the command 'adapter transports' and its documentation. Drop the helper 'transport_list_parse', now unused. Change-Id: Ie3d71c74d068fba802839b116bb9bc9af77cc83d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8671 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2025-03-15doc: drop mention of not implemented SPI transportAntonio Borneo1-7/+0
The commit 93f2afa45f4c ("initial "transport" framework") adds a dedicated chapter in the documentation about a possible SPI transport for flashing. This transport has never been part of OpenOCD and should not be listed in the documentation. Drop the chapter. Change-Id: I9b406754399abda4dc7c2f8cf09dd47730a7e1d9 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8670 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2025-03-15helper/log: mark `fmt` argument of `alloc_vprintf()` as format stringEvgeniy Naydanov1-1/+2
Building on Ubuntu 22.04 with `-fsanitize=undefined` (GCC 12.3.0) results in an error: Checkpatch-ignore: COMMIT_LOG_LONG_LINE ``` In file included from /usr/include/stdio.h:894, from <openocd>/src/helper/system.h:23, from <openocd>/src/helper/replacements.h:18, from <openocd>/src/helper/log.c:20: In function ‘vsnprintf’, inlined from ‘alloc_vprintf’ at <openocd>/src/helper/log.c:347:8: /usr/include/x86_64-linux-gnu/bits/stdio2.h:85:10: error: null format string [-Werror=format-truncation=] 85 | return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 | __glibc_objsize (__s), __fmt, __ap); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ``` The error mentiones the call site `src/helper/log.c:347`. There `vsnprintf()` is called passing `fmt` as format string. To mitigate this, mark the format string with the corresponding attribute in `alloc_vprintf()` Change-Id: I91011490715998ef5a931c19c3c9d74a1a304e5d Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8764 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2025-03-15bcm2835gpio.c: change adapter init orderR. Diez1-4/+16
Make also sure that the struct bitbang_interface with callbacks that we pass to the bitbang driver is const. Change-Id: I954014f062d6d9185db45f5fbd2ad0b0955aab82 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8536 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>