aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-03-19gdb_server: Simple close the connection and not exit openocd.Mathias K1-1/+1
This patch let openocd running and only close the gdb connection on error. Change-Id: Ifb88e16834b51207cc4c82210eab904ed8d30b71 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/523 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-19gdb_server: Fix wrong index/length compare.Mathias K1-1/+1
This patch fix the compare for the list size and the register index. Change-Id: I36d5e078f57d2a9f7823cfdf0d537762e00f6929 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/516 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-19rtos: add sanity checking for FreeRTOS's quantity of prioritiesPaul Fertser1-0/+7
On operating systems with opportunistic malloc() (e.g. default setting in GNU/Linux) malloc can sometimes allocate a huge memory region but later the process will get killed on the first attempt to use this memory, so checking for malloc's return value is not enough to prevent a crash. This patch is compile-tested only. Change-Id: I5e21663115c8e9a0ca9f3d71f7ba4bd09e5c3bb1 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/521 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-19rtos: fix segfault in FreeRTOS handlingPaul Fertser1-0/+12
When gdb loads an elf file of a newer or older version of the firmware being debugged, or when the firmware is not running yet, there's a high probability of FreeRTOS variables to be read incorrectly, thus leading to an attempt to allocate an enourmous amount of memory. Without this check OpenOCD simply crashes and that's mad confusing. Change-Id: I404a072e886d2d47d9d942cfaea8417eb8bd4a5d Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/520 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14stlink: fix alignment build warningAlexandre Pereira da Silva3-14/+12
The {read,write}_mem32 interface functions was asking a 32 bits buffer but they don't need 32 bits alignment. This will change the interface to a 8 bits buffer to remove the alignment mismatch warning. This was causing build errors on platforms with strict aliasing rules. Change-Id: I338be8df5686f07a64ddb4f17c1bb494af583999 Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Reviewed-on: http://openocd.zylin.com/483 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14gdb_server: sanity check the gdb register sizeMathias K1-1/+4
This patch checks the received register length with the local configured register length and disconnect on a length missmatch. Change-Id: I6b112c6b55a9ffb4526f582a384ffa91dc8b792f Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/517 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14armv7m: Add a dummy register at the end of the register list.Mathias K1-1/+3
Signed-off-by: Mathias K <kesmtp@freenet.de> Change-Id: I0bfad091bd8adabd949fc0a74ef3a08a514eb307 Reviewed-on: http://openocd.zylin.com/519 Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: jenkins
2012-03-14stm32: Add floating point register read/write.Mathias K1-2/+28
This patch add floating point register read/write functionality through the SCS debug interface. Change-Id: Id20e109dd7cccba00671d55ca8aabeb4936cceb9 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/512 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14stm32: determine all cpu types and use common examineMathias K4-65/+16
This patch determine all cpu types and not only the cortex M3 and the stm32 target use the common target examine function from the cortex_m sources. Change-Id: If689dd994b3855284b927fc4b206f420cf32b6c7 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/511 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14flash: Fix flash write algorithm on pflash only devices.Mathias K1-1/+0
This patch fix the slow flash write issue on pflash only devices. The Family Reference Manual says: For devices with FlexNVM: FlexRAM For devices with program flash only: Programming acceleration RAM So the acceleration RAM is available for the flash section command on this device. Change-Id: If6541a23a4457c5ed8858848a145f35cac63138b Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/509 Tested-by: jenkins Reviewed-by: Tomas Frydrych <tf+openocd@r-finger.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14Automatically prepend v1 mass storage protocol.Mathias K1-270/+222
This patch prepend the v1 mass storage protocol to the command buffer and simplify the usb read/write handling. Change-Id: I709602600e93cd1eb5848fa9f4d15659ba85eb35 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/506 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14mips: Forced to running state to enable (subsequent) target halt.Drasko DRASKOVIC1-0/+11
Change-Id: I9aff8fb3ac703b50194088dd4e68cec8f9bb2ada Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com> Reviewed-on: http://openocd.zylin.com/513 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-13ecosboard: delete bit-rotted eCos codeØyvind Harboe13-1924/+6
Change-Id: Iff7943eb9da3f41dcc45492acd0f36cf63b3497f Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/503 Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Tested-by: jenkins
2012-03-13jtag: basic support for P&E Micro OSBDM (aka OSJTAG) adapterJan Dakinevich3-0/+731
This driver provides support for the P&E Micro OSBDM adapter (sometimes named as OSJTAG), mounted on the Freescale TWRK60N512 bord. Thus, it provides a quick start when working with this board. The driver doesn't use BDM commands, but work with OSBDM adapter using only JTAG commands. Change-Id: Ibc3779538e666e07651d3136431e5d44344f3b07 Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com> Reviewed-on: http://openocd.zylin.com/492 Tested-by: jenkins Reviewed-by: Tomas Frydrych <tf+openocd@r-finger.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-13topic: Added support for the SAM3X/A variantsOlivier Schonken1-16/+369
Atmel introduced 7 new Cortex-M3 processors on 2012-02-28 SAM3X4C - 256KB flash SAM3X4E - 256KB flash SAM3X8C - 512KB flash SAM3X8E - 512KB flash SAM3X8H (Only on dev-kit - not in production...) - 512KB flash SAM3A4C - 256KB flash SAM3A8C - 256KB flash The SAM3X/A processors still suffer from the "6 waitstates needed to program device" errata. The CIDR address for the SAM3X/A processors are different from the other SAM3 processors. Unfortunately, the chip identification register is not at a constant address across all of the SAM3 series'. As a consequence, a simple heuristic is used to find where it's at... If the contents at the first address is zero, then we know that the second address is where the chip id register is. We can deduce this because for those SAM's that have the chip id @ 0x400e0940, the first address, 0x400e0740, is located in the memory map of the Power Management Controller (PMC). Furthermore, the address is not used by the PMC. So when read, the memory controller returns zero. Another interesting change is the flash bank address for flash bank 1. It is not fixed at 0x00100000 like the Sam3U. Bank 1 of the at91sam3a/x series starts at 0x00080000 + half the total flash size. Thus for the 256KB devices Bank 1 is located at 0x000A0000, and for the 512KB devices Bank 1 is located at 0x000C0000. The configuration files for the SAM3X/A processors will follow Change-Id: I6c3a707c00e05d993a2ad1d5a423f23b37ffd553 Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> Reviewed-on: http://openocd.zylin.com/505 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-13target: remove unused declarationSpencer Oliver3-3/+2
arm7_9_prepare_reset_halt is long since gone and the functionality is implemented in the target's assert_reset handler. Change-Id: Ib03c730cb39d68e5e3bb42f92af13daf8074e4e2 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/515 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2012-03-11flash: retire unused eCos flash driverØyvind Harboe6-431/+1
even the AT91EB40a's flash is covered by CFI and nobody ever submitted any other drivers based on eCos code. It's just possible that this idea was missing documentation and "marketing", but it's in git if somebody wants to resurrect it. Change-Id: I66449aa6e0997301f9d67f28098789bfc891d6e9 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/502 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-03-11target_request: fix warning, do not set local variable to value it already hasØyvind Harboe1-1/+0
Change-Id: If29b0efdc326ee1ce4c07ec9d8777744d674f367 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/490 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-03-06flash: stm32f1x: add a couple missing stm32x_get_flash_regSzymon Modzelewski1-3/+3
Change-Id: I163de2c1bd962e7ea9ca6c741c1c62224c210677 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/486 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-06flash: Additional check for NULL in str9xpec enable_turboFredrik Hederstierna1-5/+8
Change-Id: Ifde8783b27c64e4a4bbea180cfa2c86f6a9fe49a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/496 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-03-06stlink: fix incorrect pc console outputSpencer Oliver1-3/+1
target_call_event_callbacks needs to be called after debug entry otherwise we will get a console pc mismatch. Change-Id: I278137736d5e85ca9662c306f6ac81336d8eb6cf Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/499 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-03-06SAM3: Remove unused reference to SUPC registersAttila Kinali1-4/+0
The SUPC (Supply Controller) registers are on different base addresses on different SAM3 chips: SAM3U: 0x400e1210 SAM3N: 0x400e1410 SAM3S: 0x400e1410 This creates a problem with the sam3_reg_list array which is const, but would need to be changed at runtime to account for this variability. As this register is not used anywhere, it's simplest to just remove it. Change-Id: I987eb371648d826aa6d5e9de18d38c7bb66d6fca Signed-off-by: Attila Kinali <attila@kinali.ch> Reviewed-on: http://openocd.zylin.com/495 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-06SAM3: Add missing architecture names for SAM3S and SAM3NAttila Kinali1-0/+7
Change-Id: Ie2177487d4315219eb364db360cb7f88d2720783 Signed-off-by: Attila Kinali <attila@kinali.ch> Reviewed-on: http://openocd.zylin.com/494 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-06SAM3S: correct flash sector sizes.Attila Kinali1-18/+18
Lock region count and sector sizes did not match datasheet. (see 6500C-ATARM-8FE11 "SAM3S Series Datasheet", Table 7-1) Change-Id: Ic511802f96ed03856467a24a6736349205a0576a Signed-off-by: Attila Kinali <attila@kinali.ch> Reviewed-on: http://openocd.zylin.com/493 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-29stlink-v1: fix memory writesSzymon Modzelewski1-12/+9
implement stlink_usb_send and use it to fix stlink_usb_write_mem using two calls to stlink_usb_recv is inappropriate since each call issues a SG command on stlink-v1, resulting in errors Change-Id: I24ef9f2dda284e041dc4a532b59968a77eebe702 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/498 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-29stlink-v1: code cleanupSzymon Modzelewski1-101/+122
This patch moves the bulk of the stlink read/write code into the stlink_usb_xfer set of functions and implements stlink_usb_recv in terms of the generic stlink_usb_xfer stlink_usb_xfer will be needed to implement stlink_usb_send without code duplication stlink_usb_xfer: -sends the stlink command -performs a read or write (as requested) -checks the status (v1 only) Change-Id: I0137d52620bd4883d46c9977a9e73f67622000a1 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/477 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-29Fix assert to check flash programming offsetAttila Kinali1-1/+1
The assert introduced in 00c864835149a96b431fc8f31dd89542d88fd383 checks whether the programming offset equals to page_size of the flash, while it wants to check whether the offset is a multiple of the page_size. Change-Id: I794d021951a28c1cc520b5eea5d500f097721b06 Signed-off-by: Attila Kinali <attila@kinali.ch> Reviewed-on: http://openocd.zylin.com/482 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
2012-02-29flash: add stm32lx High Density DevicesSpencer Oliver1-14/+48
Change-Id: Ieed9de4b078e1ebf659054a758b4f69acdf5b83e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/466 Tested-by: jenkins
2012-02-29flash: change stm32lx driver probe behaviourSpencer Oliver1-59/+0
Currently stm32lx flash driver will remove the readout protection if set during a probe. This may not be what the user wants, so let them decide. Change-Id: I8575e3b339b10a4f7bac57cca9586dcab513d347 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/465 Tested-by: jenkins
2012-02-29stlink-v1: fix memory writesSzymon Modzelewski1-12/+9
implement stlink_usb_send and use it to fix stlink_usb_write_mem using two calls to stlink_usb_recv is inappropriate since each call issues a SG command on stlink-v1, resulting in errors Change-Id: I52ff9ee8f5d9ae0d47356477468eb98952205c99 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/478 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-27flash: add new devices to pic32mx flash driverSpencer Oliver1-1/+13
update as per DS61145 rev J Change-Id: I2b5da84248ff2f44c7ca9d2ed1c52db453714c05 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/461 Tested-by: jenkins
2012-02-26jtag: use correct tap -ignore-version maskSpencer Oliver1-2/+2
when -ignore-version is used we should mask of the upper 4bits not 8bits. Change-Id: I9ffe24c2aeeb414677357a647609fdf018890194 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/473 Tested-by: jenkins
2012-02-26jtag: fix cmd scan_chain expected_ids bugSpencer Oliver1-1/+1
This fixes scan_chain to correctly print all the expected_ids. Change-Id: I93738980d85e0fe369d40c58b19339424d37ec34 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/474 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-02-26flash: add stm32f2x async flash loaderSpencer Oliver1-60/+55
This enable the stm32f2x flash driver to use the asynchronous algorithm support. Speed increase is as follows: before - wrote 1048576 bytes from file stm32f4x.bin in 30.453804s (33.625 KiB/s) after - wrote 1048576 bytes from file stm32f4x.bin in 23.679497s (43.244 KiB/s) This also fixes a bug that was in the old flash loader. The old loader waited while bit16 of the status reg was 0, the new loader waits until this bit is 0 as stated in the flash spec. Bizarrely this bug did not effect programming on any tested parts. Change-Id: I3efc94d42cbe81283673a8f4203700638080af6e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/460 Tested-by: jenkins
2012-02-26flash: add stellaris async flash loaderSpencer Oliver1-66/+49
This enable the Stellaris flash driver to use the asynchronous algorithm support. Speed increase is as follows: before - wrote 65536 bytes from file test.bin in 5.486040s (11.666 KiB/s) after - wrote 65536 bytes from file test.bin in 2.274001s (28.144 KiB/s) Change-Id: I9004c9aadffa1ae3b0cbf908e6549b5b1f794508 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/403 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-02-26target: add target async algorithm supportSpencer Oliver3-100/+148
Currently the stm32f1x flash driver uses an asynchronous algorithm as part of the block flash programming. This greatly speeds up flash programming as the target is always running. Moving the async code to the target enable other targets to use this added functionality. Change-Id: I8e53f094c2ef7848a7f86ddb9a35b6edbfc8454a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/402 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-02-23target: add function to get number of bytes available in working areaAndreas Fritiofson2-0/+20
This is a much cleaner solution to the problem of allocating as much working area as possible than what is currently being done in most/all flash drivers (which is: try an arbitrary sized chunk, if it fails, pick a smaller number, rinse and repeat). Use this function to find out how much working area is available, limit or restrict that amount at will and then simply allocate it. Change-Id: Ib7d5d0b7485aed3e0a4fad60c1bedb7dfd16146f Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/446 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-23target: rewrite working area allocatorAndreas Fritiofson1-68/+169
The existing allocator couldn't reuse a freed allocation if the sizes didn't match exactly. That led to problems when for example a flash write routine had allocated all of the working area to speed up operation. A subsequent verify pass couldn't allocate space for the checksum algorithm even though all previous allocations had been freed. This allocator is marginally more complex, but solves the above problem by splitting larger free areas to fulfill smaller requests and by merging released areas into adjacent free areas. An initial free area, covering the entire specified address range, is set up on first allocation, and all allocations are split off from (and ultimately merged into) that one. It can also easily be adapted to support several disjoint working areas for the same target, by setting up several initial free areas and slightly modifying the merge code. Change-Id: I6faaf9801312bb19a4fa4474694a0cd1c6e0ab54 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/445 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-22stlink: support expected-id 0Spencer Oliver1-1/+2
This brings the stlink driver inline with the rest of OpenOCD. If the user configures the tap as -expected-id 0 then the IDCODE will be treated as a wildcard and ignored. Change-Id: I99160c69b2b40f5b1f608bb59ab6630894502fd8 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/476 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2012-02-22Sometime in the past, nand_fileio_finish started to return ERROR_OK (with ↵Stian Skjelsad1-1/+1
the value of zero) on success. Change-Id: Ifb743c1617e2a6071a87c901fae8165969efcdbf Signed-off-by: Stian Skjelstad <stian@nixia.no> Reviewed-on: http://openocd.zylin.com/468 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-17stlink: add error status checkMathias K1-6/+63
This patch add the status check. Change-Id: I0fdb9bf66dad5ae416c7aa4c6e19116f846571f9 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/463 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-16Fix typo that result in recursion.Mathias K2-2/+2
Change-Id: Ie1102b4960bcb5acb254eae69b94fe87ab33dd0b Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/462 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-16stlink: add arm semi-hosting supportSpencer Oliver1-1/+7
Change-Id: Ib275d451a9201580f08ced090e50cf45eb3ab3e2 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/459 Tested-by: jenkins
2012-02-16build: fix automake 1.11.2 issuesSpencer Oliver3-6/+5
automake 1.11.2 throws `pkglibdir' is not a legitimate directory for `DATA' if nobase_dist_pkglib_DATA is used. We work around this issue by defining our own location. Change-Id: I3c29e2df0b67e745283c50d358e31699bd60dc74 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/457 Tested-by: jenkins
2012-02-16Add stm32f0x probe and info workingJonathan Dumaresq1-5/+66
I used the CPUID instead of adding a new argument to the flash bank command Fixed Type in comments Add the failsafe return value in device_id Change-Id: Ieb5a46fc002b5390a0c81bc8b49f6c687036ae1d Signed-off-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca> Reviewed-on: http://openocd.zylin.com/438 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-16Add bootloader mode.Mathias K1-2/+3
This patch add the bootloader define. Change-Id: I280a8a35c3514910dd381de3ab8ad59c9bd74ca1 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/455 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-02-13flash: fix incorrect stm32f2x/stm32f4x flash size registerSpencer Oliver1-1/+1
The ref manuals for the stm32f2x (RM0033 Rev4) and stm32f4x (RM0090 rev1) are unclear to the address of the flash size register (F_ID). According to contacts @ ST this is the correct address, the manuals will be updated in due coarse. Change-Id: If9fb83b3100458d17038cf27c2b23355e1dc5a9e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/448 Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: jenkins
2012-02-09Add init_board procedure executed after init_targetsFreddie Chopin2-0/+8
This adds init_board procedure that behaves exactly the same as init_targets - it can be overriden by "next level" scripts. This procedure is executed after init_targets, allowing common stuff (jtag chain, memory, flash, ...) to be configured in target script (via init_target) and leaving rest (like additional memory, reset configuration, reset-init handlers, ...) to be done in init_board. This makes init_targets scheme more complete and easier to use - current board scripts will not need new init_targets, because everything can be "packed" in init_boards. Moreover it solves the problem of variables being set in init_targets (executed after init), which were not accessible by "linear" scripts (parsed before init). All that has to be done is to enclose all code in board config file in init_board procedure. Change-Id: I0736b1ff9873a687966407d62b58ccf29a8e597b Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-on: http://openocd.zylin.com/427 Reviewed-by: Chris Morgan <chmorgan@gmail.com> Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
2012-02-06doxygen: use correct comment syntaxSpencer Oliver9-23/+23
This issue was caused by uncrustify not correctly converting the doxygen comments. Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Change-Id: Ie6dc3b057a08603b670cb27312e5f0d989426e6c Reviewed-on: http://openocd.zylin.com/431 Tested-by: jenkins
2012-02-06build: cleanup src/target directorySpencer Oliver107-11936/+9596
Change-Id: Ia055b6d2b5f6449a38afd0539a8c66e7d7e0c059 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/430 Tested-by: jenkins