aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-01-15Conform to C99 integer types format specifiersHsiangkai Wang21-556/+784
Review and modify to conform to C99 integer types format specifiers. Use arm-none-eabi toolchain to build successfully. Change-Id: If855072a8f88886809309155ac6d031dcfcbc4b2 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Signed-off-by: Hsiangkai <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1794 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-15Atmel samd: add support for SAMD21Andrey Yurovsky1-0/+22
Tested with SAMD21J18A on the SAMD21 Xplained Pro board. Change-Id: Ice9ebcd229ed038b3193baf92d910f9256d7ce91 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1873 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-11cortex_m: Avoid unnecessary saving and restoring of DCRDRAndreas Fritiofson1-54/+37
This is used for the emulated DCC channel which is only maintained as long as target->dbg_msg_enabled is set. Skip the saving and restoring if not enabled to save one dap_run() per core register access. Note that we could've probably queued all core register accesses in the same transaction if the armv7 register framework hadn't required synchronous register accesses. Change-Id: I4fe6d713261ee5db42422203eb63035fdcc48891 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1848 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-11adi_v5: Remove unnecessary MEM-AP access functionsAndreas Fritiofson3-153/+38
It's far nicer to pass a size parameter than to split the calls to separate wrappers which are combined to a single function anyway. Change-Id: I716741ebf916f6f8e9358a31c8f4fe761107c82f Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1847 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-11cortex_m: Fix possible endianness problem in emulated DCC channelAndreas Fritiofson1-13/+16
Change-Id: If7104464a8c65085f3ceac445e9c9be8446f2da9 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1846 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-11target: Add test bench for memory access functionsAndreas Fritiofson1-0/+199
Change-Id: I86e6fe4d0b4d580389ae5e1d3f4813d1e25b2613 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1629 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-11lpc2000: fix LPC810 programming supportNemui Trinomius1-5/+7
IAP commands fail on programming LPC810 because it has only 1kByte of SRAM. This patch is fixing cmd51_max_buffer suitable size for LPC810,LPC811 and other LPC1000 series. Tested on a LPC810,LPC812,LPC11u14,and LPC1114(DIP28). Change-Id: Iecec9fd963cb63bdff4a7bd3bbf4f8b1a7c60fbd Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/1843 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-09add support for Atmel SAMD NOR FlashAndrey Yurovsky3-0/+589
This adds a new NOR Flash driver, "at91samd", which supports the built-in Flash on Atmel's D-series Cortex M MCUs, starting with the D20. Parts and their geometry are detected automatically using the DSU and lookup schemes described in the D20 document, 42129F–SAM–10/2013. Future D-series variants and families should presumably use this controller as well (possibly with minor changes and improvements). Tested on the SAMD20 Xplained Pro board, for which we also add the corresponding Flash configuration. Change-Id: Id8d3dd601e9f53121682d1a1190d0be4ea3b83eb Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1684 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-09add support for Atmel SAM4L NOR FlashAndrey Yurovsky3-0/+671
This adds a new NOR Flash driver, "at91sam4l", which supports the built-in Flash on Atmel's low-power SAM4L family of Cortex M4 MCUs. Parts and their geometry are detected automatically using the Chip ID and lookup schemes described in document 42023E–SAM–07/2013. Tested on AT91SAM4LC4CA via the SAM4L XPlained Pro development kit. Change-Id: If73499dee92cc8ce231845244ea25c6984f6cecd Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1639 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-09cmsis-dap: add initial cmsis-dap supportSpencer Oliver11-19/+1495
This is based on work from: https://github.com/TheShed/OpenOCD-CMSIS-DAP/tree/cmsis-dap Main changes include moving over to using HIDAPI rather than libusb-1.0 and cleaning up to merge into master. Support for reset using srst has also been added. It has been tested on all the mbed boards as well as the Freedom board from Freescale. These boards only implement SWD mode, however JTAG mode has been tested with a Keil ULINK2 and a stm32 target - but requires a lot more work. Change-Id: I96d5ee1993bc9c0526219ab754c5aad3b55d812d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1542 Tested-by: jenkins
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>
2014-01-08Allow "tcl_port" to be run after config to simply display the port.Robert P. J. Day1-1/+1
To be consistent with gdb_port and telnet_port, allow tcl_port to be run to display the configured port number, while still not allowing the user to change it after configuration. Change-Id: Ibe6aedb3bd447f2985e42dd8246358481a047dd6 Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Reviewed-on: http://openocd.zylin.com/1857 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-31jtag_vpi: make the server address configurableFranck Jullien1-3/+29
Change-Id: I58e89c789b79ffb0b54ef94d208be876c271ddf7 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1840 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-30target/image: allow for comments in IHEX filesFranck Jullien1-0/+3
This is not in the Intel hex file format specification but some hex files may include comments (i.e. Altera USB-Blaster II firmware) starting with '#'. This patch makes image_ihex_buffer_complete_inner to skip comment lines. Change-Id: Id1f57d84d75da45e592f1c72b2b8c29193bc14e3 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1842 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-30topic: Added Spansion S25FL128S and S25FL256S spifi devices.Steve Moorby1-0/+2
S25FL256S device tested on mbest LPC4357 EVM, S25S128S untested but from the same data sheet. Change-Id: Idf58416aab08671fe29d22c3c34c2118b25a9d45 Signed-off-by: Steve Moorby <steve.moorby60@gmail.com> Reviewed-on: http://openocd.zylin.com/1844 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-12-22kinetis : Add timeouts to flash status checking in dap_syssec_kinetis_mdmap().Per Ekman1-4/+24
Change-Id: Ifc8fe7aa4c2a40a78fa0655435e82418f549bad3 Signed-off-by: Per Ekman <pekenator@gmail.com> Reviewed-on: http://openocd.zylin.com/1819 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-22stlink: remove stlink_api commandMathias K2-28/+1
Remove stlink_api command. Change-Id: I8f7885d3756fec462f9ebbee2ed285a98a51366c Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/1760 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-22kinetis : Detect MCU flash parameters based on the SDID register.Per Ekman1-30/+91
Try to detect the flash parameters based on the MCU SDID register. The hope is that this works for K and KL series MCUs but it has only been tested on a K21. YMMV. Change-Id: Idfe71383a449065267f393b09ee3c3b24ac6a803 Signed-off-by: Per Ekman <pekenator@gmail.com> Reviewed-on: http://openocd.zylin.com/1823 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> 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>
2013-12-22Remove special handling of script search path on WindowsAndreas Fritiofson1-42/+42
On all platforms, search for scripts in $HOME/.openocd ${run_prefix}${pkgdatadir}/site ${run_prefix}${pkgdatadir}/scripts On Windows, set run_prefix to the runtime path of the executable, minus ${bindir}. This is to enable the install dir to be moved anywhere, as long as the structure of the install dir is kept intact. On all other platforms, run_prefix is empty. The script paths can now be adjusted on Windows builds the normal way; by overriding pkgdatadir at build time. For example, to create a Windows package layout of bin/openocd.exe scripts/interface/... scripts/target/... you can do configure --prefix= --enable-... and then make pkgdatadir= DESTDIR=/some/path clean all install Also, remove the unused PKGLIBDIR define. Change-Id: If2c8228fc80c598d763efad21c5f51695ff9b6cf Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1796 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-22Avoid 'may be used uninitialized' warning from FreeBSD base GCCEd Maste1-1/+1
Change-Id: Ice2472bf7a467652485a5a8c36880c6a47d64c6c Signed-off-by: Ed Maste <emaste@freebsd.org> Reviewed-on: http://openocd.zylin.com/1835 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-22build: remove hard coded ftdi and usb librariesMathias K1-21/+3
This patch remove the hardcoded libraries. Also a check for libftdi1 installations was added. This check fix an issue with gentoo and maybe other systems. Change-Id: Ieff9ec4d66ee0f3e6b22261a10e4cab9f26b6b51 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/1759 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-22jtag_vpi: fix build errors under MinGWFranck Jullien1-4/+8
Change-Id: Ic13f9982014ead811e2f2d737ca1621e0e85577e Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1839 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-17fix flash bank auto_probe() fail with multiple targetsSergey A. Borshch2-3/+11
get_flash_bank_by_addr() iterates through all flash banks trying to auto_probe() every bank, even if bank can belongs to target other than requested, and this other target can be in non-halted state, which leads to error message and operation abort. Same situation in gdb_new_connection() and gdb_memory_map(): get_flash_bank_by_num() tries to auto_probe() requested bank, so first get bank by get_flash_bank_by_num_noprobe(), check if it belongs to current connection's target and skip get_flash_bank_by_num() (actually autoprobing) if not. Change-Id: I48b3f93dddcd9283394f14ad2de3248397c75ab3 Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/1813 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-12-17versaloon: Finish support for serial number matchingAndreas Fritiofson1-10/+27
Add a command to specify the serial string and pass it to the find helper. Actual matching was already supported for both serial and product but was using hard coded string indices. Instead use the indices from the device descriptor. Change-Id: I17c7538e5ad301ef41eace1ee70a202adab23bb4 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1816 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-14topic: Support for the Xilinx BSCAN_* Virtual JTAG in OpenriscSergio Chico4-1/+69
This add support to the Xilinx BSCAN_* virtual JTAG interface. This is the Xilinx equivalent of the Altera sld_virtual_jtag interface, it allows a user to connect to the debug unit through the main FPGA JTAG connection. Change-Id: Ia438e910650cff9cbc8f810b719fc1d5de5a8188 Signed-off-by: Sergio Chico <sergio.chico@gmail.com> Reviewed-on: http://openocd.zylin.com/1806 Tested-by: jenkins Reviewed-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-12-14flash: revert incorrect stm32f1 default_padded_valueSpencer Oliver2-3/+3
Commit 2493671e2d9c352ea70edc8665b4c8f172ef1141 added a default flash padded value to the wrong file, should have been stm32lx.c not stm32f1x.c. Change-Id: Idab634a03ccb28609cc977a92ac2b138d1e8d859 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1833 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-12-01NULL check before dereferencingLuca BRUNO1-1/+2
Check reg_list[i]->feature for NULL pointers before checking feature->name in order to avoid NULL access. Change-Id: If20401a6c5aa5e1e29f0fcf9bb95585b49658832 Signed-off-by: Luca BRUNO <lucab@debian.org> Reviewed-on: http://openocd.zylin.com/1809 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se> Reviewed-by: Jens Bauer <jens@gpio.dk>
2013-12-01[PATCH 1/2]support64: Add functions into types and targetDongxue Zhang3-0/+132
Add functions into types.h, target.c, target.h to operate 64bits data. Prepare for 64bits mips target. Change-Id: I668a8a5ac12ba754ae310fa6e92cfc91af850b1c Signed-off-by: Dongxue Zhang <elta.era@gmail.com> Reviewed-on: http://openocd.zylin.com/1700 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-12-01Add byte-swap helpersAndreas Fritiofson1-0/+40
Change-Id: I970616bb0e2bbc693165a0d311840febbd9134f1 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1798 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se> Reviewed-by: Franck Jullien <franck.jullien@gmail.com>
2013-11-08kinetis : Add flash sector size detection for K21 MCU.Per Ekman1-0/+22
The current way of detecting the sector size of the internal flash does not work for all Kinetis MCUs. Add support for the K21 flash by detecting the specific model from the SDID register and picking the correct sector size based on that. Change-Id: I41f678353e45a44561af8a3398bdd4479dfeea4f Signed-off-by: Per Ekman <pekenator@gmail.com> Reviewed-on: http://openocd.zylin.com/1764 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-11-08kinetis : Add flash read support to the kinetis nor flash driver.Per Ekman1-14/+1
The default_flash_read() function seems to work ok. Change-Id: Ia34c4642405f669ff63310fa8c641098b771a401 Signed-off-by: Per Ekman <pekenator@gmail.com> Reviewed-on: http://openocd.zylin.com/1763 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-11-08kinetis : Fix broken check for mass erase.Per Ekman1-6/+8
If the flash is not ready (MDM_STAT_FREADY is 0) then dap_syssec_kinetis_mdmap() would act as if the MDM_STAT_SYSSEC bit was set and erase the flash. Wait until MDM_STAT_FREADY is set before checking the MDM_STAT_SYSSEC bit. Change-Id: I5c3352f625599016625ed9be8787033f49bfacea Signed-off-by: Per Ekman <pekenator@gmail.com> Reviewed-on: http://openocd.zylin.com/1762 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-11-07hla: Make consistent parameter namingMathias K5-39/+39
Rename fd to handle. Change-Id: I98615aed1546976d00b0f20856d4e8e75f83c575 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/1761 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-11-07target: use target_buffer_set_u32_arraySpencer Oliver4-24/+9
Attempt to use target_buffer_set_u32_array to convert to target endian arrays rather reimplementing code. This also removed cfi_fix_code_endian as its functionality is also repeated. Change-Id: I7c359dbe46ea791cd5f6fb18d8b0fb6895c599d3 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1783 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-11-06ulink: Fix libusb include changed since pkg-config mergeAndreas Fritiofson1-1/+1
Change-Id: I1556aaf117f99de046e3c16d5386faaaefdfefd8 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1795 Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: jenkins
2013-11-06jtag: fix support for really long scansPaul Fertser1-1/+3
When programming large FPGAs the generated SVF files might contain really long SDR scans. They won't fit in the 1MiB jtag scan page at all, so in this case the allocated page needs to be bigger. The current code was silently corrupting memory. One particular example was sent by Volter targetting XC3S4000. It has an SDR 11316992 bits long, that is 1414624 bytes. Change-Id: I39f18d7e0654f2dbdf37df58c837c9ec1fb2aa2a Reported-by: "Voltner, Jiří" <j.voltner@era.aero> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1792 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-11-06stm32l flash: add another device IDAndrey Yurovsky1-1/+12
Add device ID 0x437, a dual-bank part with 512KB total. This one used the Medium+/HD flash size register to read the flash size in Kb rather than the 0/1 code in the Medium+ parts. Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Change-Id: I870fe3bb1b473939b7211c3b2edb44b4b3643648 Reviewed-on: http://openocd.zylin.com/1790 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-11-06fm3: fix Fujitsu MB9Ax family supportNemui Trinomius1-31/+24
Some MB9Ax (especially few internal SRAM model) fails programming because of wrong SRAM basic-address on running algorithm. Default SRAM basic-address must be 0x20000000. This patch is fixing default SRAM basic-address and ramcode offset. Tested on a MB9BF618T and MB9AF112K. Change-Id: Ibda9aceb4c317bcae0dcce9f6d0fd1c4b5d81952 Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/1793 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-11-06Correct argument numbering in trace commandAlan Bowman1-1/+1
The trace command was opening a file named with the source frequency. This change correctly passes the filename that is specified. Change-Id: Ia2eb8eda0e1e0f4f44b05c3a0ce7bef3bda51446 Signed-off-by: Alan Bowman <alan.michael.bowman@gmail.com> Reviewed-on: http://openocd.zylin.com/1800 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-11-05lpcspifi: Fix byte order bugAndreas Fritiofson1-3/+6
Found by grepping for pointer casts. Change-Id: I42ef3ebcce9fc6391154888b48601ede8377c34e Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1771 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31target: fix mem2array/array2memMathias K1-0/+2
if data size is bigger than transfer buffer, all portions are transferred from/to the same target address - address advance after successful transmission missed. Change-Id: I79a6c388af197ac062d2807e397a2d7947400520 Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/1679 Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Tested-by: jenkins
2013-10-31smp: Fix byte order bugAndreas Fritiofson1-7/+5
Found by grepping for pointer casts. Also rewrite to reduce scope and allocate the few bytes needed on stack instead of on heap. Change-Id: Ia2a369fb612e807b981ee60ebcfd9c09c2fbdf4c Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1779 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31ti_icdi_usb: Remove unnecessary casts and fix byte order bugsAndreas Fritiofson1-34/+30
Found by grepping for pointer casts. Some additional cast can be removed if hexify/unhexify arguments are changed to a more suitable type. Change-Id: I13796b056f00976979bf0e754de3aa7648f7f321 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1778 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31ioutil: Remove unnecessary casts and fix const-discardingAndreas Fritiofson1-8/+7
Using the right parameter type, there's no need to resort to casting. Change-Id: I8aec852431ead26e24793fd6fac8781353963bf2 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1777 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Jens Bauer <jens@gpio.dk>
2013-10-31binarybuffer: Remove unnecessary cast and fix hidden "bug"Andreas Fritiofson2-6/+6
Because of the cast, the const decoration on the parameter provided no guarantee against modification since it was silently discarded. Change-Id: Ib83ade955e1a61ee2175c690620437b5e19cbb6a Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1776 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31str9x: Fix byte order bugAndreas Fritiofson1-3/+4
Found by grepping for pointer casts. Change-Id: Ie2d698310b077c3849266e81df8e6a808cbc6896 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1775 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31str7x: Fix byte order bugAndreas Fritiofson1-3/+4
Found by grepping for pointer casts. Change-Id: I56d5680590e37d8c61197488067fbb0776e5e0f0 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1774 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31stm32f1x: Fix byte order bug and remove unnecessary castAndreas Fritiofson1-7/+7
Found by grepping for pointer casts. Change-Id: Ibd8f22a9e9ca71459ba0bedc8447a3623d0e4184 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1773 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31pic32mx: Fix byte order bugAndreas Fritiofson1-2/+4
Found by grepping for pointer casts. Change-Id: If73184a16904ec2958e7253ba98f44479fdcad3f Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1772 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>