aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)AuthorFilesLines
2017-12-12target: remove unused event definitionsTomas Vanek1-12/+0
Events reset-halt-pre, reset-halt-post, reset-wait-pre and reset-wait-post are not used anywhere. Change-Id: I9a0f94875b102d9b08f6c2fd9d73a9f05f8e8e79 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4285 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2017-12-12doc: improve stm32 flash driver documentationSpencer Oliver1-16/+15
also remove legacy footnote as it adds no value. Change-Id: I3892acf244bd8fba6f844a5d82a66004e193a395 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/4309 Tested-by: jenkins Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2017-12-12jtag: drivers: stlink: handle all versions with single configPaul Fertser1-2/+2
Extend HLA interface to allow multiple VID/PID pairs and use it to autodetect the connected stlink version. Change-Id: I35cd895b2260e23cf0e8fcb1fc11a78c2b99c69b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3961 Tested-by: jenkins Reviewed-by: Karl Palsson <karlp@tweak.net.au> Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2017-12-07docs: add missing stm32 flash driver documentationSpencer Oliver1-0/+67
Change-Id: I433780646e6fdfd0c2527b4a68025946ccb79d8b Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/4307 Tested-by: jenkins Reviewed-by: <alexandre.torgue@st.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2017-12-06flash: Add new stm32h7x driver supportAlexandre Torgue1-0/+27
Add basic support for: -STM32H7x (Embedded flash 2M) Erase and write tested on stm32h743. Change-Id: Ie8d8786227cdeee39fcf5663167a053ad8dcef4c Signed-off-by: Rémi Prud'homme <remi.prudhomme@st.com> Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com> Reviewed-on: http://openocd.zylin.com/4181 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2017-10-22arm: semihosting: set command line argumentsAndreas Fritiofson1-0/+14
Add "arm semihosting_cmdline [argv0 argv1 ...]" for setting the command line arguments for the debuggee. [andreas.fritiofson@gmail.com]: Dynamic allocation, empty default Change-Id: I831ddd161d602f251940e29608a154e9590fdee1 Signed-off-by: Christian Groessler <chris@groessler.org> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3106 Tested-by: jenkins
2017-10-03nrf51: Rename to nrf5Slowcoder1-4/+6
Renaming of all nrf51 NOR flash code to nrf5, as to prepare the code for being able to flash nrf51 and nrf52 chips. The nrf51 command is retained for backwards compatability. "nRF5" is also the name Nordic Semiconductor uses to describe both the nrf51 and nrf52 chips. Change-Id: I5f4e3f1ec780184b28ad44f735a746e68908c502 Signed-off-by: Slowcoder <slowcoder@gmail.com> Reviewed-on: http://openocd.zylin.com/4209 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2017-08-10Support for STM32F722, F723, F413 and F423Andreas Bolsch1-4/+9
IDs for STM32F722, F723, F413 and F423 added, handling of PCROP for F722/723 and additional nWPRT bits for F413/423 implemented. The additional protection bit positions for F413/423 conflict with other options bits for the F7xx variants, additionally the last two sectors share a common bit. Protection for F413 and F767/777 now use protection blocks rather sectors for dealing with protections bits. Checking for halted state in 'lock' and 'unlock' removed: When PCROP is activated in F723, halted state is not detected properly, but lock/unlock sequence is required to disable PCROP. Tested with STM32F723E-Disco, STM32F413ZH-Nucleo. Change-Id: Ie6ddab47a9ae8461087d369b4f289b7f9d1e031c Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-on: http://openocd.zylin.com/4045 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2017-08-10log: Add a new debug level (4) for verbose I/O debugAndreas Fritiofson1-3/+5
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-17flash/nor/tcl: Make read_bank parameters optionalMarc Schink1-2/+4
Make 'offset' and 'length' parameters optional, if both are omitted simply read the whole flash bank. Additionally, check if the 'offset' and 'length' arguments are out of bounds of the flash bank. Change-Id: Ib9c1b0538a2c78ebcf702e2da11468dff407f8ff Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3862 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2017-06-17flash/nor/tcl: Make write_bank parameter optionalMarc Schink1-2/+3
Make the 'offset' parameter optional, if omitted simply start at the beginning of the flash bank. Additionally, check if the argument is out of bounds of the flash bank. Change-Id: I8e9632b539ad9e83211e1ac6a06da4c8109cbc60 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3860 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2017-06-17flash Kinetis: add KL28 deviceTomas Vanek1-0/+5
This device differs a lot from others in KL series. Unfortunately the System Integration Module, where device identification resides, moved to a new address so probe now have to try both addresses of SIM_SDID. Introduce a new bank creation option: -sim-base to ensure error free probe. WDOG32 is slightly different from KE1x and on different address. System Mode Controler changed layout to word aligned. Change-Id: I2c9dca0c4ad4228fcc941d6078d15f5e394833ff Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4059 Tested-by: jenkins Reviewed-by: Joakim Nohlgård <joakim.nohlgard@eistec.se> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2017-06-17flash Kinetis: implement automatic bank creation based on device probeTomas Vanek1-0/+6
Kinetis flash driver services huge number of MCU types. They have one, two or four flash banks with option of FlexNVM. It would require ~36 config files just for Kx series, more for KLx, KVx and KE1x. The change implements alternative approach: - configuration file creates just one pflash bank (common for all devices) - when a device is probed, additional pflash or flexnvm banks are created based on flash layout of the connected MCU - created banks have names with optional numbering e.g. kx.pflash0 kx.pflash1 kx.flexnvm0 kx.flexnvm1 - the first bank gets renamed if numbering is used Automatic bank creation is enabled by tcl command 'kinetis create_banks'. Used solution has a drawback: other banks than pflash0 are not accessible until pflash0 is probed. Fortunately gdb attach and standard programming accesses banks in right sequence. Change-Id: I5b9037cbefdb8a4176b7715fbcc3af4da4c1ab60 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3925 Tested-by: jenkins Reviewed-by: Joakim Nohlgård <joakim.nohlgard@eistec.se> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2017-06-17tcl/target: make sure kex.cfg is not used for Kinetis KE1x familiesTomas Vanek1-2/+3
Config file renamed to ke0x.cfg and a notice added to texi. While on ke0x.cfg CPUTAPID setting fixed: device has SWD port only, no JTAG. Removed per device configs as they set CHIPNAME and nothing more. Let's use reasonably universal chip name 'ke' set in family config. Change-Id: I313db87a59f25f968eb3c27df155780b67becee8 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3897 Tested-by: jenkins Reviewed-by: Ivan Meleca <ivan@artekit.eu> Reviewed-by: Joakim Nohlgård <joakim.nohlgard@eistec.se> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2017-06-17flash Kinetis: add KE1xZ and KE1xF familiesTomas Vanek1-1/+3
The new Kinetis KE1x families use FTFE flash controller unlike KE0x. Also SDID coding corresponds to new K, KL and KV families. That's why KE1x is handled by kinetis driver instead of kinetis_ke Change-Id: Ibb73e28e41dfbb086e761e1f006b089825dab854 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3896 Tested-by: jenkins Reviewed-by: Joakim Nohlgård <joakim.nohlgard@eistec.se> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2017-05-31flash: Add support for Atheros (ath79) SPI interfaceTobias Diedrich1-0/+39
Supported SoCs: AR71xx, AR724x, AR91xx, AR93xx, QCA9558 Extended and revised version of my original patch submitted by Dmytro here: http://openocd.zylin.com/#/c/3390 This driver is using pure SPI mode, so the flash base address is not used except some flash commands (e.g. "flash program") need it to distinguish the banks. Example config with all 3 chip selects: flash bank flash0 ath79 0 0 0 0 $_TARGETNAME cs0 flash bank flash1 ath79 0x10000000 0 0 0 $_TARGETNAME cs1 flash bank flash2 ath79 0x20000000 0 0 0 $_TARGETNAME cs2 Example usage: > flash probe flash0 Found flash device 'win w25q128fv' (ID 0x001840ef) flash 'ath79' found at 0x00000000 > flash probe flash1 No SPI flash found > flash probe flash2 No SPI flash found > flash banks > flash read_bank flash0 /tmp/test.bin 0x00000000 0x1000 reading 4096 bytes from flash @0x00000000 wrote 4096 bytes to file /tmp/test.bin from flash bank 0 at offset 0x00000000 in 28.688066s (0.139 KiB/s) Change-Id: I5feb697722c07e83a9c1b361a9db7b06bc699aa8 Signed-off-by: Tobias Diedrich <ranma+openocd@tdiedrich.de> Reviewed-on: http://openocd.zylin.com/3612 Tested-by: jenkins Reviewed-by: Dmytro <dioptimizer@hotmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2017-05-31imx_gpio: add mmap based jtag interface for IMX processorsGrzegorz Kostka1-0/+15
For some targets (like nrf51) sysfs driver is too slow. This patch implements memory maped driver for IMX processors. Mostly based on bcm2835gpio. Tested on imx6ul CPU. However, it should work on any NXP IMX CPU. Change-Id: Idace4c98181c6e9c64dd158bfa52631204b5c4a7 Signed-off-by: Grzegorz Kostka <kostka.grzegorz@gmail.com> Reviewed-on: http://openocd.zylin.com/4106 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2017-05-12jtag/drivers: Add Cypress KitProg driverForest Crossman1-0/+56
This patch adds a driver for the SWD-only Cypress KitProg programmer/debugger. Change-Id: I3a9a8011a762781d560ebb305597e782a4f9a8e5 Signed-off-by: Forest Crossman <cyrozap@gmail.com> Reviewed-on: http://openocd.zylin.com/3221 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2017-04-24flash/nor/tcl: Make verify_bank parameter optionalMarc Schink1-2/+3
Make the 'offset' parameter optional, if omitted simply start at the beginning of the flash bank. Additionally, check if the argument is out of bounds of the flash bank. Change-Id: Id1959eee5c395666c35f26342c3c50134dd564e5 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3858 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2017-04-02aarch64: add some documentationMatthias Welwarsky1-4/+33
document aarch64 specific commands and common ARMv7 and v8 DAP commands Change-Id: Icbb76209735ec734f2e67f82bfc7270edb40ad0b Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/4008 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2017-01-15flash/nor: fix doc/help and range test for flash protectTomas Vanek1-3/+6
Commit 77a1c01ccbb1150ffe749a7373cf6c4dc15ecad0 introduced infrastructure for utilizing protection blocks of different size than erase sector. Parts of doc/help kept reading 'sector' instead of 'protection block'. flash_driver_protect() parameter range testing did not switched to bank->num_prot_blocks. This change fixes it. Change-Id: Iec301761190a1a1bcc4cb005a519b9e5e4fede51 Reported-by: Mark Odell <mark@odell.ws> Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3917 Tested-by: jenkins Reviewed-by: Mark Odell <mrfirmware@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2017-01-15doc: Improve ftdi driver sectionAndreas Fritiofson1-7/+11
Fix typo and a sentence that sounds strange since the ft2232 driver was removed. Add documentation for the SWD signal usage. Remove the text mentioning a default VID:PID which doesn't exist. Change-Id: I27eba571f2f7c46bdb6ae623ab285595018e99d9 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3935 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-25doc: fix underfull and overfull boxesPaul Fertser1-11/+17
This is needed to generate PDF user manual without typesetting artifacts. Change-Id: Ibcbd804dac2b9415459327f53f6fad0dc38fa5c6 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3919 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-12-25doc: add a cross-reference to GDB threading commandsPaul Fertser1-1/+5
Change-Id: If4766ba0053fc94cd47495e442fcf288241af218 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3557 Tested-by: jenkins
2016-12-08Convert to non-recursive makeAndreas Fritiofson1-11/+10
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-08jlink: Add EMUCOM supportMarc Schink1-0/+20
EMUCOM is a way to communicate with a J-Link device via so called channels. A channel can either be read or written in a single operation. Beside the reserved channels for SEGGER, there are channels available to implement vendor and/or device specific functionalities. For example, EMUCOM is used on many starter and development kits from Silicon Labs to access power measurements and various other information and settings. Change-Id: I6094109c043b34aed4a40ceabe71f30ff896bf1d Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3794 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08cortex_m: allow setting debug ap during createMatthias Welwarsky1-0/+4
This patch adds a Cortex-M private configuration option that allows setting the acess point during target creation. This circumvents situations in hybrid systems when the correct access point can not be automatically detected. Change-Id: If313a5250e6e66509bb9080f3498feab7781dced Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3639 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08jtag/drivers/openjtag: Add support for Cypress CY7C65215Vianney le Clément de Saint-Marcq1-0/+21
The Cypress CY7C65215 Dual Channel USB-Serial Bridge Controller [1] understands the OpenJTAG protocol over a proprietary USB interface. This patch adds support for the CY7C65215 to the openjtag interface driver. A new configuration option, `openjtag_variant`, allows to select the transport to use. Libusb (1.x or 0.1) is now a hard dependency of the openjtag driver. This should not be a big issue as libftdi also depends on it. [1] http://www.cypress.com/?rID=82870 Change-Id: I55ffb3fd9e006eb311e405d9fb836bb119644bfd Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-on: http://openocd.zylin.com/2805 Tested-by: jenkins Reviewed-by: Jiri Kastner <cz172638@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08semihosting: support fileio operationSteven Stallion1-0/+11
This patch adds support for bridging semihosting to GDB's File-I/O remote protocol extension. For the most part operations match up 1:1, however some require a working area to complete successfully, namely operations that devolve to read, stat, and gettimeofday. A new command was added to enable support for fileio named `arm semihosting_fileio`, which ensures that the default behavior remains intact for those that prefer it. Finally, redundant logging was removed from the target_arch_state function; this permits ARM targets to quiesce log output when polling for a fileio reply. This prevents filling the logs with halt/resume messages when using semihosting fileio. Change-Id: Ifbb864fc2373336a501cc0332675b887b552e1ee Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3566 Tested-by: jenkins Reviewed-by: Steven Stallion <sstallion@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08rtos: add support for uC/OS-IIISteven Stallion1-2/+8
This patch introduces RTOS support for uC/OS-III. Currently, only FPU-less ARM Cortex-M targets are supported. Due to the configurability of the RTOS, an OpenOCD-specific file must be linked along with the project to determine the correct offsets within the OS_TCB structure. In addition to the above, a crash was fixed in rtos_get_gdb_reg_list such that RTOS support could be used between resets without restarting OpenOCD and support for the Hg packet was cleaned up. Change-Id: Ide004a689e6b886185df665c00fb644629eb31d1 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3556 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08target: Add verify_image_checksum commandMatthias Welwarsky1-0/+7
This avoids the secondary binary search if the checksum is different Change-Id: I986ba7687cea76f30e37a6bca58aabde18198263 Signed-off-by: Evan Hunter <ehunter@broadcom.com> Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/2869 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-12-08Add -defer-examine option to target create commandMatthias Welwarsky1-1/+5
The '-defer-examine' option to target create allows declaring targets that are present on the chain, but not fully functional. They will be skipped by the initial arp_examine as well as arp_examine after reset. Manual examine using 'arp_examine' is needed to examine them, with the idea that some kind of actions is neeed to bring them to a state where examine will succeed (if at all possible). In order to allow value less options to target command, I had to relax the goi.argc check in jim_target_configure(). Change-Id: I9bf4e8d27eb6476dd9353d15f48965a8cfd5c122 Signed-off-by: Esben Haabendal <esben@haabendal.dk> Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3076 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-11-06Remove support for the GPL incompatible FTDI D2XX libraryAndreas Fritiofson1-1/+1
Convert Presto, OpenJTAG and USB-Blaster (I) adapter drivers to libftdi only. Change-Id: Ib28887620a3dcbb754b9dbf87b9731acca3ac600 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3237 Tested-by: jenkins Reviewed-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-11-06Remove since long deprecated ft2232 driverAndreas Fritiofson4-317/+5
Purge all legacy interface configurations so there's no more confusion over which one to use. Also remove doc/INSTALL.txt which mentions ft2232 but otherwise just duplicates what INSTALL says. Change-Id: Ic94f808f123d4917e600b79309f1272c78a7bb11 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3236 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-11-05Replace "daemon" with "server" in user-visible stringsPaul Fertser1-10/+10
Since OpenOCD doesn't fit most common definitions of the word "daemon", using it in the documentation is confusing. Reported by IRC user ohsix. Change-Id: I688d722771b084b17c2a7af8e83fd64bab6141b8 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/3634 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-10-17gdb server: Add back support to disable the gdb server via the gdb_port configSandeep Mistry1-1/+1
As per the documentation, used "disabled" as the value to disable, as this is the same value to disable the telnet and tcl server. Change-Id: Idc4a8580098ec1107dcc6e1f59e817ecdebc38ac Signed-off-by: Sandeep Mistry <s.mistry@arduino.cc> Reviewed-on: http://openocd.zylin.com/3175 Tested-by: jenkins Reviewed-by: Cristian Maglie Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-08-14flash Kinetis: Implement flash protection settingTomas Vanek1-0/+17
Kinetis family employs strange concept of Flash Configuration Field at address 0x400 of program flash. Writing incorrect data to FCF may permanently lock the device. The change introduces 'kinetis fcf_source protection' mode. In this mode write of flash image data to FCF is prevented. FCF data build from protection (set by 'flash protect' command) are written instead. FCF data are written also just after erase of relevant sector. It protects device from locking security by reset or power cycle after erase. prot_blocks array is used as protection blocks have bigger size than sectors. Alignment and padding programming sections is rewritten to fix writing with not section boundary aligned begin. Change-Id: I9fc8bd37d6f627fb8ed7abb7f7560e78a740b195 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3562 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-14flash/nor: implement protection blocks of different size than erase sectorTomas Vanek1-2/+4
Originally flash/nor infrastructure assumed protection blocks identical to erase sectors. This assumption is not valid for many flash types. Driver code fixed the problem either by increasing sector size to size of protection block or by defining more protection block than really existed in device. Both cases had drawbacks. The change retains compatibility with the old driver. Updated driver can set protection blocks table independent of sector table. Change-Id: I27f6d267528ad9ed9fe0a85f05436a8ec17603a4 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3545 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14kinetis: support mass erase on boards without SRSTSteven Stallion1-4/+14
NXP (nee Freescale) documents the mass erase procedure using the MDM-AP block in AN4835. Existing support for this feature did not properly handle boards without SRST. This patch updates the mass_erase command such that it works correctly on these boards. Additionally, the core is left in a halted state once complete to prevent reset loops due to the watchdog as reported by some users. Since the MDM-AP provides an additional method of halting and resetting the core that is disconnected from the DAP, additional commands are provided to manage this state. These commands are particularly helpful when connecting to a target with an unknown state. Change-Id: I40f006d5d964befb12b019c5d509988decdd3f91 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3540 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-08-14ftdi: Added a method to read the signal valuesStephen Tridgell1-3/+10
Change-Id: Ie32a372bbc57249b4802d900234a0e8e7d1d1830 Signed-off-by: Stephen Tridgell <stephen.tridgell@exablaze.com> Reviewed-on: http://openocd.zylin.com/2556 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-14doc: correct and standardize instructions for disabling TCP serversPeter A. Bigot1-3/+3
The instructions to set the port to zero to disable a service has not worked for several years: the effect of doing so is to start the service on a port randomly selected by the bind(2) system call. Update the documentation to reflect the new standard way of disabling network services. Change-Id: Ic5315a80f9956ea195f63e05d30d604a980bbc8f Signed-off-by: Peter A. Bigot <pab@pabigot.com> Reviewed-on: http://openocd.zylin.com/3638 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14Flash handling for STM32F76x/77x and F446 addedAndreas Bolsch1-2/+15
- added ids for various parts - rewrite of sector allocation to deal with dual-bank F76x/77x - single- / dual-bank mode for F76x/77x - sector protection adapted for F76x/77x in dual-bank mode - handling of additional option bits (28-31) in FLASH_OPTCR in options_read and options_write for F42x/43x/469/479/7xx, options bits 0-1 masked out - check for sensible value of user_options in options_write - some #defines clarified, non-needed ones removed - docs updated (options read, options write) Change-Id: Ie4db80e60baa7d2663e024ab1f278640b1ce901b Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-on: http://openocd.zylin.com/3526 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-07-17arm_adi_v5: add dap apreg command for AP register read/writeTomas Vanek1-0/+6
A developer tool: Direct access to AP registers can be useful for handling vendor specific AP like Freescale Kinetis MDM or Atmel SMAP. Change-Id: Ie2c7160fc6b2e398513eb23e1e52cbb52b88d9bd Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/2777 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-07-17server: support binding to arbitrary interfacesSteven Stallion1-0/+5
Some installations of OpenOCD are used in restricted environments that do not permit binding to public interfaces. This patch does not affect the default behavior to listen on all interfaces, however it does give the option to restrict services by way of the bindto command. Change-Id: Id51bd64b376a8c62dd47b08b4d834872925e6af2 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3534 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-06-23cfi: Add support for strangely endianness broken SoC implementationsEsben Haabendal1-0/+2
This adds the 'data_swap' parameter to the CFI driver, which enables swapping of data bytes when writing/programming words to the flash. Note, that this specifically means that bytes are not swapped when writing command words to the flash chip. Unless you are using the SAP in an LS102x chip to program an attached 16-bit NOR flash, you hopefully do not need this! Change-Id: I1e6f7169da36f373c880d1756d9c21c9957acc50 Signed-off-by: Esben Haabendal <esben@haabendal.dk> Reviewed-on: http://openocd.zylin.com/3109 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-06-23Support for Freescale LS102x SAPEsben Haabendal1-0/+2
The SAP in LS102x SoC's from Freescale is able to read and write to all physical memory locations, independently of CPU cores and DAP. This implementation is 100% based on reverse-engineering of JTAG communication with an LS1021A SAP using a JTAG debugger with SAP support. And as such, this code is for now "works-for-me", pending verification by other OpenOCD users, or even better, actual information from Freescale on the SAP interface. Change-Id: Ibb30945e017894da5c402f9f633fc513bed4e68c Signed-off-by: Esben Haabendal <esben@haabendal.dk> Reviewed-on: http://openocd.zylin.com/3096 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-05-24Make #include guard naming consistentMarc Schink1-0/+19
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-20Fix spelling of ARM CortexAndreas Färber1-7/+7
It's Cortex-Xn, not Cortex Xn or cortex xn or cortex-xn or CORTEX-Xn or CortexXn. Further it's Cortex-M0+, not M0plus. Cf. http://www.arm.com/products/processors/index.php Consistently write it the official way, so that it stops propagating. Originally spotted in the documentation, it mainly affects code comments but also Atmel SAM3/SAM4/SAMV, NiietCM4 and SiM3x flash driver output. Found via: git grep -i "Cortex " git grep -i "Cortex-" | grep -v "Cortex-" | grep -v ".cpu" git grep -i "CortexM" Change-Id: Ic7b6ca85253e027f6f0f751c628d1a2a391fe914 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3483 Tested-by: jenkins Reviewed-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-16doc: Fix mismerges of fm4, kinetis and kinetis_ke flash driversAndreas Färber1-18/+18
Commit dfc6658cf98d494e066426945879b9f60bbf9678 ("Kinetis: flash driver described in openocd.texi") inserted a kinetis section between fm3 and lpc2000. Then commit 43ff5acd45017fd9828cc56f54b929e600956c3b ("flash: New Spansion FM4 flash driver") was merged, inserting the fm4 section between kinetis and lpc2000, instead of after fm3. Finally kinetis_ke was added between kinetis and fm4 in commit 5396ec5dcc64354c8101f8d3f16d498ca3b10326 ("flash: Added support for Freescale Kinetis KE family."). Restore the alphabetical order by moving the fm4 section to before kinetis. Change-Id: I77e47c3cd5b2cd8570b62ff2f7be8526aaf57ad0 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3484 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Marc Schink <openocd-dev@marcschink.de>
2016-05-14flash/nor: Add Ambiq Micro Apollo flash driver.Rick Foos1-0/+46
Initial release of Ambiq Micro Apollo flash driver supporting our sub-threshold (low power) Cortex M4F part, and Evaluation Kit. We have been shipping openocd to our customers for about one year. The EVK boards are SWD only using ftdi. We also use two of the other COM instances to display debug information. It takes about 15 seconds to flash 512K, and mass erase is about 5 seconds. Tested by internal verification group, FAE's, and customer sites. Merged commit 'refs/changes/17/3417/1' as suggested. Makefile.am and drivers.c follow the new format to avoid conflicts. Removed unused fault_capture command. Added documentation for flash driver. Change-Id: Iae92d869369c6827244f0071f9cb522d8d91fed8 Signed-off-by: Rick Foos <rfoos@solengtech.com> Reviewed-on: http://openocd.zylin.com/3230 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>