summaryrefslogtreecommitdiff
path: root/src/target
Commit message (Collapse)AuthorAgeFilesLines
* cortex-a: use -dbgbase optionØyvind Harboe2011-03-311-5/+12
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target: add -dbgbase option to target configurationØyvind Harboe2011-03-312-0/+23
| | | | | | | | | Really a Cortex-A specific option, but there is no system in place to support target specific options currently and there has been no need for such a system until now. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* bugfix for step <address> mips_m4kAndrew Lyon2011-03-291-0/+4
| | | | | | | | | The patch below fixes step <address> on mips_m4k. Spencer Oliver <spen@spen-soft.co.uk>: The current code is used on all other arch's - is there a underlying issue with those aswell ?
* cortex_a: rename cortex_a8.c/h to cortex_a.c/hØyvind Harboe2011-03-223-3/+3
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* omap4430: tried to add in workaround for broken dbgbase queryØyvind Harboe2011-03-221-0/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cortex a9: merge cortex a9 and a8 codeØyvind Harboe2011-03-226-2512/+289
| | | | | | better to keep this in a single file. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* dsp563xx_once: fix warning and potential bugØyvind Harboe2011-03-201-1/+1
| | | | | | | | I don't think dsp563xx_once_read_register() would ever be called with len==0, but it would have been broken in that case. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target: allow targets to override memory alignmentMathias K2011-03-172-4/+32
| | | | | Targets can implement read/write_buffer to handle alignment.
* SYS_WRITE0 fixJohn and Tina Peterson2011-03-171-1/+1
| | | | | | Problem is, trying to print "Hello, world!\n" just prints endless H's, because r1 is never incremented. One way to fix it would be to add a "++" after "r1".
* Fix a bunch of typos.Uwe Hermann2011-03-175-6/+6
| | | | | | | | Fix a bunch of typos. Most are in code comments, so nothing should break. UNKOWN_COMMAND and CMD_UNKOWN are not used elsewhere, so correcting the spelling should also not break anything.
* dsp563xx: fix alignment warningsØyvind Harboe2011-03-151-6/+6
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* dsp563xx: fix bug in x buffer handlingØyvind Harboe2011-03-151-1/+1
| | | | | | found by inspection. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cortex_a8: remove dap_ap_sel callsLuca Ellero2011-02-231-68/+60
| | | | | | | add new mem_ap_sel_* functions (as was made for cortex_a9) see commit: 779005f43dc372de937dfd4b445f31d882b98eca Signed-off-by: Luca Ellero <lroluk@gmail.com>
* dsp563xx: rudimentary gdb supportMathias K2011-02-211-206/+477
| | | | | | | | | | | This patch add rudimentary gdb support. The gdb register list order is corrected. All registers are now 32bit width. Events are send to signalize gdb the current target status. Resume and step function was corrected to consider a modified pc register. Read/write memory now support L memory type, this means a memory with alternating y/x memory words. The memspace variable, used by gdb, is now observed before a default memory access is initiated. Dummy functions for breakpoint and watchpoint are added.
* arm_adi_v5: add/move apsel member in struct adiv5_dapLuca Ellero2011-02-174-75/+72
| | | | | | | | | | | | | | | This patch tries to make some order in "apsel" mess. "dap apsel" command was quite useless (and broken) by itself. With this patch we can use it to select between AHB or APB memory access (previous patch 05ab8bdb813acdcd74afa71d6656c2df816cb230 was somehow broken). - moves member apsel (in struct adiv5_dap) to ap_current - adds apsel member this strange choice is made trying to keep coherence in "dap apsel" command and to keep compatibility with other code (for example cortex_a8). Signed-off-by: Luca Ellero <lroluk@gmail.com>
* dsp563xx: minor fixes, code cleanupMathias K2011-02-171-52/+110
| | | | | | | | This patch move the dsp563xx_target_create function to the related code block. Also the target examine function was added and the register cache is initialized in a separate function. The missing functionality to invalidate the x memory context on memory writes was also added.
* dsp563xx_once: Correct wrong return value on jtag communication errorsMathias K2011-02-171-7/+7
| | | | | | | | This patch change the return value on a jtag communication error to TARGET_UNKNOWN because this function should return the current target status and not a error code from the underlying api call. Also the validity of the jtag_status is extended to all static bits in this value.
* - remove pipeline context, use once register instead - fix wrong register ↵Mathias K2011-02-172-71/+82
| | | | write in resume and step function - add more conditional branch handling
* - add parameter flush to the once api to signalize if the jtag queue need to ↵Mathias K2011-02-153-167/+90
| | | | be flushed after the command
* - add bulk memory write function - execute jtag queue at the end of the ↵Mathias K2011-02-151-11/+47
| | | | memory transfer
* dsp563xx_once: Correct definition of JTAG_INSTR_CLAMPPhil Fong2011-02-151-1/+1
| | | | | | | | | | | I've been working on Rodrigo on adding support to flash Freescale dsp56800e devices and have been looking at the dsp563xx code. I think the define for the JTAG CLAMP instruction in dsp563xx_once.c is incorrect. It should be 0x05 according the Freescale AN2074 (and is also 0x05 in the dsp568xx according to AN1935). It won't actually change anything in OpenOCD since this define is not used anywhere (as far as I can tell).
* cortex_a9: move dap_ap_select to arm_avi_v5Luca Ellero2011-02-141-92/+66
| | | | | | | | | | | | | | | dap_ap_select was used in the code at various points, but that can lead to confusion, without any knowledge of what AP is really selected at some points. Some bugs derive from this (for example md/mw doesn't work well after issueing "dap apsel" command). Moving it to arm_adi_v5.c (using mem_ap_sel* functions instead of mem_ap_*) make the code more clear and more easier to maintain. In the future it should be made "static" to avoid its use outside arm_adi_v5 One further benefit is the various goto has been removed as well Signed-off-by: Luca Ellero <lroluk@gmail.com>
* arm_adi_v5: add wrapping transfer functions with selection of apLuca Ellero2011-02-142-1/+75
| | | | Signed-off-by: Luca Ellero <lroluk@gmail.com>
* arm_adi_v5: add transfer functions prototypes with selection of apLuca Ellero2011-02-141-0/+31
| | | | Signed-off-by: Luca Ellero <lroluk@gmail.com>
* cortex_a9: check if MMU is enabled on APB read/write memoryLuca Ellero2011-02-141-0/+22
| | | | Signed-off-by: Luca Ellero <lroluk@gmail.com>
* cortex_a9: check target halted on APB read/write memoryLuca Ellero2011-02-141-0/+12
| | | | Signed-off-by: Luca Ellero <lroluk@gmail.com>
* cortex_a9: trivial fixesLuca Ellero2011-02-141-6/+7
| | | | Signed-off-by: Luca Ellero <lroluk@gmail.com>
* buikd: fix cygwin -mno-cygwin build errorSpencer Oliver2011-02-101-1/+1
| | | | | | Remove duplicate inline that causes certain versions of gcc to choke. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cortex_a9: implement read/write memory through APB-APLuca Ellero2011-02-101-31/+129
| | | | | | | | | | | | | | | This patch adds read/write capability to memory addresses not accessible through AHB-AP (for example "boot ROM code"). To select AHB or APB, a "dap apsel" command must be issued: dap apsel 0 -> following memory accesses are through AHB dap apsel 1 -> following memory accesses are through APB NOTE: at the moment APB memory accesses are very slow, compared to AHB accesses. Work has to be done to get it faster (for example LDR/STR instead od LDRB/STRB) Signed-off-by: Luca Ellero <lroluk@gmail.com>
* cortex_a9: fix dap_ap_select() usageAaron Carroll2011-02-101-6/+20
| | | | | | | Save, select and restore AP in cortex_a9_step and cortex_a9_init_debug_access. Fixes a bug where the wrong AP is selected after a reset. Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
* dsp563xx: add x, y and p memory accessMathias K2011-02-082-73/+311
| | | | | | | | | | | Hello, this patch add commands to access to x,y and p memory. For run time optimization some local jtag function was changed to static inline. Regards, Mathias
* cortex_a8/a9: fix some commentsLuca Ellero2011-02-082-8/+8
| | | | Signed-off-by: Luca Ellero <lroluk@gmail.com>
* more changes to dsp563xx codeMathias K2011-02-034-462/+1025
| | | | | | | | | | | | | Hello, this patch adds the missing cpu registers and the correct read/write register functions and fixed most of the halt/step/resume issues. The complete missing error propagation was added. + fix tab/spaces Regards, Mathias
* 24bit buffer supportMathias K2011-02-032-0/+20
| | | | | | | | | | Hello, this patch add 24bit support to the target buffer functions and little/big endian functions. Regards, Mathias
* cortex_m3: allow scripts to override resetAaron Carroll2011-02-021-0/+10
| | | | | | | If a handler for the reset-assert event it present, skip the usual reset handling. This is needed, for example, for board-level resets. Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
* cortex_a9: add source files for Cortex A9 support.Aaron Carroll2011-01-314-1/+2275
| | | | | | add target and build support for A9 Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
* arm_dpm: add some SCR/RCR macrosAaron Carroll2011-01-311-2/+8
| | | | Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
* Add '-coreid' target option to support multiple cores per TAP.Aaron Carroll2011-01-312-0/+23
| | | | | | | | | | | ARM Cortex-A9 multi-core chips expose a single TAP/DAP which connects to both cores. The '-coreid' option selects which core the target should connect to. Note that at present, OpenOCD can connect to either core, but not both simulatenously, until ADI contexts can be shared. Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
* add cortex-r4 etm id to dap infoMathias K2011-01-271-2/+7
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* fix segfault from stack corruption in ahbap_debugport_initAndreas Fritiofson2011-01-261-5/+4
| | | | | | | | | | | | ahbap_debugport_init was queueing reads to a local stack variable but didn't execute the queue before returning. Since the result of the reads are not used anyway, it's better to pass NULL as the destination instead of a dummy variable. I changed this throughout the function, even for the reads that were actually executed. Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* nit: more LOG_* \n fixesEric Wetzel2011-01-093-14/+14
| | | | | | | | | Remove extra \n from LOG_DEBUG, LOG_INFO, and LOG_WARNING messages Remove LOG_INFO_N LOG_INFO_N was only used once and had a \n at the end Change LOG_USER_N calls that end with \n to LOG_USER
* nit: do not add \n at end of LOG_ERROREric Wetzel2011-01-051-12/+12
| | | | Fixed in many other places, and submitted in response to Øyvind's invitation.
* mips32: add fastdata loader working areaSpencer Oliver2011-01-046-11/+29
| | | | | | | | | | Add a working area that is preserved between calls to mips_m4k_bulk_write_memory - this gives us a speed increase of approx 3kb/sec during flash writes to the pic32mx. This area is released during a resume/reset. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* target: change working area free data typeSpencer Oliver2011-01-042-3/+3
| | | | | | | We only use the struct working_area member 'free' as a true/false type so might as well use a bool data type. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* error handling: the error number is not part of the user interfaceØyvind Harboe2011-01-034-7/+8
| | | | | | | | Do not propagate error number to user. This is for internal programming purposes only. Error messages to the user is reported as text via LOG_ERROR(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* CORTEX A8: Fix broken CPU identificationMarek Vasut2010-12-301-3/+17
| | | | | | | This patch fixes the issue where the OMAP CPU (and possibly others) was mistaken for iMX51 and therefore had misadjusted debug base. Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* Compilation Warnings on OS X 10.5Andrew MacIsaac2010-12-294-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I received a number of "-Wshadow" related warnings (treated as errors) while trying to build on OS X Leopard. In addition, there were two miscellaneous other warnings in the flash drivers. Attached are two patches which correct these issues and the commit messages to accompany them. My system has the following configuration (taken from uname -a): Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 === Werror_patch.txt Commit Message === compilation: fixes for -Wshadow warnings on OS X These changes fix -Wshadow compilation warnings on OS X 10.5.8 Compiled with the following configure command: ../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink --enable-ft2232_libftdi === flash_patch.txt Commit Message === compilation: fixes for flash driver warnings on OS X These changes fix two compilation warnings on OS X 10.5.8: ../../../../src/flash/nor/at91sam3.c:2767: warning: redundant redeclaration of 'at91sam3_flash' ../../../../src/flash/nor/at91sam3.c:101: warning: previous declaration of 'at91sam3_flash' was here and ../../../../src/flash/nor/stmsmi.c:205: warning: format not a string literal and no format arguments Compiled with the following configure command: ../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink --enable-ft2232_libftdi === Andrew
* warnings: use more 'const' for char *Øyvind Harboe2010-12-299-10/+10
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target: do not expose error numbers to usersØyvind Harboe2010-12-291-6/+0
| | | | | | | error numbers are only reported at DEBUG log levels and used internally, they are not part of the user interface. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* initial SWD transport (SWD infrastructure #2)David Brownell2010-12-243-8/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This piggy backs on JTAG so it's not yet pretty, but that seems unavoidable so far given today's OpenOCD internals. SWD init and data transfer are unfinished and untested, but that should cause no regressions, and will be addressed by the time drivers start using this infrastructure. Checking in whould get the code working better sooner, and turn up any structural/architectural issues while they're easier to fix. The debug adapter drivers will provide simple SWD driver structs with methods that kick in as needed (instead of JTAG). So far just one adapter driver has been updated (not yet ready to use or circulate). The biggest issues are probably - fault handling, where the ARM Debug Interface V5 pipelining needs work in both JTAG and SWD modes and - missing rewrite of block I/O code to work on both of our Cortex-ready transports (Current code is hard-wired to JTAG); relates also to the pipelining issue. - omitted support to activate/deactivate SWO/SWV trace (this is technically trivial, but configuring what to trace is NOT. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> ---- doc/openocd.texi | 17 ++ src/jtag/core.c | 3 src/jtag/interface.h | 4 src/jtag/jtag.h | 2 src/jtag/swd.h | 114 +++++++++++++++++++ src/jtag/tcl.c | 2 src/target/adi_v5_swd.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++-- src/target/arm_adi_v5.c | 8 + src/target/arm_adi_v5.h | 3 9 files changed, 425 insertions(+), 9 deletions(-)