aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-10-04nds32: Fix typo in debug logAndreas Färber
wathcpoint -> watchpoint Change-Id: If84cfb5097ed17ef97491667c622ba7d870ac9c2 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3673 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-10-04x86_32_common: Fix typo in function nameAndreas Färber
pyhs -> phys Change-Id: Ie7edc74f1693b42f26e1e8475a93a7a6b9255cdd Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3672 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-10-04mips: Added #define for scan_delay legacy mode default valueKent Brinkley
Believe in using defines to make maintenance easier. Change-Id: I8edf151352131bbf2b884dfcd67ca5764b11b13c Signed-off-by: Kent Brinkley <jkbrinkley.imgtec@gmail.com> Reviewed-on: http://openocd.zylin.com/2350 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-10-04STM32L433 Flash supportPeter Kuhar
Added new chip id based flash size. Change-Id: I5b5e71074af0e50352443f66f88adfc6e14280bf Signed-off-by: Peter Kuhar <peter@pkuhar.com> Reviewed-on: http://openocd.zylin.com/3732 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-10-04stm32l4x: fix incorrect device id maskSpencer Oliver
Change-Id: I37cf9cbdd07dc3764d2c719b7c6ed5852aea3943 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/3799 Tested-by: jenkins
2016-08-14flash Kinetis: Implement flash protection settingTomas Vanek
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-14pic32mx: add new device ID, 17x/27x Flash supportSASANO Takayoshi
- add new device ID: 170F256B, 170F256D, 270F256B, 270F256D, 330F064H, 330F064L, 430F064H, 430F064L, 350F128H, 350F128L, 450F128H, 450F128L, 350F256H, 350F256L, 450F256H, 450F256L, 370F512H, 370F512L, 470F512H, 470F512L - add support for PIC32MX17x/27x 256kB Flash Change-Id: I65a304d2114fff80de3a24c1f6d0b5e955b22531 Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk> Reviewed-on: http://openocd.zylin.com/3186 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2016-08-14flash Kinetis: refactoring ftfx commands and numerous minor changesTomas Vanek
Add kinetis_ftfx_decode_error() to show flash error type in human readable message. Add kinetis_ftfx_prepare() to prepare flash module just once in command (not each time kinetis_ftfx_command() is called). Change target_read/write_memory() to target_read/write_u8/32(). Make ftfx_fstat parameter of kinetis_ftfx_command() optional. Longword flash write: Fix huge memory leak after write of unaligned block. Check flash address alignment properly. Do not fill whole padding buffer but its end after original data. Remove duplicite padding. Change-Id: Ia5e312909f68d3cc724c8cbffe1cd903b9102124 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3561 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14flash/nor: implement protection blocks of different size than erase sectorTomas Vanek
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-14flash Kinetis: dynamic status detection before starting mass_eraseTomas Vanek
The change prevents starting mass_erase in unstable state of MCU (RESET/WDOG loop). mass_erase of secured MCU using manual reset button is supported. Timeouts are measured by timeval_ms() instead of iteration count. mass_erase timeout prolonged to 16 seconds because aborting mass_erase in progress (deasserting reset) leaves the device in security locked state. Change-Id: I6605532df56080a54c2a1dfe49094e3db4ce534a Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3551 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14flash Kinetis: Detect RESET/WDOG loop, fix detection of secured MCUTomas Vanek
Kinetis driver checks MDM STAT register to detect secured state of MCU. Original version often reported a blank device as secured one. Change #3010 has not fixed all false reports. After changes in arm_adi_v5 infrastructure secured devices was not detected at all. New algorithm uses multiple MDM STAT reads and counts MDM_STAT_SYSSEC and MDM_STAT_FREADY bits. Both secured MCU and MCU locked-up in RESET/WDOG loop are detected reliably. Detection is run in both kx.cfg and klx.cfg from examine-start event, not examine-end as before. Event is configured only for non hla adapter. Minor fix in klx.cfg: commented out adapter_khz 24000 in reset-init. Such frequency is not supported in VLPR CPU mode and with JTAG. Change-Id: I2ec2b68c45bde9898159cd15fbdcbcfa538c41d9 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3547 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 Stallion
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-14at91sam7: do not touch flash banks which belong to other targetsAndreas Fritiofson
at91sam7_read_part_info() walks throw all flash banks following current one. I don't know why it has to do it at all (possibly for multi-bank devices like SAM7S512), but if there is more than one target in JTAG chain, this lookup can touch flash bank of another (possibly not halted) target, which cause probe error and current command execution abort. [andreas.fritiofson@gmail.com]: Change to for-loop and reduce indentation Change-Id: Ide50e93578786e1250f7a0fd0e3d296247924814 Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2610 Tested-by: jenkins
2016-08-14ftdi: Added a method to read the signal valuesStephen Tridgell
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-14cmsis-dap: add JTAG pass-through modeMatthias Welwarsky
This change adds JTAG transport in pass-through mode to the cmsis-dap driver. The patch is originally from Phillip Pearson <pp@myelin.co.nz>, with additions by Maksym Hilliaka <oter@frozen-team.com> Change-Id: I88d918d6576e9d875c3b611f29f255581e6a5424 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3568 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-14gdb_server: support disabling serverPeter A. Bigot
Although the documentation suggested this worked, and it is implemented for tcl_port and telnet_port, the directive was not recognized for gdb_port. Change-Id: I38d95ee879ec3f6d551603b7313749a21e0e498e Signed-off-by: Peter A. Bigot <pab@pabigot.com> Reviewed-on: http://openocd.zylin.com/3637 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14Flash handling for STM32F76x/77x and F446 addedAndreas Bolsch
- 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-08-14rtos: remove display_str memberSteven Stallion
This patch removes the display_str member in the thread_detail struct. This member was not being used and provides no additional benefit over the thread_name_str and extra_info_str members. This change is made in preparation of support for the qXfer:threads:read packet, which will modernize how thread information is shared with GDB. Change-Id: I1f8bc6325e6aa790e02ea6caee9d6f44c5fedf36 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3558 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-08-14flash/nor/tcl.c: Less verbose output of flash erase_check.Uwe Bonnes
Only report non-erased or unknown sectors or if bank is fully erased. Change-Id: I94f0bc2a0d6529d1ea5f66b284cefd6a2c61fe39 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/3501 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
2016-08-14stm32l4: Handle failing flash_size read like on other devices.Uwe Bonnes
Change-Id: I54d7cd3a8c80d0e4663c3c09457a4ff338a6f1a0 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/3503 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-08-13jlink: fix jlink regression introduced by ae8cdc commitSergey A. Borshch
1) wrong last bit was shifted out in the end of IRSHIFT/DRSHIFT in jlink_execute_scan() 2) TDI buffer was not cleared in jlink_tap_init(), results in wrong data shifted out to the TDI and "Bad value '00000000' captured during DR or IR scan" error message. 3) sizeof(tdi_buffer) was used in memset() to clean tms buffer. It is the same as sizeof(tms_buffer), but shoud be fixed to make source code consistent Change-Id: I13f26d1c3e88eefc3856fe2b8542fb0ccea6acb1 Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/3394 Tested-by: jenkins Reviewed-by: Harry Zhurov <harry.zhurov@gmail.com> Reviewed-by: Anton Gusev Reviewed-by: Михаил Цивинский <mtsivinsky@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-13psoc4: Corrected Silicon IDsGeorge Ioakimedes
Corrected 2 Silicon IDs that were swapped. I've tested with a CY8C4125AXI-483 and confirmed that the device is recognized correctly now. Change-Id: I6fcbee33558d8feec9abf6052df3f15523379c48 Signed-off-by: George Ioakimedes <georgeioak@gmail.com> Reviewed-on: http://openocd.zylin.com/3619 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-08-13target: check late abort from target in async_algorithmTomas Vanek
target_run_flash_async_algorithm() ignored abort from target (rp set to 0) when raised after all data have been written in fifo. I could result e.g. in not reported error during flash write. The change adds rp test after target algorithm has finished. Change-Id: Iadd93371e4a4602737be10079479285d81ae41b2 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3560 Tested-by: jenkins Reviewed-by: Steven Stallion <stallion@squareup.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-13at91samd: Add Atmel SAMD09 family supportOlaf Lüke
Change-Id: I0ee3bb92aa168ed070863ac09e3c457a4b2e2220 Signed-off-by: Olaf Lüke <olaf@tinkerforge.com> Reviewed-on: http://openocd.zylin.com/3428 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins Reviewed-by: Liviu Dudau <liviu@dudau.co.uk>
2016-08-13rtos: removed chSysInit from detection of ChibiOS (#121)Andy Pomfret
Using the presence of the 'chSysInit' symbol for detection of ChibiOS is dangerous because this symbol may not be available if link-time optimisation is used. This patch removes this reliance, so the symbols 'ch' and 'ch_debug' are the only things required for ChibiOS detection. If 'ch' is present but 'ch_debug' is not, an info message suggests that Chibios might be present without its registry being enabled. This message has been reworded a little to make it slightly more equivocal because the chances of a false positive message are increased. Addresses bug #121, "ChibiOS rtos detection fails with LTO enabled". Change-Id: I5ef224735c06446751adee010ce75be4f30f0403 Signed-off-by: Andy Pomfret <cooperised@gmail.com> Reviewed-on: http://openocd.zylin.com/3381 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-08-10Cortex-M7 handling.Andreas Bolsch
- FPU detection and FPU register support added for Cortex-M7. There is no apparent difference between FPv4 and FPv5_SP but ... - Autoincrement range for MEM-AP added for Cortex-M7 This patch together with #3526 replaces #3123 except for stm32f7x.cfg. Change-Id: I5ed5392e3835674160563ff37d67622a7bf2c877 Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-on: http://openocd.zylin.com/3531 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-09adi_v5_jtag: clear sticky overrun condition in WAIT timeoutMatthias Welwarsky
If WAIT recovery fails (times out), an ABORT command is issued to the DAP but under some conditions the SSTICKYORUN bit in CTRL/STAT is not cleared as well, which renders the DP unusable. This happens when trying to access e.g. the ROM table of powered-down cores, on many targets. Change-Id: Id0a7ba6180069eee562871314f520f938df9718f Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3476 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-09target: add "phys" argument to mem2array, array2memMatthias Welwarsky
Allow using physical addresses with mem2array and array2mem. In order to minimize the impact on existing scripts, "phys" is added as an optional 5th parameter to both commands. This patch also adds "phys" variants to the memwrite/memread commands in memory.tcl. Change-Id: Ia6307f9d861789e7f3ccf1f98961d666bf8d85d6 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3387 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-09Fix resume when core state has been modifiedMatthias Welwarsky
Sometimes it is necessary to resume into a different state (ARM/Thumb) than at debug state entry. According to the documentation this should be possible with "arm core_state arm|thumb" before the resume command, however the original code also restores the original CPSR, which overrides whatever state the core was set to. This seems to work on some cores (e.g. Cortex-A5) but not on others (e.g. Cortex-A9). Using the "BX" instruction to set resume PC and core state works on Cortex-A9 and ARM11, but is not sufficient on Cortex-A5, where an explicit write to the PC (MOV pc, r0) is required additionally. Change-Id: Ic03153b4b250fbb8cf6c75f8e329fb34829aa35f Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3386 Tested-by: jenkins Reviewed-by: Alexander Stein <alexanders83@web.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-02flash: nor: mdr: fix verification problem with 1986VE1T or 1986VE3TAndrey Skvortsov
1986VE1T and 1986VE3T have issue with flash acceleration engine described in their errata (issue 0007). After programming flash acceleration engine's buffer contains old data, and therefore first read data are wrong. Because of this verification after programming fails always. Recommended workaround for the issue is to flush flash accelerator's buffer. To do so it's necessary to read at least 64 bytes of flash through accelerator. Reading bytes through JTAG using default_flash_read doesn't help. It seems that reading should be done by uC itself. Change-Id: I18ef464a68ad5c5b16d3933f31ca61f8e2e7cca3 Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Reviewed-on: http://openocd.zylin.com/3509 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-07-19Fix usage of timeval_ms()Andreas Färber
First, fix the timeval_ms() implementation to not have K&R but ANSI argument semantics by adding a missing void. timeval_ms() returns an int64_t, not uint64_t or long long. Consistently use int64_t for variables and PRI*64 as format string. While at it, change a few related variables to bool for clarity. Note that timeval_ms() may return a negative error code, but not a single caller checks for that. Change-Id: I27cf83e75b3e9a8913f6c43e98a281bea77aac13 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3499 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-07-17arm_adi_v5: add dap apreg command for AP register read/writeTomas Vanek
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 Stallion
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-07-04swd: Add support for connect_assert_srst for SWD.Fredrik Hederstierna
Today the reset option for connect_assert_srst is not done for SWD. This patch adds this to SWD and make it possible to connect to targets which might disable JTAG interface when running. Change-Id: Ib89f7cf59b628e8f0b5fca9dd9e362e383c4b99f Signed-off-by: Fredrik Hederstierna <fredrik@hederstierna.com> Reviewed-on: http://openocd.zylin.com/3018 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-06-23cfi: Add support for strangely endianness broken SoC implementationsEsben Haabendal
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 Haabendal
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 Schink
Change-Id: Ie13e8af0bb74ed290f811dcad64ad06c9d8cb4fa Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2956 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-24Remove FSF address from GPL noticesMarc Schink
Also make GPL notices consistent according to: https://www.gnu.org/licenses/gpl-howto.html Change-Id: I84c9df40a774958a7ed91460c5d931cfab9f45ba Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3488 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-22armv4_5: Integrate build of checksum codeAndreas Färber
Add rules to build armv4_5_crc.inc, and convert the code to target endianness the least intrusive way. Change-Id: I7452b2c7e679dae14f9cda5f89bc81c16fc12cad Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3473 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2016-05-22armv4_5: Integrate build of erase check codeAndreas Färber
Add rules to build armv4_5_erase_check.inc, and convert the code to target endianness the least intrusive way. Drop an unused word from the assembler sources to make the ARM bytecode fully match that of armv4_5.c and to not break ARMv4 assumptions. This completes the build rules for contrib/loaders/erase_check directory. Change-Id: I36be7a944e26142088195fa3fb072d4e577bf328 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3135 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-22armv7m: Integrate build of checksum codeAndreas Färber
Add rules to build armv7m_crc.inc and include it via preprocessor. Change-Id: I4482c7acb8454de28bdf210d9f06c0720ada490a Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3474 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-22armv4_5: Improve arm_checksum_memory() error handlingAndreas Färber
Clean up the working area in case writing fails. Change the error handling paradigm to avoid duplication. Change-Id: Ie3f95f992a98a1325428e4032a1c17346d4c9977 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3472 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-22armv4_5: Improve arm_blank_check_memory() error handlingAndreas Färber
Clean up the working area in case writing fails. Change the error handling paradigm to avoid duplication. Change-Id: I95bb12fbe7c80b594e178468bcd4f6387c682c93 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3471 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-22Fix comment that limits num_bits to 32.Tim Newsome
Andreas Fritiofson says "If any adapter driver does not work with arbitrary lengths of individual fields, it's a bug." https://sourceforge.net/p/openocd/mailman/message/35091945/ Note also that lengths of at least 96 bits are already in use, eg. in mips_ejtag_add_scan_96(). Change-Id: I62a150adc75c0ef78827683ca8d0a8e90310a982 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/3491 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-20lpcspifi: Fix SWD support for LPC43xxAndreas Färber
When using SWD rather than JTAG transport, the lpcspifi driver complains: Error: Device ID 0x0 is not known as SPIFI capable Error: auto_probe failed This is because target's JTAG tap->idcode is zero for SWD. Drop this check completely and hardcode the addresses for now. Neither the JTAG TAPID nor the SWD IDCODE are unique enough to detect the exact chip model and thereby its memory map. Change-Id: Ic230e3e989a3e1f1a5b3bae68bdb34e5ef55d392 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3089 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-05-20Fix spelling of ARM CortexAndreas Färber
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-20nand: change use_raw to booleanIvo Manca
Change type of use_raw to boolean. This parameter was already assigned a boolean variable (in COMMAND_PARSE_ENABLE) and used as a boolean. Change-Id: I22f8308246cb25ec9ec2395599e406160410a2a8 Signed-off-by: Ivo Manca <pinkel@gmail.com> Reviewed-on: http://openocd.zylin.com/3496 Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-05-20nand: fix return valueIvo Manca
Return ERROR_NAND_DEVICE_NOT_PROBED to prevent calling functions from segfaulting when nand device has not yet been probed (ie nand verify) Change-Id: Ibc4da0aad00e6cc6c83008882b054d981453dc36 Signed-off-by: Ivo Manca <pinkel@gmail.com> Reviewed-on: http://openocd.zylin.com/3495 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-05-20cortex_a: Rename APB-AP to CPU in memory contextsAndreas Fritiofson
Memory accesses are not made through the APB-AP, they are made through the CPU (which happens to be controlled over the APB-AP). Rename all irrelevant uses of the APB-AP term. And fix the long standing typo in the function names... Change-Id: Ide466fb2728930968bdba698f0dd9012cc9dbdf9 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3216 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2016-05-20stm32l1/Cat.3: Devices have only one bank.Uwe Bonnes
Change-Id: I02ce243c228ea20be6d5f01fee705a671747ebad Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/3490 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>