From: openocd-gerrit <ope...@us...> - 2023-01-15 14:58:08
|
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 30631224da59608d93f56bac0f68acd6c8fd32ac (commit) from f2fc23e16b648c3d5600b5cc44bee69a1e697a3a (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 30631224da59608d93f56bac0f68acd6c8fd32ac Author: Jan Matyas <ma...@co...> Date: Mon Oct 17 08:24:05 2022 +0200 adapter: Improve three adapter-related prints - Do not warn the user about adapter speed not being set if the selected adapter does not support configurable speed. This would be confusing to users. - Minor reword in the "adapter speed is not selected" warning. - Print the adapter name in the "adapter doesn't support configurable speed" log entry - Another minor reword: autoselect --> autoselecting Signed-off-by: Jan Matyas <ma...@co...> Change-Id: I4c198b547544fd8199921f092153562c5f159134 Reviewed-on: https://review.openocd.org/c/openocd/+/7269 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c index b7feac575..eb73fcb9a 100644 --- a/src/jtag/adapter.c +++ b/src/jtag/adapter.c @@ -136,9 +136,11 @@ int adapter_init(struct command_context *cmd_ctx) int retval; - if (adapter_config.clock_mode == CLOCK_MODE_UNSELECTED) { + /* If the adapter supports configurable speed but the speed is not configured, + * provide a hint to the user. */ + if (adapter_driver->speed && adapter_config.clock_mode == CLOCK_MODE_UNSELECTED) { LOG_WARNING("An adapter speed is not selected in the init scripts." - " OpenOCD will try to run the adapter at the low speed (%d kHz)", + " OpenOCD will try to run the adapter at very low speed (%d kHz).", DEFAULT_CLOCK_SPEED_KHZ); LOG_WARNING("To remove this warnings and achieve reasonable communication speed with the target," " set \"adapter speed\" or \"jtag_rclk\" in the init scripts."); @@ -153,7 +155,7 @@ int adapter_init(struct command_context *cmd_ctx) adapter_config.adapter_initialized = true; if (!adapter_driver->speed) { - LOG_INFO("This adapter doesn't support configurable speed"); + LOG_INFO("Note: The adapter \"%s\" doesn't support configurable speed", adapter_driver->name); return ERROR_OK; } diff --git a/src/transport/transport.c b/src/transport/transport.c index d72a48baa..c05db3f00 100644 --- a/src/transport/transport.c +++ b/src/transport/transport.c @@ -104,7 +104,7 @@ int allow_transports(struct command_context *ctx, const char * const *vector) /* autoselect if there's no choice ... */ if (!vector[1]) { - LOG_INFO("only one transport option; autoselect '%s'", vector[0]); + LOG_INFO("only one transport option; autoselecting '%s'", vector[0]); return transport_select(ctx, vector[0]); } ----------------------------------------------------------------------- Summary of changes: src/jtag/adapter.c | 8 +++++--- src/transport/transport.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |