aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2023-04-30pld: add support for efinix devicesDaniel Anselmi3-0/+221
Change-Id: Ie520e761c255ba1335d5aab9c6825f160a6151d9 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7288 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2023-04-30pld: add support for lattice certus devicesDaniel Anselmi5-8/+331
Change-Id: Ic50a724e5793000fca11f35ba848c2d317c3cbab Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7398 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-30pld: add support for lattice ecp5 devicesDaniel Anselmi5-1/+274
Change-Id: Ib2f0933da3abe7429abca86d6aaa50ad85ce72c7 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7397 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2023-04-30pld: add support for lattice ecp2 and ecp3 devicesDaniel Anselmi10-0/+960
Change-Id: I29c227c37be464f7ecc97a30d9cf3da1442e2b7f Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7396 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2023-04-30target/espressif: fix clang report on list useAntonio Borneo1-10/+6
It looks like a false positive. Scan-build considers as possible to: - have list_empty() return false; - list_for_each_safe() to not execute any loop, thus not assigning a non-NULL value to 'block'; - the NULL pointer 'block' is passed to list_del(). This is not possible because with list_empty(), the loop runs at least once. Rewrite the function to simplify the code and making it easier for scan-build to check it. This also drops an incorrect use of list_for_each_safe(), where the 'safe' version was not required. Change-Id: Ia8b1d221cf9df73db1196e3f51986023dcaf78eb Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 8d1dcf293a0c ("target/espressif: add application tracing functionality over JTAG") Reviewed-on: https://review.openocd.org/c/openocd/+/7608 Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com> Tested-by: jenkins
2023-04-30target/espressif: fix clang report on use of garbage valueAntonio Borneo1-2/+4
When the function xtensa_queue_dbg_reg_read() returns error, the array 'tmp' remains not initialized and scan-build complains while computing buf_get_u32() that: Result of operation is garbage or undefined Check the returned value of xtensa_queue_dbg_reg_read() and propagate it. Change-Id: If0aaad068b97ef0a76560e262d16429afd469585 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 8d1dcf293a0c ("target/espressif: add application tracing functionality over JTAG") Reviewed-on: https://review.openocd.org/c/openocd/+/7607 Tested-by: jenkins Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
2023-04-30src: fix clang15 compiler warningsErhan Kurubas4-12/+4
Below warnings are fixed. 1- A function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2- error: variable set but not used [-Werror,-Wunused-but-set-variable] Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I1cf14b8e5e3e732ebc9cacc4b1cb9009276a8ea9 Reviewed-on: https://review.openocd.org/c/openocd/+/7569 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2023-04-30server/ipdbg: add error checks after allocating memoryDaniel Anselmi1-1/+22
Change-Id: Icf18a855eb66d2b09789a9ee27f5fbc4cd9afc89 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7605 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-30aarch64: Add support for ARMv8-RJulien Massot3-4/+71
ARMv8-R platforms are similar to ARMv8-A regarding JTAG and most cpu registers. ARMv8-R doesn't has MMU but has MPU instead. ARMv8-R platforms can be AArch32 only such as Cortex-R52, or AArch64 capable like Cortex-R82. Signed-off-by: Julien Massot <julien.massot@iot.bzh> Change-Id: Ib086f71685d1e3704b396d478ae9399dd8a391e1 Reviewed-on: https://review.openocd.org/c/openocd/+/6843 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-30target:armv8: aarch32 do not try to restore same ELJulien Massot1-0/+3
While debugging a Cortex-R52 OpenOCD fail to restore context on line retval = dpm->instr_write_data_r0(dpm, ARMV8_MSR_GP_xPSR_T1(1, 0, 15), cpsr); which trigger this exception: aarch64.c:1206 aarch64_restore_context(): r8a779a0.r52 armv8_dpm.c:560 armv8_dpm_modeswitch(): restoring mode, cpsr = 0x0000011f 1262753 armv8_dpm.c:598 armv8_dpm_modeswitch(): target_el = 1, last_el = 1 armv8_dpm.c:611 armv8_dpm_modeswitch(): SPSR = 0x0000011f armv8_dpm.c:260 dpmv8_exec_opcode(): Opcode 0x8f00f390, DSCR.ERR=1, DSCR.EL=1 and finally OpenOCD doesn't succeed to restore the processor. This check 'dpm->last_el != target_el' exist for aarch64, so might be correct for aarch32 too. Signed-off-by: Julien Massot <julien.massot@iot.bzh> Change-Id: I41d1006233251dcaf6d69bda580488b204b7eb63 Reviewed-on: https://review.openocd.org/c/openocd/+/6807 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-14pld: move file sanity checks to pld.cDaniel Anselmi2-17/+17
Change-Id: Id64b1165b25a03634949ac22b8af16eb0e24c1fa Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7388 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-14rtos/linux.c: Fix Linux user space border checkpanciyan1-1/+1
Linux kernel and user space border is 0xc0000000 not 0xc000000 Signed-off-by: panciyan <panciyan@eswincomputing.com> Change-Id: I6b487cce62ac31737deca97d5f5f7bbc081280f4 Reviewed-on: https://review.openocd.org/c/openocd/+/7570 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-14src/server: Fix memory leak of reg_listpanciyan1-0/+1
memory leak of reg_list when local_list realloc fail. Signed-off-by: panciyan <panciyan@eswincomputing.com> Change-Id: I6b09137ecd132ab326205f5a575a38bcc82e8469 Reviewed-on: https://review.openocd.org/c/openocd/+/7566 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-14target/espressif: add application tracing functionality over JTAGErhan Kurubas10-0/+2059
This feature allows to transfer arbitrary data between host and ESP32 via JTAG. The main use cases: 1- Collecting application specific data 2- Lightweight logging to the host 3- System behaviour analysis with SEGGER SystemView 4- Source code coverage Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I95dee00ac22891fa326915a3fcac3c088cbb2afc Reviewed-on: https://review.openocd.org/c/openocd/+/7163 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-07helper/compiler fix build with gcc on MacOSAntonio Borneo1-2/+4
On MacOS libc includes files from MacOSX.sdk that define the macro #define __nonnull without arguments, causing compile error. Extend the existing check for clang on MacOS and undefine the macro for gcc too. Change-Id: Ic99de78348c6aa86561212a3aded9342e5d32e02 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Erhan Kurubas <erhan.kurubas@espressif.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7571 Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com> Tested-by: jenkins
2023-04-07ipdbg: whitespacesDaniel Anselmi1-9/+9
Change-Id: I9294c551cf2e795ad5e3e92dc3926c564424e067 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7399 Tested-by: jenkins Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-07helper/list: re-align with Linux kernel 6.3-rc1Antonio Borneo1-8/+58
Minor changes due to kernel switch to 100 char/line. Added four new functions. Silent checkpatch; we don't want to diverge from Linux reference code. Checkpatch-ignore: MACRO_ARG_REUSE, UNNECESSARY_PARENTHESES Checkpatch-ignore: MACRO_ARG_PRECEDENCE Change-Id: I1d2ff25bf3bab8cd0f5c9be55c7501795490ea75 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7568 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2023-04-07helper/list: remove unused hlist_*Antonio Borneo1-238/+1
The file list.h is taken from Linux and includes two similar implementation of double linked lists: - with single linked list's head (hlist_*), and - with double linked list's head (list_*). While the former offers a minor memory footprint improvement, keeping two implementations makes harder for newbie developers to approach them. So far only the latter implementation has been used and no new patches in gerrit is going to change that. Drop the support for lists with single linked head. It can be easily taken back from git history, if needed. Change-Id: I420e5de38ab755fdfbeb2115538c61818308ec2b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7567 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2023-04-07src/target/mips_m4k : add fast read methodFrançois LEGAL1-0/+73
Add the fast read method to speed up flash verification after programming. Works the same as fast write already implemented. Signed-off-by: François LEGAL <devel@thom.fr.eu.org> Change-Id: I74611a3542a88212f0483ec8ee368aba3d1f03c7 Reviewed-on: https://review.openocd.org/c/openocd/+/7564 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-04-07src/target/mips_m4k : fix condition on overlapping workspace data areaFrançois LEGAL1-2/+2
The condition to check if the workspace area (used by actual MIPS code executed on target) and data area (sandbox to put data to be read/written to/from flash) is wrong, thus preventing the use of FAST_* commands to program/verify FLASH. Signed-off-by: François LEGAL <devel@thom.fr.eu.org> Change-Id: Ic68424b7f42d44e550433a120093db5e7980fd56 Reviewed-on: https://review.openocd.org/c/openocd/+/7563 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2023-04-07rtos/FreeRTOS: some optimization of freertos_update_threads()Chao Du1-2/+1
1. update the rtos->thread_count in time, to make sure the allocated thread_name_str and extra_info_str could be freed by rtos_free_threadlist(). Otherwise the abnormal return may cause a memory leak. 2. remove a redundant assignment to threadid. Signed-off-by: Chao Du <duchao@eswincomputing.com> Change-Id: Ifabc59d501c925b3d6aec8b04b2856d2c31cc4e2 Reviewed-on: https://review.openocd.org/c/openocd/+/7549 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-03-28flash/nor: missing fileio_close.panciyan1-0/+1
If the file read abnormally, need to close it which was opened before. Signed-off-by: panciyan <panciyan@eswincomputing.com> Change-Id: I6142f154741dcd38088b7add2793219ee4dd2ae9 Reviewed-on: https://review.openocd.org/c/openocd/+/7546 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2023-03-25target: rewrite command 'target smp' as COMMAND_HANDLERAntonio Borneo1-21/+20
This also fixes an incorrect return ERROR_xx from a jim command, propagated from return value of rtos_smp_init(). Change-Id: Icf4893c00aabd8fadd60077c5e8a2e926f687518 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7511 Tested-by: jenkins
2023-03-25target: rewrite command 'target names' as COMMAND_HANDLERAntonio Borneo1-10/+9
Print one entry per line. While there add the mandatory 'usage' field. Change-Id: Ia832684817f3bdbfa4cb943cd97e3f9fb2605902 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7510 Tested-by: jenkins
2023-03-25target: rewrite command 'target types' as COMMAND_HANDLERAntonio Borneo1-12/+10
Print one entry per line. While there add the mandatory 'usage' field. Change-Id: I135556e12154e33fdbd0f71d89f6fe37c69813b7 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7509 Tested-by: jenkins
2023-03-25target: rewrite command 'target current' as COMMAND_HANDLERAntonio Borneo1-11/+9
While there add the mandatory 'usage' field. Change-Id: I3e5b826ca58f7ade30a443ada0cb4a9cd9ea35c2 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7508 Tested-by: jenkins
2023-03-25target: rewrite command 'arp_halt_gdb' as COMMAND_HANDLERAntonio Borneo1-12/+7
While there add the mandatory 'usage' field. Change-Id: I5389881dac25877dc32930ec36ee546e48ecc14d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7507 Tested-by: jenkins
2023-03-25target: rewrite command 'examine_deferred' as COMMAND_HANDLERAntonio Borneo1-7/+10
Check for empty command line, add the mandatory 'usage' field. Change-Id: I9c3606242ec3dda9026fe19222162a110e618bff Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7506 Tested-by: jenkins
2023-03-25target: rewrite command 'was_examined' as COMMAND_HANDLERAntonio Borneo1-7/+10
Check for empty command line, add the mandatory 'usage' field. Change-Id: I3f59448458fe01268bf5f4293aea5adcbd6d8279 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7505 Tested-by: jenkins
2023-03-25target: rewrite command 'target curstate' as COMMAND_HANDLERAntonio Borneo1-11/+13
While there, add the mandatory 'usage' field. Change-Id: Ibfda6f56a1450e2eb9ad3092d756de0778f4a092 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7504 Tested-by: jenkins
2023-03-25target: rewrite command 'read_memory' as COMMAND_HANDLERAntonio Borneo1-71/+39
While there, fix typo on 'exceeds'. In a following patch, the output could be formatted and split in N values per line to make it easier to read by humans. Change-Id: I295111a80934393011e46311f6cf6c13f2bdc0a3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7503 Tested-by: jenkins
2023-03-25target: arm_tpiu_swo: rewrite command 'tpiu init' as COMMAND_HANDLERAntonio Borneo1-10/+8
Change-Id: Iaaccfc62dd85267066a152c434f254d1b9a0c4f1 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7502 Tested-by: jenkins
2023-03-25target: arm_tpiu_swo: rewrite command 'tpiu names' as COMMAND_HANDLERAntonio Borneo1-12/+9
While there, format in a human readable way the output list by using one line per tpiu name. Change-Id: I937c92b6c1e92509cf8aa96be1517a51bc363600 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7501 Tested-by: jenkins
2023-03-25target: arm_tpiu_swo: rewrite command 'tpiu enable' as COMMAND_HANDLERAntonio Borneo1-49/+45
Change-Id: Ia600948b99a229ef0490b7f576df62f880db8546 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7500 Tested-by: jenkins
2023-03-25target: arm_tpiu_swo: rewrite command 'tpiu disable' as COMMAND_HANDLERAntonio Borneo1-14/+10
Change-Id: I689482f898bde2afa2881b2f311676a6b98abb9a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7499 Tested-by: jenkins
2023-03-25target: arm_dap: rewrite command 'dap names' as COMMAND_HANDLERAntonio Borneo1-12/+8
While there, format in a human readable way the output list by using one line per dap name. Change-Id: I24a47350105b90db15808c61790f05d807120739 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7498 Tested-by: jenkins
2023-03-25jtag: rewrite command 'flush_count' as COMMAND_HANDLERAntonio Borneo1-5/+9
While there: - check the number of command parameters; - add the mandatory 'usage' field. Change-Id: I7cd16f049753caedf19f313f7dc84be98efdba42 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7497 Tested-by: jenkins
2023-03-25jtag: rewrite command 'jtag arp_init-reset' as COMMAND_HANDLERAntonio Borneo1-20/+12
While there add the mandatory 'usage' field. Change-Id: I316fb31e24e94985dcc724e428b0384be7ef5bdd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7496 Tested-by: jenkins
2023-03-25jtag: rewrite command 'jtag arp_init' as COMMAND_HANDLERAntonio Borneo1-16/+7
While there add the mandatory 'usage' field. Change-Id: I3491ed79d11c5a3e81cc9afd2423da14b8df72ff Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7495 Tested-by: jenkins
2023-03-25jtag: rewrite command 'jtag names' as COMMAND_HANDLERAntonio Borneo1-17/+9
While there: - format in a human readable way the output list by using one line per tap name; - add the mandatory 'usage' field. Change-Id: I295449220c78fac8973478b265413342ea832f61 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7494 Tested-by: jenkins
2023-03-25jtag: rewrite command 'adapter name' as COMMAND_HANDLERAntonio Borneo1-12/+10
Trivial change. Add the mandatory 'usage' field. Change-Id: Id92af5cd873fb86f5de79f785f156d1ef734b005 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7493 Tested-by: jenkins
2023-03-25target: cti: rewrite command 'cti names' as COMMAND_HANDLERAntonio Borneo1-12/+9
While there, format in a human readable way the output list by using one line per cti name. Change-Id: I6d4870ee512fe7e6935d73355c2377ad805ccc3b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7492 Tested-by: jenkins
2023-03-25target: armv4_5: rewrite commands 'arm mcr/mrc' as COMMAND_HANDLERAntonio Borneo1-79/+53
While there, add a check for target halted and check the number of parameters accordingly to the command name. Change-Id: I9e8bb109c35039561997d14782fac682267aee65 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7491 Tested-by: jenkins
2023-03-25target: aarch64: rewrite commands 'aarch64 mcr/mrc' as COMMAND_HANDLERAntonio Borneo1-83/+46
This also fixes an incorrect return ERROR_TARGET_NOT_HALTED from a jim command. Change-Id: I99a02a21bedb64e60944e295c7cf24356e07be60 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7490 Tested-by: jenkins
2023-03-25rtt: rewrite command 'rtt channellist' as COMMAND_HANDLERAntonio Borneo1-60/+26
This also fixes a mistake of the jim command returning ERROR_xx when function rtt_read_channel_info() returns error. While there: - format in a human readable way the output dictionary list, while preserving the structure of its TCL data; - add check for the number of parameters. Change-Id: Ica2b623699d3a606d3992975c836dae96f74b26d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7489 Tested-by: jenkins
2023-03-25openocd: rewrite command 'version' as COMMAND_HANDLERAntonio Borneo1-13/+13
Trivial change. While there: - add the mandatory 'usage' field; - document the optional parameter 'git'; - reword the documentation. Change-Id: I6be4d4423128fa026a62e2ef355f77b69d50397e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7488 Tested-by: jenkins
2023-03-25helper: util: rewrite command 'ms' as COMMAND_HANDLERAntonio Borneo1-13/+6
Use full 64 bits in output; no reason to truncate at 32 bits. Change-Id: I433815a381e147731ff0da2c805170649a9bcf38 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7487 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2023-03-25flash: nor: rewrite command 'flash list' as COMMAND_HANDLERAntonio Borneo1-30/+18
The mixed use of jim commands and OpenOCD commands is error prone due to handling of errors through JIM_xx and ERROR_yy. Rewrite the jim command 'flash list' as OpenOCD command. While there: - format in a human readable way the output dictionary list, while preserving the structure of its TCL data; - add the mandatory 'usage' field. Change-Id: I1ee69870d3ab3c1cfc46cd2b8ec03de6b2300bd6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7486 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2023-03-25transport: rewrite command 'transport select' as COMMAND_HANDLERAntonio Borneo1-51/+49
The mixed use of jim commands and OpenOCD commands is error prone due to handling of errors through JIM_xx and ERROR_yy. Rewrite the jim command 'transport select' as OpenOCD command. This fixes and incorrect check for the return value of function transport_select(); it returns ERROR_yy but the check is on JIM_xx. While there, fix the coding style. Change-Id: I9f3e8394c1a0cc0312b414c58275e1220217bbed Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7485 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2023-03-25helper: command: rewrite command 'ocd_find' as COMMAND_HANDLERAntonio Borneo1-10/+10
The mixed use of jim commands and OpenOCD commands is error prone due to handling of errors through JIM_xx and ERROR_yy. Rewrite the jim command 'ocd_find' as OpenOCD command. Change-Id: Id775bccc12840bcf95d8c19787beda5e7c3107fc Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7484 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins