aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-14startup: Fixed measure_clk to return kHz instead of MHz.Ed Beroset
The original code had iterated 10,000,000 times and taken the elapsed time divided by 10,000, to yield kHz which is mathematically correct only if we were measuring time in seconds, but we are measuring time in milliseconds, so the correct divisor is actually 10,000,000. Previous code would report 0.500 for actual measured speed of 500 kHz. Change-Id: Iba4c4961fe3973e7ccfa6dfa11d606a966ceb50c Signed-off-by: Ed Beroset <beroset@ieee.org> Reviewed-on: http://openocd.zylin.com/2573 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14em357: Corrected EM357 support including errata detailsEd Beroset
Original submitted code had only been tested with em358, but testing with actual em357 revealed errors that this patch corrects. Change-Id: I70cf31210de8ed84e3755a56e76261ad200322bb Signed-off-by: Ed Beroset <beroset@ieee.org> Reviewed-on: http://openocd.zylin.com/2581 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-14Cortex-A: Don't flush the data/unified cache if MMU is offUwe Kleine-König
When the SCTLR has C set but M unset (i.e. Caching on, but MMU off) the cache if effectively off. So only flush the cache if MMU is on, otherwise stale entries might be committed to memory. Change-Id: Iaff8b6f25b7a41ba838b91d45684c98f99fc0b27 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-on: http://openocd.zylin.com/2429 Tested-by: jenkins Reviewed-by: Christopher Head <chead@zaber.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Vladimir Svoboda <ze.vlad@gmail.com>
2015-04-14RTOS: Add logging to FreeRTOS and general RTOSEvan Hunter
Change-Id: I43d14f3b59daae7f90c344abdf71eaa8f74ef7ef Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/2391 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-14tcl/interface/parport: default to sane value on non-windows systemsPaul Fertser
When using ppdev driver 0 is the most appropriate default value as it corresponds to /dev/parport0. Raw port address is suitable only for direct access (I think that's parport-giveio on windows). Reported by danitool on IRC. Change-Id: I983c22251de6601b433ad31aaf660fb664cee7e9 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2572 Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-14jtag/core: honour SRST timings in SWD modePaul Fertser
Since SWD is currently abusing the JTAG command queue for reset and sleep handling (and all other operations are performed in a different way), sleep needs to be forced explicitly to ensure correct timings. Change-Id: I5b0da6cbb7d0560154e4077b261aa6828cefc892 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2591 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-14tcl/board: Add Infineon XMC4500 Relax Kit configJeff Ciesielski
Tested with "J-Link Lite-XMC4000 Rev.1 compiled Dec 7 2012 19:23:07" on XMC4500 Relax Lite Kit V1. Change-Id: Ib680a444fa4cadbf640afba15d607c0e6bd4ab2c Signed-off-by: Jeff Ciesielski <jeffciesielski@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2567 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-14tcl/board: Add Infineon XMC4200 Application Kit configJeff Ciesielski
Change-Id: I3a946ba3745da651d470cd574222ba5c7147ac9d Signed-off-by: Jeff Ciesielski <jeffciesielski@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2566 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-14tcl/board: Add Infineon XMC4500 Application Kit configsAndreas Färber
Tested CPU_45A-V2 (General Purpose) with ARM-USB-TINY-H (via SWD) and with "J-Link Lite-Cortex-M V8 compiled Jul 17 2014 11:40:12" firmware. Tested CPU_45B-V1-006 (SDRAM) with ARM-USB-TINY-H (via SWD) and with "J-Link Lite-XMC4200 Rev.1 compiled Jul 18 2014 17:28:26" firmware. Change-Id: I3451117606551671ec77722f6adf7d7a6a4bd576 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2481 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-14tcl/target: Add Infineon XMC4000 family configAndreas Färber
Base config, verified against XMC4500, XMC4400 and XMC4100/XMC4200 manuals. Change-Id: I10907bdf307bc6d11dc5454bf5391758de49dc30 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2480 Tested-by: jenkins Reviewed-by: Jeff Ciesielski <jeffciesielski@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-04-14tcl: icepick: add icepick_d_set_coreidFelipe Balbi
this is just to avoid open coding that in icepick_d_tapenable. Cleanup only, no functional changes. Change-Id: Iabd20291b7bdd95957afa1c74f52171789201227 Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2624 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14target: icepick: call icepick_c_setupFelipe Balbi
it also works on icepick_d. Change-Id: I50c0c81286aae673c94ea77e47454ff48eab1668 Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2623 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14target: icepick: switch over to icepick_c_routerFelipe Balbi
Reusing what's already there to ease maintainability. Change-Id: I2030581669c644e2d9d9f9968075ab6344445d04 Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2622 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: target: am437x: pass coreidFelipe Balbi
This commit is only for the sake of completeness as default coreid is zero. In any case, coreids 1-4 are used for the different PRU cores inside the SoC. Change-Id: I775f2f444b1a908ffaf7bdbc43bcc966f19668c4 Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2621 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14target: am437x: use more descriptive namesFelipe Balbi
Use more descriptive names for JRC and DAPs so they more closely match documentation. For example there's no Cortex A9 DAP, that's the DebugSS DAP where Cortex A9 target sits. In that same DAP we have have ETM, STM and both dual-PRU subsystems. Change-Id: I0e66ebb6299763f96606fae3e4c62e5785c804f2 Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2620 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14target: am437x: fix DebugSS DAP IDFelipe Balbi
Main DAP (where Cortex A9 sits) ID is actually 0x46b6902f. Fix it. Change-Id: Ifa3335186bcf60d264d4ecea477bfe2f5ca10ead Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2619 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: board: add AM437x IDK supportFelipe Balbi
Add support for Texas Instruments AM437x Industrial Development Kit support. Change-Id: I33ed71c7392c3805a86cf2c8adce83c0e8aa323d Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2617 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: am437x: add reset-init event handlerFelipe Balbi
this event handler will configure and lock PLLs and configure DDR so platform is placed in usable state. Change-Id: Idd02f4c9789181d69578f8606ac3576ea1dd8a0b Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2616 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: am437x: disable watchdog on reset-endFelipe Balbi
sometimes, watchdog might be left running and it could expire in the middle of a debug session, to prevent that, just make sure to disable watchdog on reset-end if current state is 'halted'. Change-Id: Ib4f2a2321cba17cd8c56ca3ae63114a563a6de90 Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2615 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: am437x: define registers to be used laterFelipe Balbi
a later commit will implement a proper reset-init handler to lock pll and configure ddr as we should. Change-Id: I432cf28a5a944bfa83c20aed7298dbd29df30e38 Tested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2614 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: board: ti_am43xx_evm: follow xds100v2 requirementsFelipe Balbi
xds100v2 asks us to call these three commands to guarantee proper behavior, so do it. Change-Id: Iecf9c148ce7c2082ef915b46eeb511ceea395cc3 Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2613 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: board: ti_am437x_evm: select jtag transportFelipe Balbi
default already is jtag, but this silences a warning during startup. Change-Id: I94478327bbb259649500ef74a5b5c10d51e2a517 Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2612 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: target: am437x: use entire SRAM areaFelipe Balbi
According to AM4379 TRM [1], table 2-1 L3 Memory Map, we have a total of 256KiB and there's no reason not to use it all. [1] http://www.ti.com/lit/ug/spruhl7b/spruhl7b.pdf Change-Id: I117f2afe721bc4e3f0df304d3542e1a91aa69d12 Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-on: http://openocd.zylin.com/2611 Tested-by: jenkins Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-04-14tcl: target: am437x.cfg: pass correct dbgbaseFelipe Balbi
Since commit ec9ccaa28849 (arm_adi_v5: make dap_lookup_cs_component() traverse subtables and handle multicore) AM437x devices can't be used with OpenOCD anymore. The reason is that dbgbase used to be set to zero before that commit and that just happens to work with AM437x devices. A more robust solution is to pass correct dbgbase when creating the target, which this commit does. Signed-off-by: Felipe Balbi <balbi@ti.com> Change-Id: Iaf2617804324de8094b25137943e08b84f14c75f Reviewed-on: http://openocd.zylin.com/2602 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2015-04-02target/target.c: fixed rp check bug in asynchronous flash write algorithm.DmitryShpak
Bug in read pointer check within flash write algorithm made incorrect check if block size is more than 4 bytes (bug was detected with 16 bytes block size). Change-Id: I5b8e7ebca619a0a85ae6e9e496ff792248134d81 Signed-off-by: DmitryShpak <disona@yandex.ru> Reviewed-on: http://openocd.zylin.com/2657 Tested-by: jenkins Reviewed-by: Jens Bauer <jens@gpio.dk> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-03-25jtag/drivers/ftdi.c: removed memory leakMateusz Manowiecki
swd_cmd_queue buffer memory leak removed Change-Id: Iafcdf034d32a37d577b58b6256c8fd9b064ce228 Signed-off-by: Mateusz Manowiecki <segmentation@fault.pl> Reviewed-on: http://openocd.zylin.com/2563 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25doc: update RTOS section, add 'mqx' infoMarian Cingel
Change-Id: I20b93d49d275e6daaf5e39c49b4508c70c6fc56f Signed-off-by: Marian Cingel <cingel.marian@gmail.com> Reviewed-on: http://openocd.zylin.com/2592 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25Add configuration for EFM32 Gecko boards with Segger J-Link.Uwe Bonnes
Tested with Tiny Gecko. Change-Id: Iddb87170b6aaaf7f15d3c4517c8661dd6394be8f Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2585 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25flash/nor: mrvlqspi: fix printf formatting issuesMahavir Jain
Change-Id: I74cfce7bb8dbc13fbc3005b5a96213417f93a9f2 Signed-off-by: Mahavir Jain <mjain@marvell.com> Reviewed-on: http://openocd.zylin.com/2577 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Stian Skjelstad <stian@nixia.no>
2015-03-25transport: make 'transport select' auto-select the first available transport ↵Angus Gratton
if not set This should allow most of the existing configurations for older versions to remain compatible without forcing the user to change his or her config to explicitly select transport. Also in some circumstances can remove the need to chain a "-c transport select X" when building custom configs on the command line, which seems like a common new user pitfall. Change-Id: Ic87a38c0b9b88e88fb6d106385efce2f39381d3d Suggested-by: Petteri Aimonen <jpa@git.mail.kapsi.fi> Signed-off-by: Angus Gratton <gus@projectgus.com> Reviewed-on: http://openocd.zylin.com/2551 Reviewed-by: Paul Fertser <fercerpav@gmail.com> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25target/adi_v5_swd, cortex_m: properly handle more cases requiring reconnectPaul Fertser
This brings SWD reconnection procedure in line with the ARM documentation and changes cortex_m reset procedure to make use of it. The motivation behind this patch is to make SAM4L "reset" and "reset halt" properly without SRST. The complication here is that EDBG issues an additional read of DP_RDBUFF automatically right after writing SYSRESETREQ, that leads to a FAULT which needs to be dealt with properly. With this patch the very first ahbap_debugport_init DAP access will make SWD layer properly reinitialise the link before continuing. Runtime tested with mbed CMIS-DAP + KL25 only. Change-Id: Ic506f9db30931dfa60860036b83f73b897975909 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2596 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25drivers/cmsis-dap: port to common SWD frameworkPaul Fertser
Valgrind-tested. Comparison of flashing performance on an FRDM-KL25Z board running mbed CMSIS-DAP variant, 5MHz clock, old driver: wrote 28096 bytes from file demo.elf in 26.833590s (1.023 KiB/s) verified 27264 bytes in 1.754972s (15.171 KiB/s) this implementation: wrote 28096 bytes from file demo.elf in 3.691939s (7.432 KiB/s) verified 27264 bytes in 0.598987s (44.450 KiB/s) Also tested "Keil ULINK-ME CMSIS-DAP" with an STM32F100 target, 5MHz clock, results reading from flash, old driver: dumped 131072 bytes in 98.445305s (1.300 KiB/s) this implementation: dumped 131072 bytes in 8.242686s (15.529 KiB/s) Change-Id: Ic64d3124b1d6cd9dd1016445bb627c71e189ae95 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2356 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25tcl/board/twr-k60f120m: remove useless flash bank 0 definitionPaul Fertser
Since the very first flash bank is already defined in target/kx.cfg, there's no sense in repeating it. Reported and tested by Richard Braun. Change-Id: I417b7072b5e6675ddbf824446e7581b8b7da8f4b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2595 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25flash/nor/kinetis: do not attempt mass-erase in place of a bank erasePaul Fertser
Many kinetis parts come in multi-bank configuration, so this optimisation here can't be performed safely. Investigated and fixed by Richard Braun. Change-Id: I2b56614b47951595c403a1a8edd3afe11b85679b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2594 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-25armv7m_trace, stlink: provide APIs to capture trace with an adapterPaul Fertser
Change-Id: I9d193dd5af382912e4fe838bd4f612cffd11b295 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2540 Tested-by: jenkins
2015-03-25armv7m: add generic trace support (TPIU, ITM, etc.)Paul Fertser
This provides support for various trace-related subsystems in a generic and expandable way. Change-Id: I3a27fa7b8cfb111753088bb8c3d760dd12d1395f Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2538 Tested-by: jenkins
2015-03-10stm32l1.cfg: Add missing dash to fix f7394049d3 commit.Uwe Bonnes
Change-Id: Ifeb2d4fc2b43813edbc6fe2cf08bfd4c55cd1e86 Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2590 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com> Reviewed-by: Stian Skjelstad <stian@nixia.no>
2015-03-09tcl: Add default hooks for STM32F3xAndreas Fritiofson
Keep clocks running in low power modes. Stop watchdogs from interfering with the debug session. Set up PLL and increase clock at reset init. Change-Id: I984d2018f7d47a1042f1e12894563154fa7b566c Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2196 Tested-by: jenkins Reviewed-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-03-09flash/nor/stellaris: allow to recover a locked device that can't be examinedPaul Fertser
Change-Id: I28536184053e2d1ba906620e728f7fad6ba39f0a Reported-by: Ed Beroset <beroset@mindspring.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2552 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Ed Beroset <beroset@ieee.org>
2015-03-09jlink: Add variant "J-Link Lite-XMC4000"Andreas Färber
Avoids "J-Link hw type unknown 0x10" on the Infineon Relax Lite Kit. Change-Id: I3091623ead2e84b67ac20d9866307ccbb3f26f66 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2568 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09jlink: Add variant "J-Link Lite-XMC4200"Andreas Färber
Avoids "J-Link hw type unknown 0x11" on various Infineon boards. Change-Id: If20b9e21110d2acc02be57f5faf28c5e6a39e2c9 Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/2565 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09server, target, cortex_m: add deinit_target to the API to free resourcesPaul Fertser
This should facilitate dynamic target creation and removal. Currently it helps with getting 0 bytes lost report from Valgrind on exit (after talking to a nucleo board). However, 1,223,886 bytes in 5,268 blocks are still reachable which means the app holds pointers to that data on exit. The majority comes from the jtag command queue, there're also many blocks from TCL command registration. Change-Id: I7523234bb90fffd26f7d29cdd7648ddd221d46ab Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2544 Tested-by: jenkins Reviewed-by: Stian Skjelstad <stian@nixia.no>
2015-03-09target/target: call event handlers around examine when polling resumesPaul Fertser
The target might be using Tcl examine-start and examine-end handlers, they need to be called when the target gets reexamined after polling succeeds again. Change-Id: I371380c6f3c427ec7a0206d73426f6589f18a9bd Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2536 Tested-by: jenkins Reviewed-by: Stian Skjelstad <stian@nixia.no>
2015-03-09hla/hla_interface: call HLA layout API close() on quitPaul Fertser
This bug was exposed by Valgrind. Change-Id: I2e2bc036b49ca3ff22f78f765ee4537763350096 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2543 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09target/cortex_m: do not leak memory on reexaminationPaul Fertser
This bug was exposed by Valgrind. Change-Id: If50878664d928c0a44e309ca1452089c1ac71466 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2542 Tested-by: jenkins Reviewed-by: Stian Skjelstad <stian@nixia.no> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09target: fix timer callbacks processingPaul Fertser
Warning, behaviour change: before this patch if a timer callback returned an error, the other handlers in the list were not called. This patch fixes two different issues with the way timer callbacks are called: 1. The function is not designed to be reentrant but a nested call is possible via: target_handle timer event -> poll -> target events before/after reexaminantion -> script_command_run -> target_call_timer_callbacks_now . This patch makes function a no-op when called recursively; 2. The current code can deal with the case when calling a handler leads to its removal but not when it leads to removal of the next callback in the list. This patch defers actual removal to consolidate it with the calling loop. These bugs were exposed by Valgrind. Change-Id: Ia628a744634f5d2911eb329747e826cb9772e789 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2541 Tested-by: jenkins Reviewed-by: Stian Skjelstad <stian@nixia.no> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09arm11: initialise DPM and register cache before reading DSCR for the first timePaul Fertser
When target was already halted during the initial examination, arm11_check_init() was trying to read, store and interpret DSCR contents before the DPM structure is initialised. This caused a segfault like described on http://sourceforge.net/apps/trac/openocd/ticket/65 . This is a totally untested attempt to fix this issue. Change-Id: I2fff115679a3f0023e7a88c749ccb5f045d6cf01 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2043 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09stlink: avoid null pointer dereference in stlink_usb_close()Paul Fertser
Otherwise it happens if stlink can not be opened on start. Change-Id: I7088f10e61508dae230eccfe576a51498c92f5b8 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2550 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Stian Skjelstad <stian@nixia.no>
2015-03-09openrisc: add profiling functionFranck Jullien
Change-Id: Ifee89b289069590e6086a4713b165989578e29ec Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/2494 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2015-03-09armv7m: do not access FPU registers when not presentPaul Fertser
This is runtime and valgrind tested with l0, l1 and f3 hla boards. Change-Id: I49b0b042253d5f3bf216997f0203583db319fe23 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2516 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>