summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* command: fix leak when executing commandsØyvind Harboe2011-03-271-0/+1
| | | | | | found via valgrind, not observed/reported. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* 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>
* zy1000: fix bug in ir scan handlingØyvind Harboe2011-03-211-0/+5
| | | | | | | set cur_instr to BYPASS as optimisation code will rely on checking the cached value. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: removed JTAG master TCP/IP serverØyvind Harboe2011-03-211-125/+2
| | | | | | | Move ZY1000 OpenOCD driver more in the direction of being a client to simplify code. 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>
* zy1000: add code to check that SRST assertsØyvind Harboe2011-03-181-34/+42
| | | | 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-1713-14/+14
| | | | | | | | 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>
* zy1000: switch to pthreadØyvind Harboe2011-03-151-11/+13
| | | | | | pthreads work under Linux and eCos. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix JTAG over TCP/IP performance problemØyvind Harboe2011-03-151-8/+11
| | | | | | | only flush write queue just before waiting for more data, rather than when fetching more data from the buffer. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix incorrect usage of jtag_sleep()Øyvind Harboe2011-03-151-1/+2
| | | | | | | | Found by inspection: the correct thing in the context is to use usleep() rather than jtag_sleep(). Relates to JTAG over TCP/IP only. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: clean up jtag_sleep, handle short sleeps correctly via usleepØyvind Harboe2011-03-151-1/+8
| | | | | | | | | | | short sleeps are handled via usleep, longer sleeps we round up to nearest ms. There was a bug in jtag_sleep() in that it would round *down* to nearest ms, thus making all <1ms sleeps 0. Found by inspection rather than symptom. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: reduce memory usage for fw upgrade fnØyvind Harboe2011-03-151-16/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jlink: add Emulator configuration supportJean-Christophe PLAGNIOL-VILLARD2011-03-131-0/+397
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* jlink: add detect hw typeJean-Christophe PLAGNIOL-VILLARD2011-03-131-0/+21
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* jlink: use tap buffer as 2kJean-Christophe PLAGNIOL-VILLARD2011-03-131-3/+3
| | | | | | | | | | | | as said in the datasheet Section 3.3.2 Organization of buffers All buffers are big enough to hold 2 KByte of data. this will double the speed of download Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* jlink: add capability dumper and commandJean-Christophe PLAGNIOL-VILLARD2011-03-131-1/+101
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* ft2232: fix log message and change log output to debugMathias K2011-03-031-1/+1
|
* jlink: add jlink_pid to specify the pid to useJean-Christophe PLAGNIOL-VILLARD2011-03-021-2/+25
| | | | | | | | this will allow us to use multiple jlink at the same time as when the USB-Address is specified the PID change from 0x0101 to (0x101 + usb_adress) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* jlink: switch commands to subcommandsJean-Christophe PLAGNIOL-VILLARD2011-03-021-3/+13
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* jlink: harmonise the device name to J-LinkJean-Christophe PLAGNIOL-VILLARD2011-03-021-4/+4
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* jlink: add new PID and VIDJean-Christophe PLAGNIOL-VILLARD2011-03-021-2/+8
| | | | | | | | | The default pid of the segger is 0x0101 But when you change the USB Address it will also pid = ( usb_address > 0x4) ? 0x0101 : (0x101 + usb_address) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* svf: add nil option that just runs through the svf fileØyvind Harboe2011-02-281-18/+49
| | | | | | | | useful for debugging without access to hardware to e.g. regression test, reproduce memory corruption problems, etc. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* log: debug level is between silent and debug output levelsØyvind Harboe2011-02-251-9/+8
| | | | | | It wasn't previously possible to silence the output. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: add wait_srst_deassert commandØyvind Harboe2011-02-251-0/+51
| | | | | | Useful to do something *real quick* after a SRST deassert. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* ft2232: fix possible read buffer overflowMathias K2011-02-241-3/+17
| | | | | | | | This patch fix a possible read buffer overflow in ft2232_execute_queue. Also the correct read queue size for libftdi and libftd2xx was added and and tested. In function ft2232_write a uninitialized value was initialized because we don't know if this value was set in the ftdi api call.
* 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>
* jlink: set the speed at JLINK_MAX_SPEED when an exceeded speed is requestedJean-Christophe PLAGNIOL-VILLARD2011-02-231-2/+2
| | | | | | | | | | | it will allow to be at the highest speed of the jlink without touching the board or cpu config tested on sam-ice v5 and at91rm9200-ek Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.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.
* fix compile error under MinGWSimonQian2011-02-181-3/+3
|
* 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
* lpc32xx: Flash driverBjarne Steinsbo2011-02-155-0/+1932
| | | | | | | | | | Based on the lpc3180 driver, but released as a separate driver for two reasons: 1) I don't have an lpc3180 to test it against, so it might unintentionally break compatibility. 2) It's using a different OOB layout than lpc3180. Rewritten so that it no longer borrows code from the NXP CDL library. Instead borrowing code from the u-boot port to lpc32xx, written by Kevin Wells. Tested on lpc3250 (Hitex LPC3250-Stick). OOB layout is compatible with LPCLinux.
* - 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).
* ft2232: add functions for ft2232 set data bits high/low byte commandMathias K2011-02-141-280/+93
| | | | reduce duplication. No change in behavior.
* 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>