aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-08-07docs: remove mixed case typoSpencer Oliver
Change-Id: Iae40c59ed21e72931d440814d112b3cd752aad9c Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1540 Tested-by: jenkins
2013-08-07target: clear running_alg flag after resetPaul Fertser
After the target was reset we can be sure it's not running any algorithm. This fixes the following failure scenario: On my STM32F103 board after I start the firmware and then stop and try to "load" in gdb (before doing mon reset halt), I get Error: timeout waiting for algorithm, a target reset is recommended However, target reset doesn't help as the flag is still there ("Error: Target is already running an algorithm"), so I have no choice but to restart the OpenOCD process. I'm not sure yet what exactly prevents load from working after my firmware is initialised, most probably some interrupt is firing and my handler produces a fault due to garbled RAM. Change-Id: Idd977f2780a64d84800e3abd412cffc1ab6801b0 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1512 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07mdr32fx: support for Milandr's MDR32Fx internal flash memoryPaul Fertser
This adds example config and flash driver for russian Cortex-M3 microcontroller model. Run-time tested on MDR32F9Q2I evaluation board; the flash driver should be compatible with MDR32F2x (Cortex-M0) too but I lack hardware to test. There're no status bits at all, the datasheets specifies some delays for flash operations instead. All being in <100us range, they're hard to violate with JTAG, I hope. There're also no flash identification registers so the flash size and type has to be hardcoded into the config. The flashing is considerably complicated because the flash is split into pages, and each page consists of 4 interleaved non-consecutive "sectors" (on MDR32F9 only, MDR32F2 is single-sectored), so the fastest way is to latch the page and sector address and then write only the part that should go into the current page and current sector. Performance testing results with adapter_khz 1000 and the chip running on its default HSI 8MHz oscillator: When working area is specified, a target helper algorithm is used: wrote 131072 bytes from file testfile.bin in 3.698427s (34.609 KiB/s) This can theoretically be sped up by ~1.4 times if the helper algorithm is fed some kind of "loader instructions stream" to allow sector-by-sector writing. Pure JTAG implementation (when target memory area is not available) flashes all the 128k memory in 49.5s. Flashing "info" memory region is also implemented, but due to the overlapping memory addresses (resulting in incorrect memory map calculations for GDB) it can't be used at the same time, so OpenOCD needs to be started this way: -c "set IMEMORY true" -f target/mdr32f9q2i.cfg It also can't be read/verified because it's not memory-mapped anywhere ever, and OpenOCD NOR framework doesn't really allow to provide a custom handler that would be used when verifying. Change-Id: I80c0632da686d49856fdbf9e05d908846dd44316 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1532 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07stlink: add SWO tracing supportAndrey Yurovsky
Enable reading the SWO trace output via STLinkv2 dongles that support it. This adds an optional initialization parameter "trace" with which the user specifies a destination file where SWO trace output is appended as it comes in as well as the trace module's source clock rate. STLink will be configured for a 2MHz SWO data rate (STLink's highest supported rate) if the source clock is > 2MHz, otherwise the source clock is used as the data rate directly. For example: trace swo.log 168000000 If "trace" is specified with a usable file path, the stlink_usb driver will attempt to configure and read SWO trace data as follows: - on _run(), the target's TPI and TMI are configured and the STLinkv2 is told to enable tracing. Only generic ARM TPI and TMI registers are configured, any MCU-specific settings (ex: pin routing) are the responsibility of the target firmware. The configuration applied is based on the STLinkv2's capabilities (UART emulation). - on _v2_get_status(), the trace data (if any) is fetched from the STLink after the target status is checked and the target is found to be running. - on _halt(), the STLink is told to disable tracing. When fetching trace data, the entire trace frame is written to the output file and that data is flushed. An external tool may be used to parse the trace data into a more human-readable format. Tested on ARM Cortex M4F and M3 MCUs (STM32F407 and STM32L152). Change-Id: Ic3983d46c82ba77010c23b0e18ce7b275d917f12 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1524 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-07gdb_server: check target before executing event callbackHsiangkai Wang
As debugging multi-targets, every target has its own gdb connection. If there are two connections, gdb_target_callback_event_handler will be registered twice. Everytime event occurs, the registered callback will be executed twice. If both targets are running, as user issues ctrl-c in one gdb client, both connections will send "stop reply" to GDB clients even TARGET_EVENT_GDB_HALT is caused by one of them. The commit fix above problem as debugging multi-targets. Change-Id: I1e12d4846927d7dcf1e3bb9aeb1affabc80df813 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1501 Tested-by: jenkins Reviewed-by: Sergey Borshch <sb-sf@users.sourceforge.net> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07gdb_server: add target_debug_reason for program exit detectionHsiangkai Wang
Currently, there is no way to notify gdb that program has exited. Add new target_debug_reason called DBG_REASON_EXIT to notify gdb the condition has occured. If the debug reason is DBG_REASON_EXIT, gdb_server will send 'W' packet to tell gdb the process has exited. Change-Id: I7a371da292716a3e6ac4cc2c31b009a651fe047a Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1242 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07gdb_server: support File-I/O Remote Protocol ExtensionHsiangkai Wang
The File I/O remote protocol extension allows the target to use the host's file system and console I/O to perform various system calls. To use the function, targets need to prepare two callback functions: * get_gdb_finish_info: to get file I/O parameters from target * gdb_fileio_end: pass file I/O response to target As target is halted, gdb_server will try to get file-I/O information from target through target_get_gdb_fileio_info(). If the callback function returns ERROR_OK, gdb_server will initiate a file-I/O request to gdb. After gdb finishes system call, gdb will pass response of the system call to target through target_gdb_fileio_end() and continue to run(continue or step). To implement the function, I add a new data structure in struct target, called struct gdb_fileio_info, to record file I/O name and parameters. Details refer to GDB manual "File-I/O Remote Protocol Extension" Change-Id: I7f4d45e7c9e967b6d898dc79ba01d86bc46315d3 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1102 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07gdb server: new feature, add stop reason in stop reply packet for gdbHsiangkai Wang
In GDB remote serial protocol, the stop reply packet could contain more detail stop reason. The currently defined stop reasons are listed below. * watch * rwatch * awatch * library * replaylog This commit adds stop reason, watch/rwatch/awatch, in stop reply packet for just hit watchpoint. As manual indicates, at most one stop reason should be present. The function needs target to implement new hook, hit_watchpoint. The hook will fill the hit watchpoint in second parameter. The information will assist gdb to locate the watchpoint. If no such information, gdb needs to scan all watchpoints by itself. Refer to GDB Manual, D.3 Stop Reply Packets Change-Id: I1f70a1a9cc772e88e641b6171f1a009629a43bd1 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1092 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-07gdb_server: support gdb target descriptionHsiangkai Wang
* Add a parameter in .get_gdb_reg_list() to return different register lists as generating target description. * Modify STRUCT REG to let gdb generate target description according to register information. The modified structure of register is struct reg { const char *name; uint32_t number; /* for regnum="num" */ struct reg_feature *feature; /* for register group feature name */ bool caller_save; /* for save-restore="yes|no" */ void *value; bool dirty; bool valid; bool exist; uint32_t size; struct reg_data_type *reg_data_type; /* for type="type" */ const char *group; /* for group="general|float|vector" */ void *arch_info; const struct reg_arch_type *type; }; Change-Id: I2096b67adf94518ba0b8b23d8c6a9f64ad7932b8 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1382 Tested-by: jenkins Reviewed-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-05jtag/drivers: usb_blaster cheap clone documentationRobert Jarzmik
Add documentation about the cheap clone based on the Cypress chip. The documentation has schematics data, and throughtput mesures. Change-Id: I51bf19ff9229565e178dd4c1231682bd9b4b7a8b Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-on: http://openocd.zylin.com/1520 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-01flash: add Winbond w25q80bv spi supportNemui Trinomius
Not tested, adapted from http://tech.groups.yahoo.com/group/versaloon/message/391 Change-Id: Ibe87c617b3cdf70ee042112609ab46bea98a3e6d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1511 Tested-by: jenkins Reviewed-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-08-01imx6: add new id for SJC as found on i.MX6DPaul Fertser
Austriancoder on IRC reports getting this ID on his board. Change-Id: Ie859f0ee422e18fdb94bf817cdd2b41d15b968da Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1533 Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-01mpsse: Add missing read buffer checksAndreas Fritiofson
These two unused functions added reads without checking for available space. Change-Id: I17dbbe9988b057e5a3a1768f405fc9d1027d1c01 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1500 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-01mpsse: Defer errors until flushAndreas Fritiofson
Simplify the API by making all MPSSE command functions return void instead of an error code. If there is an error during an implicit flush in a command call, further commands are ignored until an explicit flush is performed. The flush function returns and clears any error code set. The only command functions that still return an error code are those that can fail directly based on the type of the FTDI chip, i.e. when trying to enable RCLK or divide-by-5 on a non-high-speed chip. Adapt the ftdi adapter driver to the new API. Change-Id: I12979c723c81f7fd022c25821b029112f02b3f95 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1499 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-08-01docs: add missing embKernel rtos arg to docsSpencer Oliver
Change-Id: Ib304a2bf272d281f6cd124ffca95b32531d57899 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1529 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2013-07-30configure.ac: Remove obsolete(?) oddityAndreas Fritiofson
It causes build failure by adding the build system's includes to the compiler's search path when cross-compiling with --prefix=/usr. Building seems to work fine without it. It was added in f7274784. No idea what it was trying to solve that couldn't be covered in a better way. Change-Id: Ia32863f0b0cbd498eb34bd2fce73126db5b71a1f Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1530 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2013-07-30Fix out-of-tree buildAndreas Fritiofson
The current AX_CONFIG_SUBDIR_OPTION macro assumes that $srcdir is a relative path. If it is not, jimtcl/configure.gnu is generated such that an out-of-tree build will fail at the configure step unless the build dir is a sibling to the source dir. Change the generated jimtcl/configure.gnu wrapper to use the same `dirname $0` trick as jimtcl/configure (which itself is a wrapper around autosetup). Change-Id: I0fb19ae114ba37169b422b28313262f9bd83eb6f Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1528 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2013-07-30automake: use subdir-objects optionPaul Fertser
Automake 1.14 introduced several non-fatal warnings that should help projects prepare to the next major automake release (2.0). Considering the way OpenOCD automake files are written, using subdir-objects doesn't have any adverse effects, so enable it for the future compatibility. Change-Id: I3e7fd93d1b53c5a7ed00ec0f03d2d1510a07f516 Reported-by: Freddie Chopin <freddie_chopin@op.pl> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1517 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-07-26lpcspifi: assume flash is unprotected after probingPaul Fertser
Since the driver doesn't support any hardware flash protection, it doesn't make sense to report "protected" status after probing, as it requires extra commands to unprotect before flashing and might be confusing for the end-users. Change-Id: I04d96790cc42412df5334951f39fb6723c972ced Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1525 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-26stm32f2x flash: add STM32F401 (F4 low power)Andrey Yurovsky
Add support for the new STM32F401 parts. These are similar to the STM32F405/407 however they are a new Low Power variant with ID code 0x423 and have 256K of Flash. Tested with a modified F4 discovery board. Change-Id: Ida5fb14a0832934b4d6d1ec11e602df5076edbc8 Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1521 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-26rtos: issue warning on auto detect failureSpencer Oliver
Currently if we fail to auto detect an rtos then no warning is given. This can also be triggered if we only find some of the rtos symbols. Change-Id: I215991bbce0909bc6af93560b0f55db13defd123 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1514 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-07-26cortex_m: change cmd output to use cortex_m rather than cortex_m3Spencer Oliver
Change-Id: I33834910c44d22169bcf684e9697a8db49d0b396 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1513 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-07-17target: fix halt and wait_halt timeout unitsPaul Fertser
Documentation says they should be given values in milliseconds, DEFAULT_HALT_TIMEOUT matches that too. Change-Id: Ic1a30fa90f75b412c43fe50ba187d01c3d0a5fba Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1504 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17etm: prevent segfault when reading bogus informationPaul Fertser
When I do not have the JTAG adapter connected to the target, I often end up always reading 1s from the chain. If the OpenOCD is configured to connect to an ETM-equipped target (i.MX25 ARM9 in my case), this results in writing garbage values in the etm reg_cache as the ETM bit fields for the comparators, counters and outputs are wider than the amount of entries in the corresponding arrays. This later results in a segfault in the first etm_reg_lookup() call. Change-Id: Ied81fdbf3a53a3dd749e2e5e97adf86c012df575 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1505 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17mips: add breakpoint support for EJTAG 2.0Oleksij Rempel
EJTAG 1.5, 2.0 and 2.5 have different breakpoint register addresses. This patch add support of EJTAG 2.0, which is part some broadcom SoCs. This work was testet on Broadcom BCM7401. Change-Id: I4b0ee23871fa9205f9001b7c9165e7b6ebe9ccbf Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-on: http://openocd.zylin.com/1464 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17mips32: add new functions mips32_configure_ibs and _dbsOleksij Rempel
Split function mips32_configure_break_unit to mips32_configure_ibs and mips32_configure_dbs to make code more readable. This will probably make work easyer with differnet EJTAG versions. Change-Id: I666f949fd7bc3656bdf75e7bcaadb164f15855dd Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-on: http://openocd.zylin.com/1463 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17mips32_pracc: jump to 0xff20.0200 if cpu reads wrong addrOleksij Rempel
On some CPUs, like bcm7401 with EJTAG v2.0 we can have situation where CPU do not stops execution. For example, all CP0 commands will have this issue. In this case we should some hove recover our session. Currently jump to 0xff20.0200 seems to be good option. If it brake some thing on newer EJTAG, then check for EJTAG v2.0 should be added. Change-Id: Icd8841f38a1a85e0f7682b6dc358af8dfaae0744 Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Reviewed-on: http://openocd.zylin.com/1353 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17mips32: add jump instructionOleksij Rempel
This instruction we will need to make jump to 0xff20.0000 Change-Id: Ic723e683e8848492cd8e186e71fd668dbd1d97e6 Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Reviewed-on: http://openocd.zylin.com/1338 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17do not wait forever on ejtag_dma_dstrt_pollOleksij Rempel
Change-Id: I26adab09839795ecf363b7db912392bd5314cec5 Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Reviewed-on: http://openocd.zylin.com/1344 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17mips32_dmaacc: add new funct ejtag_dma_dstrt_pollOleksij Rempel
Change-Id: I8472a85032e397445408dce917f60c8e6ce852e2 Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Reviewed-on: http://openocd.zylin.com/1343 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17mips_ejtag: remove memory protection bit before DMOleksij Rempel
Change-Id: Id1564ae063cea4f056b350436d52df5381ca9608 Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Reviewed-on: http://openocd.zylin.com/1341 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17mips_ejtag: cache ejtag version to avoid recalculationOleksij Rempel
Some parts of code are version specific. It will be easier if we extract ejtag version and store it some where. Change-Id: I8f9addc42108cba5ae9d61b8ade8f9d7f02a0fb5 Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-on: http://openocd.zylin.com/1462 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17OpenULINK firmware: update firmware hex imageMartin Schmölzer
This image has been re-compiled with SDCC 3.3.0 and achieves slightly better performance (50-100 Byte/s for STM32F103 flash write) due to new/improved compiler optimizations. Successfully tested with ULINK probe and STM32F103 (debug, erase and write flash). Change-Id: I4329aa42f50461fa3719fd63d0054d8e86982727 Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1486 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17OpenULINK firmware: change .lnk file extension to .lk in "make clean"Martin Schmölzer
Recent versions of SDCC generate .lk files instead of .lnk - change the OpenULINK Makefile "clean" target and top level .gitignore file to reflect this. Change-Id: I36f38638b712b962498c69c362f123378e1aa045 Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1485 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17OpenULINK firmware: Use C99 designated struct initializersMartin Schmölzer
Recent versions of SDCC added support for C99 designated struct initializers. This provides better code readability (no functional changes). Successfully tested with ULINK probe and STM32F103 (debug, erase and write flash). Change-Id: Idfa35147d2c3043baaa21a811b926b3845c85f9b Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1484 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17ULINK driver and OpenULINK firmware: whitespace and comment fixes (trivial)Martin Schmölzer
In commit de0130a0aad83c1ef692ee4d68ab996a8668424d, some doxygen documentation blocks of the form "///< ..." (documentation after member) got changed to "/* /< ...", which is not recognized by doxygen. This commit changes them to the correct form "/**< ...". Also, remove some leading whitespace characters and fix alignment of comment blocks where appropriate. Change-Id: I73a5cf55753722fa0e1d6551f05c47ee88172f0f Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1483 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17OpenULINK firmware: fix name of USB Jump Table symbolMartin Schmölzer
Fix a case mistake in the name of the USB Jump Table ("USB_jump_table" vs. "USB_Jump_Table") which led to an assembler error when attempting to build the firmware with recent SDCC versions, because the assembler now treats symbol names as case-sensitive. Successfully tested with ULINK probe and STM32F103 (debug, erase and write flash). Change-Id: I979667b9130efcdccc3ac73269c38f06e0590048 Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1482 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-17ULINK driver: port from libusb-0.1 to libusb-1.0 APIMartin Schmölzer
The ULINK driver now uses libusb-1.0 calls (synchronous device I/O) directly (not the common layer provided by libusb1_common.c) Successfully tested with ULINK probe and STM32F103 (debug, erase and write flash). Change-Id: Ic037a3582db85e49a8cc1ec0dd36f629e4757929 Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-on: http://openocd.zylin.com/1459 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15target: use consistent halt timeoutSpencer Oliver
On slow targets we sometimes get false messages about timeouts due to poll using 1sec rather than the default 5sec timeout. Change-Id: Icc81c78e0ca86cebf9eeb2f5307cf7a82f1f4ee8 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1466 Tested-by: jenkins
2013-07-15configure: remove AM_MAINTAINER_MODE, effectively always enabling all the rulesPaul Fertser
There're strong arguments against using this macro (mostly regarding build consistency), so remove it altogether. Change-Id: I90c8e9a86a24571019366435bd868a6799a09c45 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/1476 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-07-15jtag/drivers: trivial variable renamingRobert Jarzmik
Rename ublast_sleep() time variable from ms to us as the unit is in micro-seconds. Change-Id: I07ff9c36d302d5d59edb8a5faa73d78cdd6145a4 Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-on: http://openocd.zylin.com/1457 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15ulink: Move firmware install from pkglibdir to pkgdatadirAndreas Fritiofson
The precompiled OpenULINK firmware is just data to OpenOCD so I think it belongs in $(prefix)/share/openocd rather than in $(prefix)/lib. Change-Id: Id84c32cd0ddfb96861e903e8f23c16a81e1a0ca1 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1487 Tested-by: jenkins Reviewed-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15automake: Don't install libopenocdAndreas Fritiofson
Regular users (and probably no-one else either) have no use for this library that is installed by default. Change-Id: Ie94e1550cec33f26ef9b68e7ce4f46494f18e644 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1479 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15dsp563xx: Adding breakpoint/watchpoint support.Bernhard Kiesbauer
Added missing breakpoint/watchpoint implementation to dsp563xx target. Implementation is not yet complete, which means it does not leverage all available features of the once debug interface. This does NOT use the openocd breakpoint/watchpoint command because of the "special" memory address spaces (X/Y/P/L) of the 56k DSP series. Change-Id: I6840a3ff1e6fdebb38ab7758f164886aff773af6 Signed-off-by: Bernhard Kiesbauer <bernhard@kiesbauer.com> Reviewed-on: http://openocd.zylin.com/1468 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15ftdi/board: Add support for DENX M53EVKMarek Vasut
Add support for DENX M53EVK board and it's integrated on-board JTAG adapter using FT2232H. Change-Id: I022dcafa7799bb84a7873ba67ed82f1e49094320 Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Reviewed-on: http://openocd.zylin.com/1461 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-07-15target: Pull out the jtag_rtck from iMX5x filesMarek Vasut
Pull the jtag_rtck setting from imx51.cfg and imx53.cfg . Since not all boards using these CPUs do support RTCK signal, move the configuration of RTCK into board files. Change-Id: I632c5d38e00ada8779a451cd26428fd122452001 Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Reviewed-on: http://openocd.zylin.com/1460 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-07-15ftdi: Fix error in calloc retval checkAndreas Fritiofson
Found by clang. Change-Id: Iaa952b063779f4d392d8bdc62a3e7ce9daef2740 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1498 Tested-by: jenkins Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15flash/stm32*: Sync all device/rev IDs with reference manualsAndreas Fritiofson
Uppercase device/family names and change them to be more specific and consistent across all STM32 families. High-density STM32F10x has a Rev Y according to RM0008 Rev 14, so add it. I have a STM32F30x Rev Y, sitting on my desk, but it isn't described in the reference manual. Add it as well. Split the STM32L1xx Medium+ Density devices based on ID, to match the reference manual. If I read it correctly, the Medium+ devices have different revision mappings depending on their package/device ID. I have no real devices to examine, however. Change-Id: I5b95e5fa3cdeba219aa96838ea06ec1bb62bd921 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1497 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15flash/stm32*: Rewrite info functionsAndreas Fritiofson
Factor out common bit masking and printing code and use intermediate strings to avoid buffer size handling. Change-Id: I7d8c12df11ade6cdca8c917b5524372daa498bf4 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1496 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-07-15flash/stm32*: Remove the halted check in protect_checkAndreas Fritiofson
These chips are capable of reading the flash registers while they're running. Change-Id: I76b90b2bae1aa79b5a063b2073faa5d3ed93cfd7 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1495 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>