mkiiskila closed pull request #1521: hw/scripts; if port was passed as last parameter in --extrajtagcmd, URL: https://github.com/apache/mynewt-core/pull/1521
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/hw/scripts/common.sh b/hw/scripts/common.sh index fce1ffdacd..f64fc14805 100755 --- a/hw/scripts/common.sh +++ b/hw/scripts/common.sh @@ -56,7 +56,15 @@ parse_extra_jtag_cmd() { case $1 in -port) shift - PORT=$1 + # Many BSP scripts append their own things additional + # parameters. This is done in a way where openocd delimeter is + # immediatelly adjacent to parameters passed via newt. + # The following is to filter out the delimeter from + # PORT, but keep it present within the string passed + # to openocd. + PORT=`echo $1 | tr -c -d 0-9` + ADDITIONAL_CHARS=`echo $1 | tr -d 0-9` + NEW_EXTRA_JTAG_CMD="$NEW_EXTRA_JTAG_CMD $ADDITIONAL_CHARS" shift ;; *) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services