summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Transform 'u32' to 'uint32_t' in src/flash.zwelch2009-06-1839-586/+586
| | | | | | | - Replace '\([^_]\)u32' with '\1uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2280 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-1858-211/+211
| | | | | | | | - 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'zwelch2009-06-1835-414/+414
| | | | | | | | - Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2276 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u8' to 'uint8_t' in src/flashzwelch2009-06-1835-349/+349
| | | | | | | | - Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2275 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-183-77/+77
| | | | | | | | | | | Clean up the PLD files: - Get rid of some extraneous whitespace - Make various functions static - Wrap overlong lines git-svn-id: svn://svn.berlios.de/openocd/trunk@2272 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* dummy driver now works under eCosoharboe2009-06-175-33/+29
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2268 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-171-1/+5
| | | | | | | | Let jtag_call_event_callbacks() behave when the callback removes itself. Oddly, this crashed on x86_32 but not x86_64. git-svn-id: svn://svn.berlios.de/openocd/trunk@2264 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
* Fix compilation for Ubuntu 9.04 on x86-64 when using --enable-httpd.zwelch2009-06-172-3/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2262 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Set svn:eol-style native on ZY1000 minidriver header file.zwelch2009-06-171-210/+210
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2261 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Ensure range errors are reported only when errno indicates one occurred.zwelch2009-06-171-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2260 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Change parse_type macros to be sed-friendly.zwelch2009-06-172-18/+18
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2259 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add argument parsing errors in command.h, use in parse_type routines.zwelch2009-06-172-6/+11
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2258 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move definition of parse_type helpers to command.c:zwelch2009-06-172-22/+41
| | | | | | | | - Add declarations in header file. - Improve wrapper implementations to check for underflow. git-svn-id: svn://svn.berlios.de/openocd/trunk@2257 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Convert core parse_type implementations to check for underflow errors.zwelch2009-06-171-8/+12
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2256 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add improved support for parsing signed integers.zwelch2009-06-172-0/+12
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2255 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Update parse_type macro definitions to allow re-use with signed types.zwelch2009-06-171-3/+6
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2254 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Improve definitions of parse_ulong and parse_ullong:zwelch2009-06-171-14/+11
| | | | | | | | - Use macro to eliminate duplicate body definitions. - Rename okay as is_okay; add parenthesis to help "clarify" logic. git-svn-id: svn://svn.berlios.de/openocd/trunk@2253 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-161-1/+1
| | | | | | | | | | Fix a bug preventing ICEpick "enable that TAP" code from working: the "runtest" command wrongly finished with a JTAG reset, discarding the work the TAP enable handler just finished! Instead, JTAG should stay in RUN/IDLE state. git-svn-id: svn://svn.berlios.de/openocd/trunk@2252 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-164-10/+31
| | | | | | | | | | | | | | | | | | | | | | | 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-12/+33
| | | | | | | | | | | | | | | | | | | | Tighten error handling on TAP enable/disable paths a bit: - Don't enable/disable unless it's necessary. Those event handlers could have nasty side effects... - Don't *succeed* enables/disables if there was no code which could have implemented that action. This prevents bugs like wrongly acting as if the scan chain changed. - Minor whitespace cleanup in enable/disable command code. The big problem is still the lack of code to verify scan chains were actually updated as requested; this adds a comment on that. I suspect the best we can do near term will be to verify IDCODE. git-svn-id: svn://svn.berlios.de/openocd/trunk@2250 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-161-1/+1
| | | | | | | | Fix bug in a warning. It warned about "huge IRlength" for an older JRC with a two bit instruction register ... wrong! git-svn-id: svn://svn.berlios.de/openocd/trunk@2249 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
* David Brownell <david-b@pacbell.net>:zwelch2009-06-163-7/+11
| | | | | | | | | | | | Doc update: say "jtag newtap ... -disable" records the state after exiting the RESET state, matching the only implementation we're working with so far (TI ICEpick-C). Matching code updates. Now we can be sure that the "enabled" flag value is correct after JTAG resets. git-svn-id: svn://svn.berlios.de/openocd/trunk@2246 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-162-6/+14
| | | | | | | | | | | | | | | | | Fix a memory leak in jtag_tap_free(): unregister the event callback too. Also fix the associated conceptual bug in unregistering JTAG event callbacks: since the same callback procedure is used many times with different callback data (a TAP handle), that data must be considered when unregistering any callback. This could fix some crashes after TAP registration errors, by making sure the reset event handler doesn't scribble over memory that's now used by something else. git-svn-id: svn://svn.berlios.de/openocd/trunk@2245 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-163-16/+17
| | | | | | | | | | | | Minor jtag cleanup: - remove hidden assumption about JTAG event numbering - move function declarations to a header - some end'o'line whitespace - use "calloc" not "malloc + memset" git-svn-id: svn://svn.berlios.de/openocd/trunk@2244 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* fix eCos build problems w/latest parse_ulong() stuffoharboe2009-06-151-3/+8
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2241 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-133-9/+9
| | | | | | | | | | | OpenOCD doesn't actually *need* to be keeping all TCP ports active ... creating security issues in some network configs. Instead, let config file specify e.g. "tcl_port 0" (or gdb_port, telnet_port) to disable that particular remote access method. git-svn-id: svn://svn.berlios.de/openocd/trunk@2240 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
* David Brownell <david-b@pacbell.net>:zwelch2009-06-123-2/+26
| | | | | | | | | | | | | Currently the "debug_level 3" command tracing ignores commands that could return values to TCL scripts (by plugging in to a slightly lower level of the interpreter stack). Fix that by abstracting the tracing command and starting to make some of those previously-untraced commands use this new mechanism. git-svn-id: svn://svn.berlios.de/openocd/trunk@2224 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net>:zwelch2009-06-122-6/+22
| | | | | | | | | | | | | | | | | | | | | | | Partial fix to the "long IR length" problems. - Current code could handle up to 32 bit IR lengths with full functionality, if it didn't just reject may of them out of hand. So only reject clear errors, where the IR mask (or capture instruction) needs more than IrLen bits. - Longer IR lengths can only be handled in BYPASS mode for now. Example: TI's DSPs use 38-bit IR lengths. So we can't issue their IDCODE instructions... A more complete fix would be able to issue longer instructions; or minimally, would fail cleanly for the non-BYPASS case. Note that this *could* make some currently broken scripts fail, since the previous code accepted garbage values so long as they didn't use more than 16 bits. git-svn-id: svn://svn.berlios.de/openocd/trunk@2222 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* unsik Kim <donari75@gmail.com>:zwelch2009-06-122-191/+240
| | | | | | | Improve error handling in mflash driver. git-svn-id: svn://svn.berlios.de/openocd/trunk@2221 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