-
Notifications
You must be signed in to change notification settings - Fork 361
Merge up to c2cfeee471bd4a1b77ab1c30329200bb5fd37af4 from upstream #1290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
en-sc
wants to merge
222
commits into
riscv-collab:riscv
Choose a base branch
from
en-sc:en-sc/from_upstream
base: riscv
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To simplify the caller of rtos_create(), convert the code from jimtcl oriented to OpenOCD commands. While there, fix inconsistencies in almost every rtos create() method and reset rtos_auto_detect to better cooperate on run-time rtos configuration. Change-Id: I59c443aaed77a48174facdfc86db75d6b28c8480 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8830 Tested-by: jenkins
Drop the NULL sentinel at the end of the array and use ARRAY_SIZE() to bound the loops. Adapt rtos_try_next() to use ARRAY_SIZE(). While there: - change to bool the return type of rtos_try_next(); - move rtos_try_next() to avoid the forward declaration. Change-Id: I1bee11db943b670789e62f1bebe2509bbef451a0 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8855 Tested-by: jenkins
Currently, we are using offset of xListEnd.pxPrevious in List_t for list_next_offset and offset of pxPrevious in ListItem_t for list_elem_next_offset. This is confusing. Fix this. As the related lists are doubly linked lists, only iteration order is changed without breaking functionality. Also document those offsets. Change-Id: I8beacc235ee781ab4e3b415fccad7b72ec55b098 Signed-off-by: Chien Wong <m@xv97.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8833 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
The command was already tagged as deprecated in 2015 with commit 0df5577 ("armv7a: remove l1 flush all data handler") but has never been removed. An equivalent command 'cache l2x conf' was introduced at the same time in commit cd440bd ("add armv7a_cache handlers"). Drop it and deprecate it. Replace the old command in the Tcl script. Change-Id: Ie24eccc99a78786903704d10ee1d9f6c924529b5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8857 Tested-by: jenkins
…_cache The field 'outer_cache' is always initialized and used as a pointer to 'struct armv7a_l2x_cache'. There is no reason for using type 'void *' for it. Change the type of 'outer_cache'. Drop the useless cast while reading 'outer_cache'. Change-Id: Iaea9d02e247da26e230f887c85fbf8e9d7be34d5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8858 Tested-by: jenkins
Commit 236208a ("transport: use a bitmask for the transport") has an incorrect C statement in place of a return. The code is working thanks to the previous condition never true. The issue has been detected by clang scan-build in OpenOCD ACI since the missing return can make the following statement dereferencing a NULL pointer. Fix it! Change-Id: I3bbe04d99ad9b1288f55ba3c45e2e487aef9ae40 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 236208a ("transport: use a bitmask for the transport") Reviewed-on: https://review.openocd.org/c/openocd/+/8868 Tested-by: jenkins
Two new boards were added after the commit ad53fe6 ("tcl: convert transport select to jtag and swd") Align them too. Change-Id: I53e36a3a1a7730822521f0239922682c7b2fcef6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8869 Tested-by: jenkins
Function target_configure() when processing a "cget" command needs to print the result to the console. Currently the result is only printed when an error occurs. To fix this, move the command print statement from the error handling section to the common code section. The code was tested by executing a "$target_name cget -dap" command and reviewing the result. Change-Id: Iff1999de8c8e9a837055ba95714137aa03e68d4b Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Fixes: 61890e3 ("target: rewrite function target_configure() as COMMAND_HELPER") Reviewed-on: https://review.openocd.org/c/openocd/+/8870 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
There are a couple of issues with the usage string for `target create`, namely: * `-chain-position` is allowed to be not the first option. * `-chain-position` should be ommited alltogether on ARM targets when DAP is specified. Before the patch: ``` > openocd -c 'target create name testee' ... target create name type '-chain-position' name [options ...] ``` After the patch: ``` > openocd -c 'target create name testee' ... -chain-position ?name? required when creating target > openocd -c 'target create' ... target create name type [options ...] ``` Change-Id: Ia21a99ce6a4086e2e0676f5ef4685da3514a4f69 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8860 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
`target create` calls can get quite long and an indication what is the option that caused the error can be helpful. Also, there can be multiple `-event` options for different events, therefore indicating which one is it is also helpful. Change-Id: I5ea61437ca9705e790ed8343183883a3fdfebc80 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8861 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Introduce basic testing of error-handling in target configuration related commands. The tests can be run via `make check` when JTAG `dummy` adapter is enabled. Change-Id: Id0f382046dd70007d8e696d82d2396a7ccab7a33 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8644 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The license CC-BY-4.0 is not compatible with GPLv2, but files can be dual licensed with a GPLv2 compatible license 'OR' CC-BY-4.0. This is the case for some file auto-generated by riscv project. Change-Id: I4313d85a569a5e6423392129a730d1e22ef17c51 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8894 Reviewed-by: Bernhard Rosenkraenzer <bero@baylibre.com> Tested-by: jenkins
This patch ports FIELD_{GET,PREP,FIT} macros and related macro from FreeBSD, referenced file: - `src/tree/sys/compat/linuxkpi/common/include/linux/bitfield.h` Checkpatch-ignore: MACRO_ARG_REUSE Change-Id: I6fdf4514d3f95d62fadf7654409a4878d470a600 Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8171 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
These helpers are needed by the updated RISC-V target files. Change-Id: I5aa9f4e58eb75e1c7a1e8e0e3961725e2a915ebb Signed-off-by: Bernhard Rosenkränzer <bero@baylibre.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8895 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
On ARMv7a/r the single-step is implemented through a HW breakpoint that hits instructions at any address except the address of the current instruction. The method above fails in case of an infinite loop coded by a single instruction that jumps on itself; in such case, the same instruction (at the same address) is executed over and over and the breakpoint never hits. In current code this case is wrongly considered as an error. Reduce the timeout while waiting for the HW breakpoint being hit, then halt. The jump on itself would be executed several times before the timeout and the halt, but this is not an issue. There are few "pathological" instructions in ARMv7a/r that jumps on itself and that can have side effects if executed more than once. They are listed in the code. We do not consider these as real use cases generated by a compiler. Document the method in the code. Report that the single-step function is not properly managing the HW breakpoints if it exits on error. To be fixed in the future. Change-Id: I9641a4a3e2f68b83897ccf3a12d3c34e98a7805c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8871 Tested-by: jenkins
Rewrite only the command, but still use the old jimtcl specific code in dap_configure(). Change-Id: I3360884616367aae52f5b32247d9864000c53fdc Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8897 Tested-by: jenkins
Rewrite only the command, but still use the old jimtcl specific code in cti_configure(). Change-Id: I29fb952a7c8148416b301cbf78b6e342979af7d3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8898 Tested-by: jenkins
Rewrite only the command, but still use the old jimtcl specific code in arm_tpiu_swo_configure(), shared with commands 'configure' and 'cget'. Change-Id: I39c69b1cdc23f7b5f875df3e15be987c715b0bcf Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8899 Tested-by: jenkins
…ND_HANDLER Rewrite only the command, but still use the old jimtcl specific code in arm_tpiu_swo_configure(), shared with command 'create'. Change-Id: If2258f048403f54faf229e602d9b395b71894f97 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8900 Tested-by: jenkins
With all OpenOCD commands converted to COMMAND_HANDLER, we can drop the management of jim_handler commands. Drop also from documentation the subsection on Jim Command Registration. Change-Id: I4d13abc7e384e64ecb155cb40bbbd52bb79ec672 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8901 Tested-by: jenkins
With the rewrite of jim_handler commands as COMMAND_HANDLER, some camelcase symbol from jimtcl are not referenced anymore in OpenOCD code. Drop such symbols from the camelcase whitelist. Change-Id: I723be1820f13fe2cec7e4f0512a5e9da12889199 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8902 Tested-by: jenkins
The API was introduced in 2008 by commit 8d73c2a ("duan ellis target tcl work in progress") and never used. Drop it! Change-Id: Icbc5789f59696bd28f9d1151bc3e29f4adb74670 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8903 Tested-by: jenkins
Since the initial commit f444c57 ("arm_cti: add cti command group") the helper handle_cti_dump() return JIM error codes. Fix it by returning standard OpenOCD error codes. Change-Id: Ia36b82083d213aff90fe22fcfe7fbe26172806a3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8904 Tested-by: jenkins
Replace it by target_state_name() helper. Change-Id: I720f2bf121e6fd2c6987a7e8fa9e52593888ee6c Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8918 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
GDB server debug logging eat Ctrl-C when gdb user issues interrupt in time of communication between OpenOCD and gdb. E.g. Ctrl-C after `next` gdb command taking many gdb remote protocol $vCont;s (steps) Change-Id: I4a65446a9bb25a28e50566607b3dec116fa7d2cd Suggested-by: Tim Newsome <tim@sifive.com> Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8920 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
The numeric value '3' for the ASCII character CTRL-C is not immediately readable, even if the lines that follow explicitly mention CTRL-C. Use the same macro present in `telnet_server.c` to replace the numeric value. Change-Id: Iaf4296b1f0e384f8122d8a4875cad17e8ddaf66a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8922 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
This is added for future RISC-V changes. The RISC-V debug interface can explicitly tell a debugger when a hart is unavailable. This is used for instance when that hart is powered down (or yet to be powered up out of reset). Imported from riscv-collab#752 Change-Id: I8a062d59eea1e5b3c788281a75159592db024683 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8911 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Bernhard Rosenkränzer <bero@baylibre.com>
Imported from riscv-collab#767 Change-Id: I53c6e2876d9bab70800a0f080e72a2abe0499120 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8919 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
When SMP is enabled, gdb will always use the first target in the SMP group. That doesn't work when that first target is unavailable, but others in the SMP group are still available. For cases where gdb expects an operation to affect the entire group (run control, memory access), find the first available target in an SMP group and use that. Imported from riscv-collab#767 Change-Id: I4bed600da3ac0fdfe4287d8fdd090a58452db501 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8912 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 8911: target: Add TARGET_UNAVAILABLE state | https://review.openocd.org/c/openocd/+/8911 Change-Id: I6d152aea5bb449f79fd0f829252442b8b9f8ed9c Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8923 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - remove useless parenthesis; - don't end line with an open parenthesis; - expand multiple assignments. While there, put the 'default' case as last in the list. Change-Id: I17bf5e88b145ef9b5b188424182f4e54b818eeae Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9011 Tested-by: jenkins
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: I9689e5b4650b8301d1b81e384e4db41b4efc3993 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9032 Tested-by: jenkins
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - remove useless parenthesis; - uniform braces around if/else statements, - add space around operators. While there: - put the 'default' case as last in the list; - convert format strings to drop cast. Change-Id: I335b200add75b95bf1e908af39e957b61b617e22 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9033 Tested-by: jenkins
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: I6be44efd5189b671caabcf6753bb82ef44521440 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9034 Tested-by: jenkins
Check the variable against the constant. No functional change. Change-Id: Ie3138e516f4b81bf544780981863e856f8ffc528 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9035 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Since the initial code merged in 2012, the last case of the switch has a useless test on 'retval' that is not assigned in the case. Since 'retval' is initialized to ERROR_OK, the condition is always false. Drop the check on 'retval'. While there, drop the useless parenthesis around the 'case' and add the 'break' statement. Change-Id: I3f673b5e10f6b28a4a74881b8a06a71b58afb422 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9036 Tested-by: jenkins
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - fix useless 'else' after 'break', by moving the 'break' statement. While there: - modify the checks on strncmp(). Change-Id: I123f3c0e3999669440845c946e4839d7288e8d91 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9037 Tested-by: jenkins
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: Ic4070571d322776b638a15a40af85cd31fdae7ce Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9038 Tested-by: jenkins
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - remove unnecessary parenthesis; - uniform braces around if/else statements. Change-Id: I851032e1b126462a325f73bdf236fd2dbc938ff3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9039 Tested-by: jenkins
Factorize function svf_run_command() by moving out of the 'case' the common code related to the label 'xxr_common'. The target is to drop later on the ugly label 'xxr_common' inside the switch. Apart for: - the function and local variables declaration, - the added function call in place of original code, - the reduced indentation in the new function, this change is a dummy copy/paste with no code modification. Change-Id: I8149cf25f460326ba6666a9287c5c309e5d99488 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9040 Tested-by: jenkins
Drop the jumps to the label thanks to the factorized code. Drop the now unused label. Change-Id: I7e61ecee5a883a6ed6b77bfbff54a615d1b4d61c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9041 Tested-by: jenkins
Rework the function to drop the goto in the switch statement. While there, change some variable to boolean. Change-Id: I37cbc8aafaeb8aef7f083ee6f5afa9eae71e0cd9 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9042 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
Check the variable value against the constant. Change-Id: I353bbada2180d6df789cc225ddb15f22c7deb00d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9043 Tested-by: jenkins
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: I1369294af64c2830cc7fcc2814eac073c2413ff5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9044 Tested-by: jenkins
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - uniform braces around if/else statements; - don't end line with an open parenthesis. While there: - move the default case as last in the list. Change-Id: Idb9603e9a59c7f2e1a7346d5bdd3bde384d2f75f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9045 Tested-by: jenkins
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. While there: - add space around operators; - remove space after cast. Skip the file contrib/firmware/angie/c/src/usb.c as it's going to be modified by a patch already pending in gerrit. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: I0bebd6d0cc95ddecd5794cc4c12c8412b38691e9 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9046 Tested-by: jenkins
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - uniform braces around if/else statements. While there: - drop useless break. Change-Id: Ic0ce0a9877dbf17c625cf80009a52922176a162d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9047 Reviewed-by: zapb <dev@zapb.de> Tested-by: jenkins
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: I24762505cdac22058e0a2a1f4e9235c9006e543d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9048 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
The code falls-through in the default case, making it not easy to read. Add the explicit break to improve the readability. Change-Id: I4784b883e0e82258de17018dfdfb59b4042ac743 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9049 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - remove useless parenthesis; - remove useless 'break'; - join spit lines; - add space around operators; - remove 'else' after exit() and return. Change-Id: I8a87a0ea104205d087dcb8cbf4c67ff13a47742f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9050 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - use '__func__' in place of hardcoded function name. Change-Id: Ib90811c7fffa15702fb710345c5ca3c7331d5ad6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9052 Reviewed-by: zapb <dev@zapb.de> Tested-by: jenkins
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: Iaf368b0bdd7c797b0e4cfb91e838696d706fdcce Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9053 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
To prepare for aligning switch and case statements, fix in advance some checkpatch error due to existing code: - remove 'else' after return and break; - use '__func__' in place of hardcoded function name; - remove useless parenthesis; - don't end line with an open parenthesis. Change-Id: I6a9905e5a30c90456de562e727dd2dfe2fda10c4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9054 Reviewed-by: zapb <dev@zapb.de> Tested-by: jenkins
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. Skip the driver angie that is going to be updated soon with a new commit and skip the folder OpenULINK that contains a firmware for the dongle. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: I960a89a45bc9956f98676a019f0d1a652601155f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9055 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Checkpatch is not able to detect numbers in exponential format, like 6E-5, and complains about missing space around the operator minus. To complete the alignment of switch and case statements in this file, use a separate commit with the special checkpatch ignore tag in the commit message. Align the code accordingly. No changes are reported by git log -p -w --ignore-blank-lines --patience Checkpatch-ignore: SPACING Change-Id: Ibe70c4a4d3f0bb44c03007103910b778944bb90e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9056 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Align the code accordingly. While there: - add space around the operators; - drop useless empty line. Skip all riscv code, as it is going to be updated soon from the external fork. No changes are reported by git log -p -w --ignore-blank-lines --patience Change-Id: I2691dfdd2b6734143e14160b46183623e9773539 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9051 Tested-by: jenkins
Parentheses are not necessary here, remove them. Change-Id: I793639fbef38688045104d351fb4e5320f1eba2a Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/9058 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
pico-debug and pico2-debug are virtual CMSIS-DAP adapters that run on the otherwise dormant second core of the RP2040 and RP2350 respectively. Change-Id: Ifd7dcbbabeb86c738cc58854add0e897633197de Signed-off-by: Peter Lawrence <majbthrd@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9099 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
* `configure.ac`: commit bd5649d ("Support cJTAG JScan3 mode") and commit 7d0e125 ("jtag/drivers: Add support for CH347-based JTAG adapters") * `src/jtag/drivers/ftdi.c`: commit f61098c ("Rename ftdi_oscan1 to ftdi_cjtag") and commit 867611d ("jtag: drivers: align switch and case statements") -- resolved by aligning the statements. * `src/rtos/freertos.c`: commit 50a5971 ("RISC-V Freertos support (riscv-collab#582)") and commit commit 3954896 ("rtos/FreeRTOS: fix next pointer member offset in FreeRTOS lists") -- dropped the upstream change since the offsets are dynamically computed by `freertos_compute_offsets()`. * `src/rtos/freertos.c`: due to commit b3b790e ("rtos: rework rtos_create()") -- the change is already adopted. * `src/rtos/hwthread.c`: commit 95cb368 ("Merge up to 1f3f635 from upstream") and commit c545b9c ("rtos/hwthread: use printf format specifier") -- resolved in favour of upstream version. * `src/rtos/rtos.c`: commit 737f013 ("Support RV32/RV64 mainline/metal stackings (riscv-collab#586)") and commit b3b790e ("rtos: rework rtos_create()") -- adjusted the handlers, adopted the error checks. * `src/server/gdb_server.c`: commit 52c9ae0 ("server/gdb_server: Handle events if first target is unavailable") and commit 7f57e72 ("gdb_server: Operate on available targets.") -- resolved in favor of the version from RISC-V OpenOCD, since it is being upstreamed. Link: https://review.openocd.org/c/openocd/+/8914 * `src/target/breakpoints.c`: commit b1f3a75 ("target/riscv: Don't resume unavailable harts.") and commit ddef9cf ("target: align switch and case statements") -- aligned the statements. * `src/target/riscv/riscv.c`: due to commit 325e6d3 ("target: Use 'bool' data type in mmu()") -- adjusted to use `bool` instead of `int`. * `src/target/target.c`: commit 41b5b54 ("Revert "break from long loops on shutdown request"") and commit 9fe3780 ("openocd: drop iteration downsampling for keep_alive()") -- also dropped the downsampling. * `src/helper/base64.[ch]`: due to commit 6a3abda ("helper: add base64 encoding/decoding helpers from FreeBSD") -- resolved in favour of upstream. Change-Id: Ide0f7813c4870344ed7ed4a7dafb26d959b9efd5 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
MarekVCodasip
requested changes
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that you have missed a change from int
to bool
here: https://github.com/riscv-collab/riscv-openocd/pull/1290/files#diff-b4aa16f9e42cb8f0934baa7c8e0ec9c70a369bef98b99b26ae2e896c8aa95d6aR3413 (line 3413 of riscv.c
)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Conflicts:
configure.ac
: commit bd5649d ("Support cJTAG JScan3 mode") and commit 7d0e125 ("jtag/drivers: Add support for CH347-based JTAG adapters")src/jtag/drivers/ftdi.c
: commit f61098c ("Rename ftdi_oscan1 to ftdi_cjtag") and commit 867611d ("jtag: drivers: align switch and case statements") -- resolved by aligning the statements.src/rtos/freertos.c
: commit 50a5971 ("RISC-V Freertos support (RISC-V Freertos support #582)") and commit commit 3954896 ("rtos/FreeRTOS: fix next pointer member offset in FreeRTOS lists") -- dropped the upstream change since the offsets are dynamically computed byfreertos_compute_offsets()
.src/rtos/freertos.c
: due to commit b3b790e ("rtos: rework rtos_create()") -- the change is already adopted.src/rtos/hwthread.c
: commit 95cb368 ("Merge up to 1f3f635 from upstream") and commit c545b9c ("rtos/hwthread: use printf format specifier") -- resolved in favour of upstream version.src/rtos/rtos.c
: commit 737f013 ("Support RV32/RV64 mainline/metal stackings (Support RV32/RV64 mainline/metal stackings #586)") and commit b3b790e ("rtos: rework rtos_create()") -- adjusted the handlers, adopted the error checks.src/server/gdb_server.c
: commit 52c9ae0 ("server/gdb_server: Handle events if first target is unavailable") and commit 7f57e72 ("gdb_server: Operate on available targets.") -- resolved in favor of the version from RISC-V OpenOCD, since it is being upstreamed.Link: https://review.openocd.org/c/openocd/+/8914
src/target/breakpoints.c
: commit b1f3a75 ("target/riscv: Don't resume unavailable harts.") and commit ddef9cf ("target: align switch and case statements") -- aligned the statements.src/target/riscv/riscv.c
: due to commit 325e6d3 ("target: Use 'bool' data type in mmu()") -- adjusted to usebool
instead ofint
.src/target/target.c
: commit 41b5b54 ("Revert "break from long loops on shutdown request"") and commit 9fe3780 ("openocd: drop iteration downsampling for keep_alive()") -- also dropped the downsampling.src/helper/base64.[ch]
: due to commit 6a3abda ("helper: add base64 encoding/decoding helpers from FreeBSD") -- resolved in favour of upstream.