From: OpenOCD-Gerrit <ope...@us...> - 2020-05-09 13:37:35
|
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 4738a55da416176542efa1b554020de275a5b4e5 (commit) via 8807a5937e5fe5d09828c3e535beafb48e171621 (commit) via 2a8303b0bd1ea10b1a60891cbff24d717a985f6f (commit) from fdad56ecb02e072245bbcf86d9a6b506149c6a25 (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 4738a55da416176542efa1b554020de275a5b4e5 Author: Antonio Borneo <bor...@gm...> Date: Mon Apr 27 23:19:14 2020 +0200 helper/ioutil: silence gcc-8 on strncpy Starting from version 8, gcc issues a warning if strncpy could be able to truncate a string (so without adding the zero-termination char in destination) by copying exactly "size" char from a source string not shorter than "size". Such truncation from strncpy could actually be the desired code behaviour, but the way to silent gcc only locally (without global disabling with -Wno-stringop-truncation) through pragma has other side effects on portability. In current code, the source string is always "eth0", because has been checked right above. So this is a false positive from gcc, being always strlen("eth0") < 16, the sizeof(ifreq.ifr_name). Silent gcc by decrementing the "size" and remove: error: âstrncpyâ specified bound 16 equals destination size [-Werror=stringop-truncation] This file is only optionally compiled together with ZY1000 driver with --enable-zy1000 --enable-ioutil. This combination is not checked in jenkins, so the error passed unnoticed. Plus, the configure flags above are both deprecated! Change-Id: I229e66227cfd3513139feeaffa47a6e1ec00767b Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: http://openocd.zylin.com/5631 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <and...@gm...> diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c index d4f39e242..c103ce173 100644 --- a/src/helper/ioutil.c +++ b/src/helper/ioutil.c @@ -403,7 +403,7 @@ static int ioutil_Jim_Command_mac(Jim_Interp *interp, int argc, { if (strcmp("eth0", ifr->ifr_name) != 0) continue; - strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name)); + strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name) - 1); if (ioctl(SockFD, SIOCGIFHWADDR, &ifreq) < 0) { close(SockFD); return JIM_ERR; commit 8807a5937e5fe5d09828c3e535beafb48e171621 Author: Antonio Borneo <bor...@gm...> Date: Fri May 1 18:30:00 2020 +0200 helper/command: register all commands through register_commands() The commands "ocd_find" and "capture" are registered directly through the jim API, instead of the common way to describe them in a struct command_registration that is then passed to the helper register_commands(). This cause the two commands above to not have either "help" nor "usage" string nor a properly identified "mode". Since the following line registers the commands listed in struct command_builtin_handlers, simply add the two commands above in the same struct. Change-Id: Id6ee11dac3b18364deeed65ee8e18ad80152750a Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: http://openocd.zylin.com/5644 Tested-by: jenkins Reviewed-by: Tomas Vanek <va...@fb...> diff --git a/src/helper/command.c b/src/helper/command.c index ec07a5fef..0882ecd58 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -1229,6 +1229,21 @@ static const struct command_registration command_subcommand_handlers[] = { }; static const struct command_registration command_builtin_handlers[] = { + { + .name = "ocd_find", + .mode = COMMAND_ANY, + .jim_handler = jim_find, + .help = "find full path to file", + .usage = "file", + }, + { + .name = "capture", + .mode = COMMAND_ANY, + .jim_handler = jim_capture, + .help = "Capture progress output and return as tcl return value. If the " + "progress output was empty, return tcl return value.", + .usage = "command", + }, { .name = "echo", .handler = jim_echo, @@ -1339,9 +1354,6 @@ struct command_context *command_init(const char *startup_tcl, Jim_Interp *interp Jim_SetGlobalVariableStr(interp, "ocd_HOSTOS", Jim_NewStringObj(interp, HostOs, strlen(HostOs))); - Jim_CreateCommand(interp, "ocd_find", jim_find, NULL, NULL); - Jim_CreateCommand(interp, "capture", jim_capture, NULL, NULL); - register_commands(context, NULL, command_builtin_handlers); Jim_SetAssocData(interp, "context", NULL, context); commit 2a8303b0bd1ea10b1a60891cbff24d717a985f6f Author: Antonio Borneo <bor...@gm...> Date: Tue May 5 18:11:47 2020 +0200 tcl: stm32mp15x: fix "reset halt" on CM4 in engineering boot The state machine of cortex-m have to pass through a set of state before it get in "halted". Add one more "arp_poll" to achieve the proper state during a "reset halt" command in engineering boot. Change-Id: I90828bf20ef75bd4018f8b911f727ae69c4d6e8f Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: http://openocd.zylin.com/5649 Tested-by: jenkins Reviewed-by: Richard Braun <rb...@sc...> diff --git a/tcl/target/stm32mp15x.cfg b/tcl/target/stm32mp15x.cfg index a11f6665e..f2ba94eec 100644 --- a/tcl/target/stm32mp15x.cfg +++ b/tcl/target/stm32mp15x.cfg @@ -114,7 +114,7 @@ $_CHIPNAME.ap2 configure -event reset-deassert-pre {dbgmcu_enable_debug} $_CHIPNAME.cpu0 configure -event reset-deassert-pre {$::_CHIPNAME.cpu0 arp_examine} $_CHIPNAME.cpu1 configure -event reset-deassert-pre {$::_CHIPNAME.cpu1 arp_examine allow-defer} $_CHIPNAME.cpu0 configure -event reset-deassert-post {toggle_cpu0_dbg_claim0} -$_CHIPNAME.cm4 configure -event reset-deassert-post {$::_CHIPNAME.cm4 arp_examine;if {[$::_CHIPNAME.ap2 curstate] == "halted"} {$::_CHIPNAME.cm4 arp_poll;$::_CHIPNAME.cm4 arp_halt}} +$_CHIPNAME.cm4 configure -event reset-deassert-post {$::_CHIPNAME.cm4 arp_examine;if {[$::_CHIPNAME.ap2 curstate] == "halted"} {$::_CHIPNAME.cm4 arp_poll;$::_CHIPNAME.cm4 arp_poll;$::_CHIPNAME.cm4 arp_halt}} $_CHIPNAME.ap1 configure -event examine-start {dap init} $_CHIPNAME.ap2 configure -event examine-start {dbgmcu_enable_debug} $_CHIPNAME.cpu0 configure -event examine-end {detect_cpu1} ----------------------------------------------------------------------- Summary of changes: src/helper/command.c | 18 +++++++++++++++--- src/helper/ioutil.c | 2 +- tcl/target/stm32mp15x.cfg | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) hooks/post-receive -- Main OpenOCD repository |