aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2013-12-17fix flash bank auto_probe() fail with multiple targetsSergey A. Borshch
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 Fritiofson
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 Chico
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 Oliver
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 BRUNO
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 Zhang
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 Fritiofson
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 Ekman
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 Ekman
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 Ekman
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 K
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 Oliver
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 Fritiofson
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 Fertser
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 Yurovsky
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 Trinomius
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 Bowman
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 Fritiofson
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 K
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 Fritiofson
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 Fritiofson
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 Fritiofson
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 Fritiofson
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 Fritiofson
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 Fritiofson
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 Fritiofson
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 Fritiofson
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>
2013-10-31lpc2900: Fix byte order bugs and remove unnecessary castsAndreas Fritiofson
Found by grepping for pointer casts. Change-Id: Ib94957a0c53ec7abcbd5787d8c70e20c9eedc4b7 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1770 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31aduc702x: Fix byte order bugAndreas Fritiofson
Found by grepping for pointer casts. Change-Id: I00e000515cb2573130b73423eb19ba941f524b05 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1769 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31ftdi: Remove unnecessary castAndreas Fritiofson
Also make sure future growth of the tap_get_tms_path() return value will get noticed. Change-Id: Id859b463e5fdc819a4bc3b4845bf4363fbe713af Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1768 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31Remove unnecessary castsAndreas Fritiofson
Change-Id: Ia97283707282ccccdc707c969f59337313b4e291 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1767 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31nand/mx*: Remove unused host endianness flagAndreas Fritiofson
Probably shouldn't depend on that anyway. Change-Id: Ic27ead4cb82cff1ab187696439da4b93941e09d8 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1766 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31Remove unnecessary (void *)Andreas Fritiofson
When pointer casts are needed, cast directly to the correct type, instead of going via void*. Don't explicitly cast to void* if it would have been done implicitly. Change-Id: I4093209200051c5eb62847d00a4b9c8567480068 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1669 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31Clean up const usage to avoid excessive castingAndreas Fritiofson
Don't use const on pointers that hold heap allocated data, because that means functions that free them must cast away the const. Do use const on pointer parameters or fields that needn't be modified. Remove pointer casts that are no longer needed after fixing the constness. Change-Id: I5d206f5019982fd1950bc6d6d07b6062dc24e886 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1668 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-31Clean up many C99 integer types format specifiersPaul Fertser
This eliminates most of the warnings reported when building for arm-none-eabi (newlib). Hsiangkai, there're many similar warnings left in your nds32 files, I didn't have the nerve to clean them all, probably you could pick it up. Change-Id: Id3bbe2ed2e3f1396290e55bea4c45068165a4810 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1674 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-29cortex_m: set fpb_enabled on enabling fpbSpencer Oliver
If the fpb_enabled is not set then as part of cortex_m3_set_breakpoint we enable the fpb, however we do not signal the fpb as being enabled. This issue only effects the hla target as the current cortex_m code enables the fpb during cortex_m3_endreset_event. Change-Id: I44d3fc65916c131b7a226869dd16aed5afb441b4 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1634 Tested-by: jenkins
2013-10-29hla/stlink: Re-order trace parameters to allow trace output file to be optionalJames G. Smith
Re-order the "trace" parameters to allow the raw capture (log) file to be an optional feature. The clock frequency for calculating the "Async Clock Prescalar" is always required when enabling trace processing and is now the first "required" parameter. The ST-Link driver is updated to use the (required parameter) "trace_source_hz" non-zero value as the indicator of trace being required, rather than the now optional output file descriptor being non-NULL. Background: This patch is groundwork for extending the OpenOCD SWO capture to implement other (OpenOCD built-in) ITM/DWT processing where the core trace support is required, but there is no requirement to store raw trace data to a configured host file. By itself this patch is almost a functional NOP, since without the other processing in place there is no reason NOT to specify a capture file. Change-Id: Ibc385dd0a7adaf9bd652bceded27262fef35fd59 Signed-off-by: James G. Smith <jsmith@ecoscentric.com> Reviewed-on: http://openocd.zylin.com/1660 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-29sam4s flash: fix PLLA frequency calculation if diva > 1Thomas Schmid
The code didn't address the case where diva is bigger than 1. Change-Id: I15d8c47aa7b5cf80df1f29e067f30575f5d60a90 Signed-off-by: Thomas Schmid <thomas.schmid@gmail.com> Reviewed-on: http://openocd.zylin.com/1765 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-29hla_interface: init trst, srst variables.Sergey A. Borshch
There is an remark in jtag_srst and jtag_trst variables declaration: /* * JTAG adapters must initialize with TRST and SRST de-asserted * (they're negative logic, so that means *high*). But some * hardware doesn't necessarily work that way ... so set things * up so that jtag_init() always forces that state. */ but in hla_target such forsing is missed and both variables remains uninitialized until "reset" command issued, It prevents target polling when connecting to running target. Change-Id: Ia620d8794cca8ba1403f5c5f24767e730033748a Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/1698 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2013-10-29lpc2000: Fix flash programming fail on LPC4300 internal flashNemui Trinomius
LPC43xx with internal flash parts model needs "IAP Init(49)"Command before erase & write internal flash.Tested on a LPC4337 and LPC4357. Change-Id: I48620ce12e578c61a3ca1adcd48815c1f71c35bb Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/1784 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-16flash: mxc nfc(v1) : fix incorrect address in spare area for biswap commandGaëtan Carlier
For NFC v1 (i.MX27), swapping must be done between offset 464 of Main buffer and offset 4 of Spare buffer. Change-Id: I09c2036e88770032da87d5846cd2094847f47b46 Signed-off-by: Gaetan Carlier <gcembed@gmail.com> Reviewed-on: http://openocd.zylin.com/1692 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-15lpc288x: Can now use target_write_buffer()Andreas Fritiofson
Use the preferred code path according to the comment. Target_write_buffer() now simply uses suitably aligned target_write_memory calls, so from this pov, they should be equivalent. Change-Id: I77f51ec3ac9faa822cf428708a1aecb67c77830c Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1687 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-15nds32: Remove unused declarationAndreas Fritiofson
Change-Id: Ie0df720b2adacc8f10474f88f15142fa94c388b8 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1686 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-15 hla_target: Update target state when pollingSergey A. Borshch
Polling target does not change stste information except if new state is TARGET_HALTED. Connecting to the runing target result in target->state not updated with retrieved value and remains "UNKNOWN" until 'halt' command issued. Change-Id: I803d6c0207f7f8699e648779d1df342c9ee7315a Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/1680 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-15arm7_9: Avoid infinite loops in bulk write dispatchingAndreas Fritiofson
Add a mandatory field in struct arm7_9_common for regular, non-optimized memory writes. Together with the existing bulk_memory_write field, this allows variants to select any combination of implementations for regular and bulk writes, without risking infinite loops from accidentally using bulk writes for implementing bulk writes. ARM 7/9 targets may now select arm7_9_memory_write_opt as their target.write_memory implementation, which will dispatch to arm7_9_common.bulk_write_memory if possible, or fallback to arm7_9_common.write_memory otherwise. To avoid loops, bulk write implementations mustn't call any other functions than arm7_9_write_memory_no_opt() to write memory; it will unconditionally call arm7_9_common.write_memory. If they fail, they should simply return error to allow the caller to fallback to regular writes. Tested on a regular ARM7TDMI only. Change-Id: Iae42a6e093e2df68c4823c927d757ae8f42ef388 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1685 Tested-by: jenkins Reviewed-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-15openrisc/tap_vjtag: fix IR settingFranck Jullien
Change-Id: I2b1f057dc9777ff263d6cefa4ff5958e85607a22 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1694 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-15openrisc/du_adv: check or1k_adv_jtag_init return valueFranck Jullien
Change-Id: I784c16b8137b4269254c86007e6766b1a2297aa2 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1693 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-15jtag_vpi: use DIV_ROUND_UPFranck Jullien
Change-Id: I31d315a79a1587d7873c5b8713daf8276fa146d0 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1683 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-10-15jtag_vpi: fix path move functionFranck Jullien
Change-Id: I82bf6f733e0d9cb5c86553d0827c558fa98aa247 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1672 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-10-15sam4s flash: remove unused bootstrap routineAndrey Yurovsky
Remove the static const array containing ARM instructions for a bootstrap program. Despite what the comment says, the DAP can write to the Flash and in fact this program is not referenced anywhere in openocd so it's a bit confusing having it in there. There should be no functionality change from this. Change-Id: I4ca4206f090a896628ee9b675d1f04450ada1563 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1641 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>