aboutsummaryrefslogtreecommitdiff
path: root/src/target
AgeCommit message (Collapse)Author
2012-05-14stlink: add armv7m stlink handlingSpencer Oliver
This enables us to better handle some of the low level functions that the stlink does not support. It also enables us to share a few more of the standard cortex_m3 functions if necessary. Change-Id: I7a2c57450122012ec189245d8879d8967913e00e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/637 Tested-by: jenkins
2012-05-14mips: support connecting under resetSpencer Oliver
Some targets support connecting while the target's srst is asserted. Tested on pic32 family. Change-Id: I0d20c40af6d031d1306043893e95e61f484c0a87 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/608 Tested-by: jenkins
2012-05-14stlink: support connecting under resetSpencer Oliver
Some targets support connecting while the target's srst is asserted. Tested on stm32 family. Change-Id: I1197dd721a1e1cbf95ee77dfd8e1082b165b22a9 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/607 Tested-by: jenkins
2012-05-14cortex-m3: support connecting under resetSpencer Oliver
Some targets support connecting while the target's srst is asserted. Tested on stm32 family. Change-Id: I9df43623025e37832155aeee7aa099b844b85f16 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/606 Tested-by: jenkins
2012-05-14build: use generic name for arm_algorithm varsSpencer Oliver
This makes the code a bit easier to read as arm_algorithm can refer to other arch's, not just armv4_5. Change-Id: I78c99d40f34cda04e06f2daee75b48ff40a1d23d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/613 Tested-by: jenkins Reviewed-by: Aurelien Jacobs <aurel@gnuage.org> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-05-14build: add missing erase_check loader srcSpencer Oliver
Change-Id: I1534c1ea1606fda9eb6ffa6a11a708f8c8a3d46a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/605 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-05-14armv7m: update crc/erase_check loaders for cortex-m0Spencer Oliver
Use loaders that have been built for cortex-m0, making them usable for both cortex-m0 and cortex-m3 families. Change-Id: Ifd82be87eaec2cb96464290c80800cec3630d619 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/604 Tested-by: jenkins
2012-05-04build: remove clang unused variable assignment warningsSpencer Oliver
Change-Id: Ibe5254704d6cd879a318a82c4f50d9da3c14276c Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/600 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-04-30stlink: support srst resetSpencer Oliver
This adds the ability to support srst reset for the stlink/v2. stlink/v1 will fallback to using SYSRESETREQ which is a full reset - including peripherals. To enable the use of the srst add the following to your cfg: reset_config srst_only Change-Id: I570de607c5f370fd6a4abf47360686c9be07bcdd Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/581 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-04-13stlink: correctly format printed hex addressesSpencer Oliver
Change-Id: I4a139989927249bb5e9dcc4804965c85c37cc09b Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/559 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-04-10topic: add reset functions for SWDSimon Qian
Add swd_init_reset and swd_add_reset. Add adapter_assert_reset and adapter_deassert_reset, and call them instead of JTAG reset functions. Change-Id: Ib2551c6fbb45513e0ae0dc331cfe3ee3f922298a Signed-off-by: Simon Qian <simonqian.openocd@gmail.com> Reviewed-on: http://openocd.zylin.com/526 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-10doxygen: remove warningsSpencer Oliver
Change-Id: I020845a8df7b67f3b6c1a233b3ee07a5d14fa685 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/556 Tested-by: jenkins
2012-04-10Finish off functions mips32_pracc_read_mem16() and mips32_pracc_read_mem8()Salvador
This functions are unfinished and work only with parameter count up to 1024. Commands mdh and mdb from pic32mx context show values not related to memory content if parameter count is bigger than 1024. Firt 1024 are ok. Change-Id: Ie3f4d4a0f9d1d1a69bd3a18de2f72dd9249514cb Signed-off-by: Salvador <sarroyofdez@yahoo.es> Reviewed-on: http://openocd.zylin.com/550 Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Tested-by: jenkins
2012-04-10Minor bug fixes in Mips32 codeSalvador
Now the the "Fast" version for memory blank check in pic32mx.c can be called: default_flash_blank_check() instead of the "fallback" default_flash_mem_blank_check(). The command "verify_image", without working area, now don't show: checksum mismatch - attempting binary compare when there are no real errors in flash. Change-Id: I256e8ae949289634e1de5c1c2861e4c4c4b7fdce Signed-off-by: Salvador <sarroyofdez@yahoo.es> Reviewed-on: http://openocd.zylin.com/549 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-30armv7m: fix broken stlink buildSpencer Oliver
The stlink partially supports the cortex-m4 fp regs and requires these defines to build. Change-Id: Id3aa802ecc7006cb6d9f84b79ab3c21af24c1001 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/545 Tested-by: jenkins
2012-03-30stm32: Update register read/write to the register definition.Mathias K
This patch fix the register index on read/write register. Change-Id: I7b52a927a48259d6f497ac0f474aff7ff1529e9a Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/525 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-30armv7m: detect floating point featureMathias K
This patch add fp feature detection on cortex-m4. Change-Id: I99e9d1bf5534630a22b8ad9c878165683db2d0ba Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/524 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-30Bug in src/target/mips32_pracc.cSalvador
The bug shows up with the command "mdw addres count" and only if count>1024 (count>0x400). The first 1024 values shows as expected, but the rest of the values are wrong. Name of variable bytesread" is changed to "wordsread" to reflect what really does. Change-Id: Iad79393e72da2637551c5ae6e829e3873605c520 Signed-off-by: Salvador <sarroyofdez@yahoo.es> Reviewed-on: http://openocd.zylin.com/527 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-03-14stlink: fix alignment build warningAlexandre Pereira da Silva
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-14armv7m: Add a dummy register at the end of the register list.Mathias K
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 K
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 K
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-14mips: Forced to running state to enable (subsequent) target halt.Drasko DRASKOVIC
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-13target: remove unused declarationSpencer Oliver
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 Harboe
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 Harboe
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-06stlink: fix incorrect pc console outputSpencer Oliver
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-02-26target: add target async algorithm supportSpencer Oliver
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 Fritiofson
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 Fritiofson
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-16stlink: add arm semi-hosting supportSpencer Oliver
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 Oliver
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-09Add init_board procedure executed after init_targetsFreddie Chopin
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-06build: cleanup src/target directorySpencer Oliver
Change-Id: Ia055b6d2b5f6449a38afd0539a8c66e7d7e0c059 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/430 Tested-by: jenkins
2012-01-30target: increase chunk size in dump_imageAndreas Fritiofson
Replace the big stack-allocated buffer with a much bigger heap-allocated. There was no explanation for the apparently arbitrary chunk size, and performance was improved by increasing it, leveling out at about 4k. Change-Id: I3b06d4469092ec8d89d0ce05bff0b7cf213c5062 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/404 Tested-by: jenkins Reviewed-by: Marti Bolivar <mbolivar@leaflabs.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-27STLINK: swd transport renamed and jtag+swim transport addedMathias K
This patch add jtag support to the stlink driver add two new transport types, JTAG and SWIM. Change-Id: I7089d74250330be5c6a01c24066307641df7d11e Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/393 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-27stlink: add missing memory check handlersSpencer Oliver
Change-Id: I502575ab77c0c87ffebb56ec3d78905f7fcf7cc5 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/398 Tested-by: jenkins
2012-01-23stlink: better handle target reset/eventsSpencer Oliver
This makes the stlink target use the std armv7m_arch_state giving consistent OpenOCD output. Added debug entry handler so we get debug entry reason. Change-Id: Ia3c1380fd5033a8e541b0d45a7c3559f1b05957d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/379 Tested-by: jenkins
2012-01-23stlink: enable cortex special reg writesSpencer Oliver
Change-Id: I5aa02e8de6dd5ac5a6ca628ba4068decb200c689 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/378 Tested-by: jenkins
2012-01-23cleanup: rename armv4_5 to arm for readabilitySpencer Oliver
Nothing more than a name change, just to make reading the code a bit simpler. Change-Id: I73a16b7302b48ce07d9688162955aae71d11eb45 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/390 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-18target: move regmaps to armv7m.cSpencer Oliver
This move will enable use to share with regmaps with the stlink target. Change-Id: If8f41c7c53323d5074cb22ec3440530c1e402004 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/377 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-18cmd: add missing usage varsSpencer Oliver
we should have caught them all - hopefully. Change-Id: I35435317fccaf5ad0216244d69f76db6857bb582 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/381 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15rtos : ps commandMichel JAOUEN
Change-Id: I1b00b6d72f425826c33b0df7dd63114ce642ce93 Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/345 Tested-by: jenkins Reviewed-by: Evan Hunter <evan@ozhiker.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-15rtos : smp supportMichel JAOUEN
Change-Id: I583cddf5e62ed77f108786a085569ab8699ad50d Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/344 Tested-by: jenkins Reviewed-by: Evan Hunter <evan@ozhiker.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-12stlink: add none 32bit memory read/write functionsMathias K
This patch add none 32bit memory read/write functions. Change-Id: Ie3a761cf006249b30d0691d1ea167d69a012c36a Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/367 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-12cmd: add missing usage varSpencer Oliver
Change-Id: I0f05d643b0801b19cc3beb88f0d12d7e4c83ef9c Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/356 Tested-by: jenkins
2012-01-12build: remove unused variablesSpencer Oliver
detected by clang. Change-Id: Id9effcc5437870f37fecd33803f7753c6eca53d6 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/361 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2012-01-12target: fix missing semihosting return pathSpencer Oliver
bug nicely caught by clang. Change-Id: I7abf0fdd76666fb3eb1c83e3edfd01e0da485ffe Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/359 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-04Change return value on error.Mathias K
On wrong parameters a error is signalized to the calling function. Change-Id: I484443fdb39938e20382edc9246d5ec546a5c960 Signed-off-by: Mathias K <kesmtp@freenet.de> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/282 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-04stlink: update to use ERROR_COMMAND_SYNTAX_ERRORSpencer Oliver
Change-Id: I21b669b09df65b56659d2f057cf389ba7b1cecfa Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/335 Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>