aboutsummaryrefslogtreecommitdiff
path: root/src/helper
AgeCommit message (Collapse)AuthorFilesLines
2017-12-22Merge branch 'master' into updateTim Newsome2-1/+4
Change-Id: Icec244b174cc0c67ab58961649a369db7f344824
2017-12-14Use abstraction because Windows is not POSIXTim Newsome1-0/+11
Fixes #138 Change-Id: I4d9b49762e318fe91f1561ed315829b43daefef4
2017-10-23Fix GCC7 warnings about switch-case fallthroughsFreddie Chopin1-1/+1
GCC7 with -Wextra warns about switch-case blocks which fallthrough with "this statement may fall through [-Werror=implicit-fallthrough=]". This can be fixed by adding "special" comments: "/* fallthrough */". See https://gcc.gnu.org/gcc-7/changes.html Change-Id: Iba0be791dbdd86984489b2d9a0592bb59828da1e Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-on: http://openocd.zylin.com/4174 Tested-by: jenkins
2017-10-03Fix typo in comment.Tim Newsome1-1/+1
Change-Id: I6567f85f399315e1dac98881765dfaa6eab5facb Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/4238 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2017-10-03helper/options: Add missing #include for MinGW and MSYS2Marc Schink1-0/+3
Change-Id: I3bb295f52706b641661241e3e047306811ca915e Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/4201 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2017-10-01Merge commit '7719e9618e753ac41a46a2488dfba549ac578891' into riscv-updLiviu Ionescu2-6/+18
2017-08-10log: Add a new debug level (4) for verbose I/O debugAndreas Fritiofson2-6/+18
Change ftdi SWD driver and CMSIS-DAP to use it instead of LOG_DEBUG(). Change-Id: I17ba3de2086c7159209db61fba3faf067dfc5023 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3805 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2017-06-13Merge branch 'remotes/openocd/master' into riscv64Tim Newsome10-122/+352
Merged 1025be363e2bf42f1613083223a2322cc3a9bd4c Conflicts: src/flash/nor/Makefile.am src/rtos/Makefile.am src/rtos/rtos.c src/target/Makefile.am src/target/target.c src/target/target_type.h Doesn't build yet, but I fixed the conflicts that git pointed out.
2017-04-23help/log.c: better error handling for "log_output"Girts1-3/+9
* Close previous log file if one was opened before. * Return error if opening file fails. Change-Id: I103025cd86bcac785fe39e13bc7d5f79d78e38e7 Signed-off-by: Girts Folkmanis <opensource@girts.me> Reviewed-on: http://openocd.zylin.com/3878 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2017-04-23helper/options.c: fail if unexpected cmdline arguments are presentGirts1-0/+9
Previously openocd would silently ignore any incorrect arguments. Change-Id: Ibb40b57b8a9e07d191215486f3b3c4920a9963c7 Signed-off-by: Girts Folkmanis <opensource@girts.me> Reviewed-on: http://openocd.zylin.com/3879 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2017-04-23help/options.c: add error handling for -d argGirts1-2/+5
Fail if we fail to set debug level. Also, clarify in usage string that -d<n> doesn't accept spaces. Change-Id: I9ea9945dc068e3e7cfd18b16ffa2a29366d6e4d1 Signed-off-by: Girts Folkmanis <opensource@girts.me> Reviewed-on: http://openocd.zylin.com/3880 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2017-02-10target: Add 64-bit target address supportDongxue Zhang3-2/+36
Define a target_addr_t type to support 32-bit and 64-bit addresses at the same time. Also define matching TARGET_PRI*ADDR format macros as well as a convenient TARGET_ADDR_FMT. In targets that are 32-bit (avr32, nds32, arm7/9/11, fm4, xmc1000) be least invasive by leaving the formatting unchanged apart from the type; for generic code adopt TARGET_ADDR_FMT as unified address format. Don't silently change gdb formatting here, leave that to later. Add COMMAND_PARSE_ADDRESS() macro to abstract the address type. Implement it using its own parse_target_addr() function, in the hopes of catching pointer type mismatches better. Add '--disable-target64' configure option to revert to previous 32-bit target address behavior. Change-Id: I2e91d205862ceb14f94b3e72a7e99ee0373a85d5 Signed-off-by: Dongxue Zhang <elta.era@gmail.com> Signed-off-by: David Ung <david.ung.42@gmail.com> [AF: Default to enabling (Paul Fertser), rename macros, simplify] Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
2017-01-15helper,rtos,server: Restore missing warning flagsAndreas Fritiofson1-1/+1
These libraries override the used CFLAGS without adding the defaults. This didn't have any effect until change http://openocd.zylin.com/3870 (ef4c139). Restore by adding AM_CLAGS to the per-target CFLAGS. Interestingly, automake seems to clear the CFLAGS for the target even if the override variable is only mentioned within a non-active conditional branch, such as the IS_MINGW for the affected libraries. Change-Id: I805206865e59e3fa33a7ea3c0d3472e51219351c Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3927 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-25Search for scripts relative to the executable on all(?) platformsAndreas Fritiofson1-33/+122
Add a helper to hide the platform-dependent method to get a canonical, absolute, /-separated path to the executable. Use this and the relative path from BINDIR to PKGDATADIR to construct a search path that finds the scripts even if the installation dir is moved, as long as the structure below $prefix is maintained. This method should fully support all the tricks you can to with autotools to customize the installed layout such as overriding the default directories at configure-time and overriding the configured directories at build-time. The exe path detection methods are combined from http://openocd.zylin.com/3388 by Rick Foos and http://openocd.zylin.com/3537 by Steven Stallion, as well as tips found all over internet. Change-Id: Ifc9cc9dd0bf52fbd67b1b0f2383318cda0c422c4 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Signed-off-by: Steven Stallion <sstallion@gmail.com> Reviewed-on: http://openocd.zylin.com/3889 Tested-by: jenkins Reviewed-by: Rick Foos <rfoos@solengtech.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08Convert to non-recursive makeAndreas Fritiofson1-47/+40
Change-Id: I11f8bc8553957e2ff083c09e72e16881e4d3bb6f Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3865 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08helper: Code cleanup for hexify()Marc Schink2-9/+30
Simplify hexify() and do not longer use 0 as special case for the parameter 'count' to determine the string length of the binary input. Instead, use strlen() outside of the function if needed. Additionally, fix the return value and return the length of the converted string. The old function always returned 2 * count. Also, use more appropriate data types for the function parameters and add a small documentation. Change-Id: I133a8ab786b8f7c1296afcaf9c0a0b43881e5112 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3793 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-12-08helper: Update jep106 database to JEP106ATAndreas Fritiofson1-4/+41
Change-Id: I2dac416189d16938597c073fd35ad654bca7484c Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3871 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-10-17helper: Make unhexify() robust on invalid dataMarc Schink2-8/+33
The current implementation is not suitable for user provided data because it does not detect invalid inputs in many cases. For example, the string "aa0xbb" is successfully converted to the 3 bytes: 0xaa, 0x00 and 0xbb. An other example is "aabi" which is successfully converted to the 2 bytes: 0xaa and 0x0b. Both are obviously incorrect. Make unhexify() robust on invalid data and use more appropriate data types for its parameters. Also, add a small documentation for the function. Change-Id: Idb799beb86fc608b066c8a76365021ed44c7f890 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3792 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-07helper/log: Add log_vprintf_lf()Marc Schink2-14/+27
Add log_vprintf_lf() to enable the possibility to output log messages with a variable argument list. Change-Id: I7fd6e93db63a7d98f662df2881a42e4d923c3848 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3709 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-09-23Fix typo in comment.Tim Newsome1-1/+1
2016-07-19Fix usage of timeval_ms()Andreas Färber3-10/+10
First, fix the timeval_ms() implementation to not have K&R but ANSI argument semantics by adding a missing void. timeval_ms() returns an int64_t, not uint64_t or long long. Consistently use int64_t for variables and PRI*64 as format string. While at it, change a few related variables to bool for clarity. Note that timeval_ms() may return a negative error code, but not a single caller checks for that. Change-Id: I27cf83e75b3e9a8913f6c43e98a281bea77aac13 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3499 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-05-24Make #include guard naming consistentMarc Schink14-42/+43
Change-Id: Ie13e8af0bb74ed290f811dcad64ad06c9d8cb4fa Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2956 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-24Remove FSF address from GPL noticesMarc Schink25-69/+29
Also make GPL notices consistent according to: https://www.gnu.org/licenses/gpl-howto.html Change-Id: I84c9df40a774958a7ed91460c5d931cfab9f45ba Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3488 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-08Helper ioutil: cleanup: removing dead codeAlexander Kurz1-111/+0
The ioutil helper functions copyfile and copydir were last and only used in ecosboard.c which has been removed with commit 39650e22. Removing the dead code. Change-Id: I36c7c4c5009d755b4513a14a9f9e214d1ee500e8 Signed-off-by: Alexander Kurz <akurz@blala.de> Reviewed-on: http://openocd.zylin.com/3240 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-02-29helper/fileio: Remove nested structMarc Schink2-68/+70
Change-Id: I1a3afbddcf950689da58e0df8850a05f558d7879 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3222 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-02-29jim-nvp: Make Jim_GetOpt_String const-correctAndreas Fritiofson2-4/+3
Change-Id: Iae9824f6ff47a1944e674e59bfaa970904645082 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3178 Tested-by: jenkins
2016-02-13Helper time_support: const function argumentsAlexander Kurz2-4/+4
duration_elapsed and duration_kbps will not modify the struct duration passed as function argument, hence it should be declared const. Change-Id: I459c396952c78e907257e2c2f2c630abde92aaa8 Signed-off-by: Alexander Kurz <akurz@blala.de> Reviewed-on: http://openocd.zylin.com/3232 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-01-22helper: Add converter from JEP106 ID to manufacturer nameAndreas Fritiofson5-0/+1228
Use it to print the manufacturer of detected TAPs Change-Id: Ic4384c61c7f6f7ae2a9b860a805a5997542f72cc Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3177 Tested-by: jenkins Reviewed-by: Jiri Kastner <cz172638@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-11-03helper/options: Use OPENOCD_SCRIPTS dir if set.Jonathan Larmour1-0/+6
This makes it easier to relocate the install tree of OpenOCD from where it was originally built (for example, if put onto a different machine), without having to change scripts or add something to the command line every time. Change-Id: Ia5edf0eba166f7a999f267bd6a92402dab9b399e Signed-off-by: Jonathan Larmour <jifl@eCosCentric.com> Reviewed-on: http://openocd.zylin.com/3004 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-11-03helper/options: Cleanup #includes.Marc Schink1-2/+2
Change-Id: I1c05cf6bb68049176cdd1b3bcff4dcb8b9ae963e Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2995 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-11-03helper/log: Cleanup #includes.Marc Schink1-2/+2
Change-Id: Ie343524dd843d518086a86866391b5a34556082b Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2996 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-11-03helper/ioutil: Rename MixedCaps function.Marc Schink1-3/+3
Change-Id: I10075d4d5f45a7105d5a007631510236dbb9b08b Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2957 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-11-03helper/fileio: Fix memory leak.Marc Schink1-4/+12
The memory leak occurs when opening a file fails. It can be reproduced by using the "flash verify_bank" command with a filename that does not exist. Change-Id: I60b7b545c18793d750ff75d08124fde3f0aa6f64 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2998 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-11-03helper/fileio: Use size_t for file size.Marc Schink2-7/+12
Change-Id: Ie116b44ba15e8ae41ca9ed4a354a82b2c4a92233 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2997 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-11-03Change from sys/poll.h to standard poll.h locationPaul Fertser1-2/+2
According to "man 2 poll" the correct header to include is poll.h, not sys/poll.h. Reported by a build against musl. Change-Id: I5298b49dc947d1a368e423104c0c0c7b9bdd1a10 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2947 Tested-by: jenkins
2015-04-14Tcl exception codes cleanup, shutdown command amendmentsPaul Fertser2-21/+21
This patch might influence openocd Tcl commands behaviour in subtle ways, please give it a nice testing. The idea is that if an OpenOCD Tcl command returns an error, an exception is raised, and then the return code is propogated all the way up (or to the "catch" if present). This allows to detect "shutdown" which is not actually an error but has to raise an exception to stop execution of the commands that follow it in the script. openocd_thread special-cases shutdown because it should then terminate OpenOCD with a success error code, unless shutdown was called with an optional "error" argument which means terminate with a non-zero exit code. Change-Id: I7b6fa8a2e24c947dc45d8def0008b4b007c478b3 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2600 Tested-by: jenkins Reviewed-by: Juha Niskanen <juha.niskanen@haltian.com> Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2015-04-14helper: shutdown command should return with 0 exit statusJuha Niskanen1-1/+4
Commit a35712a85c42 caused a regression where command openocd -c "echo a1; shutdown; echo a2" always returned non-zero exit status to operating system, even when commands before shutdown all succeeded. This patch attempt to fix this. Change-Id: I3f478c2c51d100af810ea0171d2fd4c8fcc657f3 Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com> Reviewed-on: http://openocd.zylin.com/2589 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-04configure: define WIN32_LEAN_AND_MEAN early to make it effectivePaul Fertser1-1/+0
This macro makes windows builds faster and helps with the old "#define interface struct" issue as the word "interface" is part of libusb-0.1 API. However, defining it in replacements.h is too late, as windows.h gets included by that time from somewhere else. This solution is provided by Ray Donnelly from the MSYS2 team. Change-Id: I376a5fb3d106786515d7e1ba44dbd751e4dcdb1b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2486 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-01-30Use (uint8_t *) for buf_(set|get)_u(32|64) instead of (void *)Paul Fertser1-4/+4
This helps to uncover incorrect usage when a pointer to uint32_t is passed to those functions which leads to subtle bugs on BE systems. The reason is that it's normally assumed that any uint32_t variable holds its value in host byte order, but using but_set_u32 on it silently does implicit pointer conversion to (void *) and the assumption ends up broken without any indication. Change-Id: I48ffd190583d8aa32ec1fef8f1cdc0b4184e4546 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2467 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-10-06helper: constify log_stringsSpencer Oliver2-2/+2
Change-Id: I5bdd8958e79b754d56bb7aee2892856e557eed76 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/2296 Tested-by: jenkins
2014-09-22command: Fix confusing syntax error messageAndreas Fritiofson2-2/+4
If the user executes a command with an invalid subcommand, the error message is extremely unhelpful: > flash write test.elf flash write test.elf: command requires more arguments This is because any command line that starts with a valid command group is classified as a group, triggering ocd_bouncer to print the confusing message. Fix by requiring that to be a command group, the command line must not contain any unknown tokens after the last valid (sub-)command group. That is OK because command groups don't have handlers defined and thus can't take any parameters. Also fix the error message for "unknown" type to be similar to the error message that is printed (by Jim) for non-existent primary commands. Change-Id: I26950349f0909fd3961c4f9ab9b198c221cea9fc Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2285 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-08-12Removed limit on lenght of command line options.Cristian Maglie1-10/+11
In particular -f and -s options may contains paths that can easily exceed the (old) 128 bytes buffer. Change-Id: Ifc198536549f50663e8e588519bb9ef75dcd172c Signed-off-by: Cristian Maglie <c.maglie@bug.st> Reviewed-on: http://openocd.zylin.com/2241 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-11stlink_usb: Fix swallowed error on read/write operations, add retries on SWD ↵Angus Gratton1-0/+2
WAIT, clean up error debug output. - stlink_usb_get_rw_status() had a bug where FAULT or WAIT responses in read/write operations were ignored, leading to incomplete data. - Added wrapper stlink_cmd_allow_retry to handle SWD_AP_WAIT/SWD_DP_WAIT statuses in most commands. These statuses appear if an SWD read or write received a WAIT ACK response from the target more than 4 times in a row. The driver retries the operation (with exponential backoff) before failing outright (in testing 1 retry was always enough.) - As part of the implementation of stlink_cmd_allow_retry a large number of lines of boilerplate were refactored. - Fleshed out stlink_usb_error_check and added it to some more code paths so WAIT or FAULT responses are logged to debug. WAIT responses will be logged even if they are subsequently retried, which should help in case the retries have subtle side effects (none anticipated.) Tested with two targets: STLINK F0 Discovery, Nordic NRF51822. Only tested with STLINK V2 programmers. Change-Id: I9af24e8f0121b035356dbb9978d6bbf4feb2e4d3 Signed-off-by: Angus Gratton <gus@projectgus.com> Reviewed-on: http://openocd.zylin.com/2201 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-02Fix some problems with the bin2char utilityAndreas Fritiofson1-6/+6
Don't hardcode the type for the array, just output the array initializer so the includer can choose the type and storage class, zero-terminate at will and so on. Change-Id: I6d5e0710eaaba0a218b3eb32f6569177356f4462 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2176 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-08-02Provide od+sed replacement for the bin2char helperPaul Fertser3-68/+15
Using custom build-time tools is always more problematic, especially for cross-compiling. This alternative implementation assumes "od" (IEEE Std 1003.1-2001) and sed are available which should be the case for any reasonably modern system. Change-Id: I0208f475648c78e7dca127ff4bab60d314b2bf53 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2139 Tested-by: jenkins Reviewed-by: Fatih Aşıcı <fatih.asici@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-06-28swd: Improve parity calculation and move it to types.hAndreas Fritiofson1-0/+19
It could be reused by SWD drivers and in other places. Change-Id: Ieed0cf70c111a73d3a42ed59f46a0cdd177a73d5 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1957 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2014-05-09Update to the current Jim TclPaul Fertser2-3/+3
This is a post-release version but hopefully some fixes that went in are worth it; also the changes here make OpenOCD compatible with stock 0.75 version if a distro maintainer decides to use it. Change-Id: I7ad1814c7c4868198475cdca4750c3d0ee4f5f8b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2121 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2014-03-30Don't cast return value of [cm]allocAndreas Fritiofson1-1/+1
Change-Id: I0028a5b6757b1ba00031893d9a2a1725f915a0d5 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2069 Tested-by: jenkins Reviewed-by: Jörg Wunsch <openocd@uriah.heep.sax.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-09command: Fix formatting for empty usage stringAndreas Fritiofson1-1/+1
Introduced by requirement in 54d6330b. Change-Id: If3dba057127b54b15ca7f364f37c6286d34f77e0 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Reviewed-on: http://openocd.zylin.com/1858 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-22Add %APPDATA%\OpenOCD to script search path on winAndreas Fritiofson1-0/+11
Change-Id: I01e9715fe064f3ff41e41a59a4764d6474f82183 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1797 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>