summaryrefslogtreecommitdiff
path: root/src/target
Commit message (Collapse)AuthorAgeFilesLines
* fix jtag_add_callback() args. The first argument is nothing special, it's ↵oharboe2009-06-1911-21/+27
| | | | | | just another generic argument. git-svn-id: svn://svn.berlios.de/openocd/trunk@2290 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Cast 64-bit trace hit_counter to long long; fixes format warning.zwelch2009-06-181-1/+1
| | | | | | | What is the correct way to handle this? git-svn-id: svn://svn.berlios.de/openocd/trunk@2285 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u64' to 'uint64_t'zwelch2009-06-181-1/+1
| | | | | | | - Replace '\([^_]\)u64' with '\1uint64_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2282 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u32' to 'uint32_t' in src/targetzwelch2009-06-1839-635/+635
| | | | | | | | - Replace '\([^_]\)u32' with '\1uint32_t'. - Replace '^u32' with 'uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2279 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u32' to 'uint32_t' in src/target/arm*zwelch2009-06-1832-581/+581
| | | | | | | | - Replace '\([^_]\)u32' with '\1uint32_t'. - Replace '^u32' with 'uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2278 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u16' to 'uint16_t'zwelch2009-06-1826-82/+82
| | | | | | | | - Replace '\([^_]\)u16' with '\1uint16_t'. - Replace '^u16' with 'uint16_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2277 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u8' to 'uint8_t' in src/targetzwelch2009-06-1856-664/+664
| | | | | | | | - Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2274 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-171-2/+2
| | | | | | | | Fix parsing bugs for "$target_name mww addr data [count]" ... it was always requiring the count, instead of just defaulting it to one. git-svn-id: svn://svn.berlios.de/openocd/trunk@2263 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-161-1/+17
| | | | | | | | | | | | | | | | | | | | | | | Extend the internal JTAG event handlers to cover enable/disable, and use those events to make sure that targets get "examined" if they were disabled when the scan chain was first set up: - Remove "enum jtag_tap_event", merge with "enum jtag_event", so C code can now listen for TAP enable/disable events. - Report those events so they can trigger callbacks. - During startup, make target_examine() register a handler to catch ENABLE events for any then-disabled targets. This fixes bugs like "can't halt target after enabling its TAP". One class of unresolved bugs: if the target has an ETM hooked up to an ETB, nothing activates the ETB. But starting up the ETM without access to the ETB registers fails... git-svn-id: svn://svn.berlios.de/openocd/trunk@2251 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-161-13/+21
| | | | | | | | | | | | | | | | | | | | | Fix some polling issues: - Don't background-poll disabled TAPs ... this was just a bug waiting to happen. (And then it happened!) - Don't fail command line polls of disabled taps; that's not any kind of error, it's just that you can't do much. But do show that tap-disabled status. - Spell "continuous" correctly in the variable name. ;) Not resolved by this patch: the need for an interlock whereby other code (like the JTAG layer) can block all other access to the JTAG layer, e.g. while enabling or disabling TAPs. And that interlock needs to be timer-safe... git-svn-id: svn://svn.berlios.de/openocd/trunk@2247 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factor load_image argument parsing to parse_load_image_command_args:zwelch2009-06-131-69/+44
| | | | | | | | - Make fast_load_image use the helper coverage the standard load_image. - Improve whitespace in the moved lines. git-svn-id: svn://svn.berlios.de/openocd/trunk@2239 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_profile_command argument parsing:zwelch2009-06-131-7/+6
| | | | | | | - Use parse_uint to ensure timeout value parses properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2238 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_virt2phys_command argument parsing:zwelch2009-06-131-3/+6
| | | | | | | - Use parse_u32 to ensure virtual address parses properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2237 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Cleanup and improve handle_wp_command and handle_rwp_command:zwelch2009-06-131-40/+57
| | | | | | | | | - Simplify argument parsing logic using switch statement. - Use parse_u32 to ensure all values parse properly. - Return syntax error when mode argument fails to parse. git-svn-id: svn://svn.berlios.de/openocd/trunk@2236 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve and simplify handle_bp_command and handle_rbp_command:zwelch2009-06-131-5/+18
| | | | | | | | - Bug fix: return syntax error if remove called without one argument. - Use parse_u32 to ensure address and length arguments parse properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2235 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_verify_image_command_internal command argument handling:zwelch2009-06-131-1/+5
| | | | | | | - Use parse_u32 to ensure address parses properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2234 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_dump_image_command argument parsing:zwelch2009-06-131-5/+10
| | | | | | | - Use parse_u32 to ensure address and size parse properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2233 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_load_image_command argument parsing:zwelch2009-06-131-3/+13
| | | | | | | - Use parse_u32 to ensure base/min/max addresses parse properly. git-svn-id: svn://svn.berlios.de/openocd/trunk@2232 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_mw_command argument handling:zwelch2009-06-131-13/+21
| | | | | | | | | | - Change: All local variable types are now unsigned. - Use parse_u32 to ensure address and value parse properly. - Use parse_uint to ensure count parses properly. - Move variables to location of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2231 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve handle_md_command argument handling:zwelch2009-06-131-3/+10
| | | | | | | - Use parse_u32 and parse_uint for address and count, respectively. git-svn-id: svn://svn.berlios.de/openocd/trunk@2230 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Use parse_u32 in handle_resume_command and handle_step_command.zwelch2009-06-131-2/+10
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2229 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Cleanup and improve handle_halt_command:zwelch2009-06-131-11/+8
| | | | | | | | - Make argument check use parse_uint to ensure value parses properly. - Move variable declarations to location of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2228 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Cleanup and fi handle_wait_halt_command:zwelch2009-06-131-8/+10
| | | | | | | | | | - Use unsigned type for delay variable. - Use parse_uint to ensure delay argument parses properly. - Bug fix: Return syntax error if more than one argument is given. - Bug fix: Return syntax error when argument fails to parse. git-svn-id: svn://svn.berlios.de/openocd/trunk@2227 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Use parse_uint in handle_reg_command to ensure reg number parses properly.zwelch2009-06-131-3/+6
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2226 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Use parse_uint in get_target to ensure target id is parsed properly.zwelch2009-06-131-5/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2225 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Further cleanup to MIPS target read/write memory function:zwelch2009-06-121-38/+13
| | | | | | | | | | | | | - Move the mips32_..._read_mem calls to top-level of read_mem function. - Change: Only perform mips_m4k_read_mem conversion when retval == ERROR_OK. - Prevents pointless conversions of bogus read values after failures. - Eliminate retval variable from mips_m4k_write_mem; return directly. - Move declaration of retval variable to point of first use. - Remove the now redundant switch statements testing size: - argument sanitizing already covers these cases. git-svn-id: svn://svn.berlios.de/openocd/trunk@2220 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Claffey <dnclaffey@gmail.com>:zwelch2009-06-122-10/+61
| | | | | | | | | | | | | | | | | | | | This patch helps fix MIPS big endian (elf32-tradbigmips) targets. If "-endian big" is not set in target create, the endianess defaults to little. mw and md commands will still work, but binary file loads will have the incorrect word order loaded into memory. The EJTAG processor access data register (PrAcc) is little endian regardless of the CPU endianness; it is always loaded LSB first. This is confirmed by the fact that mips_ejtag_drscan_32() uses buf_set_u32() to load the scan field; buf_set_u32() is a little-endian formatter. For big endian targets, data buffers have to be modified so the LSB of each u32 or u16 is at the lower (first) memory location. If the drscan out_value word order is set using buf_set_u32() then it makes sense to also fixup the in_value with buf_get_u32(); a symmetry argument. This has no affect on little endian hosts. git-svn-id: svn://svn.berlios.de/openocd/trunk@2219 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fix bug introduced during r1962ntfreak2009-06-111-1/+1
| | | | | | | | - Original patch submitted by David Claffey [dnclaffey@gmail.com]. git-svn-id: svn://svn.berlios.de/openocd/trunk@2202 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* fix ordering of arguments to fwrite()oharboe2009-06-111-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2197 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factor handle_bp_command into pieces:zwelch2009-06-111-37/+49
| | | | | | | | | | - Bug fix: return a syntax error if the wrong number of arguments are given. - Add handle_bp_command_list() and handle_bp_command_set(). - Use temporary addr variable to eliminate redundant strtoul() calls. - Place variable declarations at their point of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2196 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Factor target_timer_callbacks_check_time into pieces:zwelch2009-06-111-30/+40
| | | | | | | | | - Add target_timer_callback_periodic_restart and target_call_timer_callback. - Clean up and simplify logic that determines whether to call each callback. - Move variable declarations to location of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2195 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify and clean handle_virt2phys_command:zwelch2009-06-111-18/+15
| | | | | | | | - Add a doxygen block to simplify logic. - Move declarations to point of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2194 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify and fix target handle_rwp_command routine:zwelch2009-06-111-3/+4
| | | | | | | | - Return syntax error unless exactly one argument is passed. - Move variable declaration to point of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2193 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify and fix handle_reset_command:zwelch2009-06-111-3/+5
| | | | | | | | - Return syntax error if more than one argument is given. - Move variables to location of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2192 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify handle_resume_command:zwelch2009-06-111-12/+11
| | | | | | | | | - Eliminate redundant calls to target_resume with addr temp variable. - Place variables at location of first use. - Fix minor whitespace issues. git-svn-id: svn://svn.berlios.de/openocd/trunk@2191 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Simplify and fix handle_step_command:zwelch2009-06-111-6/+9
| | | | | | | | | - Bug fix: return syntax error when more than one argument is given. - Eliminate redundant calls to step callback with addr temp variable. - Place variables at location of first use. git-svn-id: svn://svn.berlios.de/openocd/trunk@2190 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* disable polling continuous polling during resetoharboe2009-06-111-0/+9
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2183 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move the documentation for the "poll" command up withzwelch2009-06-101-2/+4
| | | | | | | | | | | | | | other server configuration. Explain what it's about; reference the related "$target_name curstate" method. Update "poll" output to report whether background polling is enabled or not. Also fix a small typo; PC's have "complementary" tools. Some have also "complimentary" ones; but not all. git-svn-id: svn://svn.berlios.de/openocd/trunk@2178 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix make maintainer-clean for out-of-tree builds.zwelch2009-06-091-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2172 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Encapsulate jtag_reset_config using accessors:zwelch2009-06-093-2/+7
| | | | | | | | - Update handle_reset_config_command in tcl.c to use new helpers. - Replace direct accesses in JTAG interface and target drivers. git-svn-id: svn://svn.berlios.de/openocd/trunk@2161 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Encapsulate the jtag_trst and jtag_srst variables:zwelch2009-06-092-2/+2
| | | | | | | | - Add accessor functions to return their value. - Use new SRST accessor in cortex_m3.c and mips_m4k.c git-svn-id: svn://svn.berlios.de/openocd/trunk@2157 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Replace 'jtag.c' with 'core.c' in code comments.zwelch2009-06-091-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2152 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net> Bugfix: $target_name cget/configure ↵oharboe2009-06-081-1/+1
| | | | | | | | -work-area-backup commands should return the "is it backed up?" flag, not the work area size. git-svn-id: svn://svn.berlios.de/openocd/trunk@2108 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>oharboe2009-06-081-7/+26
| | | | | | | | | | | | | | | | - Don't let disabled TAPs be set as the current target - Improve "targets" output: * Remove undesirable "chain position" number; we discourage using them * TAP and Target column updates: + make them long enough for current usage + improve labels, removing guesswork + "TapName" label patches scan_chain output * Highlight the "current" target * Display "tap disabled" as a new pseudo-state * Update docs accordingly git-svn-id: svn://svn.berlios.de/openocd/trunk@2107 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-071-3/+19
| | | | | | | | | | | | | | | Let disabled targets be ignored during normal operation: - In target_examine(), ignore disabled TAPs - Reset handling must not poke at them either: * fail $target_name arp_* operations on disabled TAPs * in startup.tcl, don't even issue the arp_* wait ops ZW: removed superfluous braces from the patch to target.c. git-svn-id: svn://svn.berlios.de/openocd/trunk@2100 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Fix regression in mdw output; identified by Magnus Lundin.zwelch2009-06-071-3/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2098 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* remove unused include file: inttypes.hoharboe2009-06-051-2/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2072 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* remove unused include file: inttypes.hoharboe2009-06-051-2/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2071 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - Purely mechanical transformations to the source files. - Rename 'jtag_TapByJimObj' as 'jtag_tap_by_jim_obj.' git-svn-id: svn://svn.berlios.de/openocd/trunk@2066 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-052-2/+2
| | | | | | | | - Purely mechanical transformations to the source files. - Rename 'jtag_TapByString' as 'jtag_tap_by_string.' git-svn-id: svn://svn.berlios.de/openocd/trunk@2065 b42882b7-edfa-0310-969c-e2dbd0fdcd60