riscv-openocd/src/target/openrisc
Tomas Vanek a5108240f9 target: fix messages and return values of failed op because not halted
Lot of messages was logged as LOG_WARNING, but the operation failed
immediately. Sometimes no error message was logged at all.
Add missing messages, change warnings to errors.

Sometimes ERROR_TARGET_INVALID was returned. Some command handlers
returned ERROR_OK! Always return ERROR_TARGET_NOT_HALTED.

While on it use LOG_TARGET_ERROR() whenever possible.
Prefix command_print() message with 'Error:' to get closer
to LOG_TARGET_ERROR() variant.

Error message was not added to get() and set() methods of
struct xxx_reg_type - the return value is properly checked and a message
is logged by the caller in case of ERROR_TARGET_NOT_HALTED.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I2fe4187c6025f0038956ab387edbf3f461c69398
Reviewed-on: https://review.openocd.org/c/openocd/+/7819
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2023-07-29 05:17:44 +00:00
..
Makefile.am openocd: build: add SPDX tag 2022-07-23 13:06:38 +00:00
jsp_server.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
jsp_server.h openocd: src: add GPL license tag on files that miss it 2022-07-23 13:13:39 +00:00
or1k.c target: fix messages and return values of failed op because not halted 2023-07-29 05:17:44 +00:00
or1k.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
or1k_du.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
or1k_du_adv.c helper: Add generic little endian CRC32 function 2023-01-21 22:57:33 +00:00
or1k_tap.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
or1k_tap_mohor.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
or1k_tap_vjtag.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
or1k_tap_xilinx_bscan.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00