summaryrefslogtreecommitdiff
path: root/src/target
Commit message (Collapse)AuthorAgeFilesLines
...
* target: Fix shadow issues on MacEdgar Grimberg2010-06-221-3/+3
| | | | | | wait is declared in /usr/include/sys/wait.h Signed-off-by: Edgar Grimberg <edgar.grimberg@zylin.com>
* cortex a8: print message that locking debug access succeeded on second tryØyvind Harboe2010-06-221-0/+4
| | | | | | | when locking the debug access fails on the first try, it's a bit noisy, so print out message that it succeeded on second try. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cortex a8: add error propagation for poll/resumeØyvind Harboe2010-06-221-5/+15
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cortex a8: add timeouts waiting for restart, prepare and haltØyvind Harboe2010-06-221-6/+36
| | | | | | | It would previously sit in an infinite loop rather than reporting an error. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cortex a8: add error propagation for mem_ap_read/write_atomic_u32Øyvind Harboe2010-06-221-7/+31
| | | | | | | Error propagation avoids e.g. infinite loops waiting for target to halt, etc. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm_adi_v5: error propagation fixesØyvind Harboe2010-06-221-18/+22
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target/avrt: review unused symbolsAntonio Borneo2010-06-211-56/+0
| | | | | | | | | | Remove unused functions: - mcu_write_dr_u16 - mcu_write_dr_u8 - mcu_write_ir_u16 - mcu_write_ir_u32 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* target/avr: review scope of symbolsAntonio Borneo2010-06-212-33/+40
| | | | | | | | | Add "static" qualifier to private functions. Move duplicated global declarations from "target/avrt.c" and "nor/avrf.c" to "target/avrt.h". Remove unused declarations form "nor/avrf.c". Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* target/feroceon: review scope of symbolsAntonio Borneo2010-06-211-23/+32
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* target/mips_m4k: review scope of symbolsAntonio Borneo2010-06-212-44/+46
| | | | | | | Add "static" qualifier to private functions. Remove private prototypes from include file. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* jtag: do not use jtag_get_error()Øyvind Harboe2010-06-211-5/+2
| | | | | | | normal code should not call jtag_get_error(), but rather check the return code from jtag_execute_queue(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* adi_v5_jtag: add missing error handlingØyvind Harboe2010-06-211-1/+5
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cortex a8: add missing error handlingØyvind Harboe2010-06-211-3/+11
| | | | | | cortex examine was missing error handling. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cortex a8: fix segfault for unexamined targetsØyvind Harboe2010-06-192-3/+13
| | | | | | | print error message instead of segfaulting for unexamined targets. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target/dsp563xx: review unused symbolsAntonio Borneo2010-06-182-56/+0
| | | | | | | | | | Remove unused functions: - dsp563xx_jtag_senddat - dsp563xx_write_ir_u16 - dsp563xx_write_dr_u16 - dsp563xx_write_ir_u32 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* target/dsp563xx: review scope of symbolsAntonio Borneo2010-06-182-50/+27
| | | | | | | Add "static" qualifier to private functions. Remove private prototypes from include file. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* mips_ejtag: -Wshadow warning fixesØyvind Harboe2010-06-151-2/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* mips32_pracc: -Wshadow warning fixesØyvind Harboe2010-06-151-3/+3
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* mips_m4k: -Wshadow warning fixesØyvind Harboe2010-06-151-2/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* mips32: -Wshadow warning fixesØyvind Harboe2010-06-151-2/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cortex_a8: -Wshadow warning fixesØyvind Harboe2010-06-151-9/+9
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm11_dbgtap: -Wshadow warning fixesØyvind Harboe2010-06-151-16/+16
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm926ejs: -Wshadow warning fixØyvind Harboe2010-06-151-10/+10
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm920t: -Wshadow warning fixesØyvind Harboe2010-06-151-11/+12
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm720t: -Wshadow warning fixØyvind Harboe2010-06-151-4/+4
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* adi_v5_jtag: -Wshadow warning fixesØyvind Harboe2010-06-151-5/+5
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm_adi: -Wshadow warning fixØyvind Harboe2010-06-151-3/+3
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm_simulator: -Wshadow warning fixesØyvind Harboe2010-06-151-11/+11
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm_dpm: -Wshadow warning fixØyvind Harboe2010-06-151-3/+3
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target: -Wshdaow warning fixØyvind Harboe2010-06-151-5/+5
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* breakpoint: -Wshadow warning fixØyvind Harboe2010-06-151-4/+4
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target: fix retval gaffe in mwX commandsØyvind Harboe2010-06-141-1/+1
| | | | | | | | | | | failure to write to memory was not propagated. This is an interesting case of broken error handling: with exceptions we wouldn't have had this at all, and I also wonder if there is a GCC option to warn about these kinds of potential bugs. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* TARGET: removed unused parametersAntonio Borneo2010-06-127-27/+8
| | | | | | | Parameters "domain" and "ap" of function armv4_5_mmu_translate_va() are not used. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET: removed unsed parameterAntonio Borneo2010-06-127-25/+11
| | | | | | | | Parameter "type" of function armv4_5_mmu_translate_va() is now not used. Remove the parameter and the "enum" listing its values. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET: fix handling return code of MMU translationAntonio Borneo2010-06-126-26/+0
| | | | | | | | | Function armv4_5_mmu_translate_va() now properly signals errors in the return value. Remove former error handling by setting variable "type" to value "-1". Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET/ARM920T: fix return valueAntonio Borneo2010-06-121-1/+1
| | | | | | | | | Function arm920t_write_memory() default return value should be ERROR_OK. All cases of local errors are handled immediately and not further propagated. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET/ARM920T: fix compile warningAntonio Borneo2010-06-121-1/+1
| | | | | | | | | Commit 0538081246fafbfb74d554bb1b758412534aa254 introduces a compile time warning: arm920t.c: In function ‘arm920t_write_memory’: arm920t.c:567: warning: ‘retval’ may be used uninitialized in this function Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* arm mmu: error propagation added for address translationØyvind Harboe2010-06-117-19/+47
| | | | | | | The return value for MMU translation was a mess, either error or value. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* verify: display up to 128 diff'sØyvind Harboe2010-06-081-11/+19
| | | | | | Showing up to 128 differences. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* etm: print something when trace buffer emptyJon Povey2010-05-311-0/+5
| | | | | | | | ETM analyze produced no output when the trace buffer was empty. This patch provides users with a clue. Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm_adi_v5: correct ahbap_debugport_init mem-ap id (bug #23)Spencer Oliver2010-05-211-0/+3
| | | | | | | | We request a id register read at the end of ahbap_debugport_init but we never actually run the queue. In some cases this causes a segfault. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* target: slow targets could cause GDB to time outGary Carlson2010-05-191-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This second half of the patch is proposed to clean up some GDB keep alive issues on arm7_9 targets that start up with very slow clocks. If an attempt is made to write to key registers on the processor with a slow jtag speed, GDB timeout warnings appear on the console (at least mine) when "reset halt" or "reset init" commands are issued from the gdb client: *** BEFORE PATCH *** (gdb) monitor reset init fast memory access is disabled 2 kHz keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1026). Workaround: increase "set remotetimeout" in GDB JTAG tap: at91sam9g20.cpu tap/device found: 0x0792603f (mfg: 0x01f, part: 0x7926, ver: 0x0) target state: halted target halted in ARM state due to breakpoint, current mode: Supervisor cpsr: 0x000000d3 pc: 0x00000000 MMU: disabled, D-Cache: disabled, I-Cache: disabled keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1027). Workaround: increase "set remotetimeout" in GDB keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1006). Workaround: increase "set remotetimeout" in GDB keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1006). Workaround: increase "set remotetimeout" in GDB keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1006). Workaround: increase "set remotetimeout" in GDB keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1004). Workaround: increase "set remotetimeout" in GDB RCLK - adaptive dcc downloads are enabled fast memory access is enabled NAND flash device 'NAND 256MiB 3,3V 8-bit' found (gdb) I added additional keep alive steps in areas that troubleshooting revealed were causing problems. I only did this however for non-fast write memory accesses. I don't think most people would be using fast memory accesses to write to memory when the jtag and system clocks are slow anyway. If you disagree with my feeling, think there is a more elegant way to handle the problem, or think the patch will cause other unforeseen problems with other targets, let me know. As you can see below, the patch does eliminate the problem on my development station and I suspect that it will benefit others. *** AFTER PATCH *** (gdb) monitor reset init fast memory access is disabled 2 kHz JTAG tap: at91sam9g20.cpu tap/device found: 0x0792603f (mfg: 0x01f, part: 0x7926, ver: 0x0) target state: halted target halted in ARM state due to breakpoint, current mode: Supervisor cpsr: 0x000000d3 pc: 0x00000000 MMU: disabled, D-Cache: disabled, I-Cache: disabled RCLK - adaptive dcc downloads are enabled fast memory access is enabled NAND flash device 'NAND 256MiB 3,3V 8-bit' found (gdb) Gary Carlson Gary Carlson, MSEE Principal Engineer Carlson-Minot Inc.
* Change kb/s to KiB/s in messages about kibibytesJon Povey2010-05-161-4/+4
| | | | | | | Change download rate messages about kibibytes from "kb/s" to "KiB/s" units. See: http://en.wikipedia.org/wiki/Data_rate_units Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
* fix instruction refilling bug when using software breakpoints on a ↵Jun Ma2010-05-121-0/+1
| | | | | | | big-endian arm926ej-s system Signed-off-by: Jun Ma <sync.jma@gmail.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* mips32: 20 second timeout/megabyte for CRC checkSpencer Oliver2010-05-101-1/+3
| | | | | | | There was a fixed 20 second timeout which is too little for large, slow timeout checks. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* armv7m: 20 second timeout/megabyte for CRC checkSpencer Oliver2010-05-101-1/+3
| | | | | | | There was a fixed 20 second timeout which is too little for large, slow timeout checks. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* flash: stop caching protection stateØyvind Harboe2010-05-051-13/+0
| | | | | | | | | | | | | | There are a million reasons why cached protection state might be stale: power cycling of target, reset, code executing on the target, etc. The "flash protect_check" command is now gone. This is *always* executed when running a "flash info". As a bonus for more a more robust approach, lots of code could be deleted. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* command context: fix errors when running certain commands on startupØyvind Harboe2010-05-052-19/+18
| | | | | | | | | | | Various commands, e.g. "arm mcr xxxx" would fail if invoked upon startup since it there was no command context defined for the jim interpreter in that case. A Jim interpreter is now associated with a command context(telnet, gdb server's) or the default global command context. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target: clean up target memory allocation error messagesØyvind Harboe2010-05-042-3/+22
| | | | | | | | | | target memory allocation can be implemented not to show bogus error messages. E.g. when trying a big allocation first and then a smaller one if that fails. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* xscale: add support for length arg to wp commandMike Dunn2010-04-241-8/+51
| | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the length argument to the xscale implementation of the wp command. Per discussion with David, the length argument specifies the range of addresses over which a memory access should generate a debug exception. This patch utilizes the "mask" feature of the xscale debug hardware to implement the correct functionality of the length argument. Some limitations imposed by the hardware are: - The length must be a power of two, with a minumum of 4. - Two data breakpoint registers are available, allowing for two watchpoints. However, if the length of a watchpoint is greater than four, both registers are used (the second for a mask value), limiting the number of watchpoints to one. This patch also removes a useless call to xscale_get_reg(dbcon) in xscale_set_watchpoint() (value had already been read from the register cache, and the same previously read value is then modified and written back). I have been using and testing this patch for a couple days. Questions, corrections, criticisms of course gratefully received.