zwelch [Thu, 18 Jun 2009 00:29:39 +0000 (00:29 +0000)]
David Brownell <david-b@pacbell.net>:
Various bits of cleanup, mostly to match the style hints
I just got around to writing up.
- Various @cindex improvements
- Cross reference the command line options in a few spots,
notably for @command{debug_level}
- Clean the config file guidelines a bit:
* They're for all users, not just integrators
* Reference the interface config chapter
* Don't emphasize command line usage here
* Tweak board and target config introductory text
Plus two minor bits of cleanup: remove most date references,
and refer to the reader as "you" not "the user".
oharboe [Wed, 17 Jun 2009 20:49:55 +0000 (20:49 +0000)]
Freddie Chopin <freddie_chopin@op.pl> makes lpc2478.cfg file more "standard" and - what is most important - correct (it's working [; ). I've also added some comments which try to clarify the meaning of all that's in there.
zwelch [Wed, 17 Jun 2009 06:44:29 +0000 (06:44 +0000)]
David Brownell <david-b@pacbell.net>:
Update the Beagle setup:
- OMAP3530 updates:
* split ICEpick TAP enable support to its own file, for
reuse and eventually for storing other utility code
like emulation reset
* clean up, including labeling the tap as for DAP not
for the Cortex-A8 and making endianness non-variable
* add a few FIXMEs
- BeagleBoard cleanup: there's no SRST, "endstate" is gone, etc
I'm not sure I'd say it's further than "barely limping" just yet.
Key issues remain lack of Cortex-A8 support, and more complete
support for resetting.
zwelch [Wed, 17 Jun 2009 06:40:58 +0000 (06:40 +0000)]
David Brownell <david-b@pacbell.net>:
DM6446 config updates:
- List two more TAPs, as disabled, mostly for doc purposes
- Included basic ICEpick support, still disabled by default
- Shorten line lengths
- Use $_TARGETNAME to configure the ETM and ETB
- This ARM core don't support endianness overriding
For now, boards that can't jumper EMU0/EMU1 will need to tweak
a variable's setting.
zwelch [Wed, 17 Jun 2009 00:29:56 +0000 (00:29 +0000)]
Improve definitions of parse_ulong and parse_ullong:
- Use macro to eliminate duplicate body definitions.
- Rename okay as is_okay; add parenthesis to help "clarify" logic.
zwelch [Tue, 16 Jun 2009 12:17:26 +0000 (12:17 +0000)]
David Brownell <david-b@pacbell.net>:
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.
zwelch [Tue, 16 Jun 2009 12:17:18 +0000 (12:17 +0000)]
David Brownell <david-b@pacbell.net>:
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...
zwelch [Tue, 16 Jun 2009 12:17:12 +0000 (12:17 +0000)]
David Brownell <david-b@pacbell.net>:
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.
zwelch [Tue, 16 Jun 2009 00:23:22 +0000 (00:23 +0000)]
David Brownell <david-b@pacbell.net>:
Distributing FTDI's "ftd2xx" library with OpenOCD violates the
OpenOCD license (GNU GPLv2 with no exceptions).
Make that clear where that build option is presented, and don't
describe the FTDI libraries as an option for any packager. (It's
fine for personal use, of course.)
Plus some related clarifications: libftdi version 0.16 for the
new FT2232H chips (for RTCK and high speed USB); the Amontec
drivers are just ftd2xx variants.
zwelch [Tue, 16 Jun 2009 00:23:13 +0000 (00:23 +0000)]
David Brownell <david-b@pacbell.net>:
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...
zwelch [Tue, 16 Jun 2009 00:23:00 +0000 (00:23 +0000)]
David Brownell <david-b@pacbell.net>:
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.
zwelch [Tue, 16 Jun 2009 00:22:52 +0000 (00:22 +0000)]
David Brownell <david-b@pacbell.net>:
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.
zwelch [Tue, 16 Jun 2009 00:22:40 +0000 (00:22 +0000)]
David Brownell <david-b@pacbell.net>:
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"
zwelch [Mon, 15 Jun 2009 23:54:09 +0000 (23:54 +0000)]
David Brownell <david-b@pacbell.net>:
Add another board ... OMAP2420 "H4" board. This won't be very widely
used with OpenOCD, but with mainline support in both U-Boot and Linux
it at least makes for a more complete set (and another testcase).
This is incomplete support in several respects. The ARM11 support is
not very deep yet; most registers aren't available, and the ETM can't
be hooked up. Plus, there's no script for OMAP-specific stuff like
setting up the SDRAM controller. Eventually the same NAND controller
driver should work with OMAP2 and OMAP3.
zwelch [Sat, 13 Jun 2009 00:34:31 +0000 (00:34 +0000)]
Factor load_image argument parsing to parse_load_image_command_args:
- Make fast_load_image use the helper coverage the standard load_image.
- Improve whitespace in the moved lines.
zwelch [Sat, 13 Jun 2009 00:34:10 +0000 (00:34 +0000)]
Cleanup and improve handle_wp_command and handle_rwp_command:
- 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.