summaryrefslogtreecommitdiff
path: root/src/target/etb.c
Commit message (Collapse)AuthorAgeFilesLines
* jtag: jtag_add_ir_scan() now takes a single fieldØyvind Harboe2010-03-081-1/+1
| | | | | | | | In the code a single field was all that was ever used. Makes jtag_add_ir_scan() simpler and leaves more complicated stuff to jtag_add_plain_ir_scan(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: retire tap fieldØyvind Harboe2010-03-081-17/+6
| | | | | | | | | | | | | | | | | jtag_add_dr/ir_scan() now takes the tap as the first argument, rather than for each of the fields passed in. The code never exercised the path where there was more than one tap being scanned, who knows if it even worked. This simplifies the implementation and reduces clutter in the calling code. use jtag_add_ir/dr_plain_scan() for more fancy situations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* ARM ETM/ETB/trace: help/usage updatesDavid Brownell2010-01-071-4/+8
| | | | | | | | | | | | | Provide helptext which was sometimes missing; update some of it to be more accurate. Usage syntax messages have the same EBNF as the User's Guide; no angle brackets in either place. Don't use "&function"; functions are like arrays, their address is their name. Shrink some overlong lines, remove some empties. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ETM: start cleaning up ETM_CTRL bit handlingDavid Brownell2009-12-191-7/+7
| | | | | | | | | | | | | | | | | | | | | Provide better comments for the ETM_CTRL bits; use the correct bit for half/full clock mode; and define a few more of the bits available from the earliest ETM versions. The new bit defintions use ETM_CTRL_* names to match their register (instead of ETM_PORT_* or ETMV1_*). For clarity, and better matching to docs, they are defined with bitshifting not pre-computed masks. Stop abusing typdefs for ETM_CTRL values; such values are not limited to the enumerated set of individual bit values. Rename etm->portmode to etm->control ... and start morphing it into a single generic shadow of ETM_CTRL. Eventually etm->tracemode should vanish, so we can just write etm->control to ETM_CTRL. Restore an "if" that somehow got dropped. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ETM trigger_percent becomes an ETB commandDavid Brownell2009-12-191-2/+55
| | | | | | | | This command was misplaced; it's not generic to all traceport drivers, only the ETB supports this kind of configuration. So move it, and update the relevant documentation. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: use <target/arm.h> not armv4_5.hDavid Brownell2009-12-071-1/+1
| | | | | | | | | | | | | | Move most declarations in <target/armv4_5.h> to <target/arm.h> and update users. What's left in the older file is stuff that I think should be removed ... the old register cache access stuff, which makes it awkward to support microcontroller profile (Cortex-M) cores. The armv4_5_run_algorithm() declaration was moved too, even though it's not yet as generic as it probably ought to be. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* remove register_commands from etm_capture_driverZachary T Welch2009-11-241-6/+1
| | | | | | Converts callback to an array of command_registration records. Moves oocd_trace driver definition to end of file to eliminate useless forward declaration.
* etb: use register_commands()Zachary T Welch2009-11-241-8/+20
|
* use COMMAND_REGISTER macroZachary T Welch2009-11-241-2/+2
| | | | | Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.
* command_handler: change 'cmd_ctx' to CMD_CTXZachary T Welch2009-11-171-2/+2
| | | | Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
* command_handler: change 'args' to CMD_ARGVZachary T Welch2009-11-171-5/+5
| | | | | This patch converts all instances of 'args' in COMMAND_HANDLER routines to use CMD_ARGV macro.
* command_handler: change to 'argc' to CMD_ARGCZachary T Welch2009-11-171-1/+1
| | | | | This patch converts all instances of 'argc' in COMMAND_HANDLER routines to use CMD_ARGC.
* target: simplify register get/set opsDavid Brownell2009-11-171-7/+6
| | | | | | | | | | | No need to indirect from registered integers to pointers. Just stash the pointers directly in the register struct, and don't even bother registering. This is a small code shrink, speeds register access just a smidgeon, and gets rid of another rude exit() path. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* target: less implicit inclusion of "etm.h"David Brownell2009-11-161-0/+1
| | | | | | | Don't include it in more headers than necessary; just use it in the few files that actually need it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* rename CEIL as DIV_ROUND_UPZachary T Welch2009-11-161-2/+2
| | | | | Improves the name of this macro, moves it to types.h, and adds a block of Doxygen comments to describe what it does.
* target: no implicit #includes of "register.h"David Brownell2009-11-161-0/+1
| | | | | | | | | | | | Same deal: "register.h" got needlessly included all over the place because of being in a few widely included headers. So take it out of the header files which included it, and put it in files which use it ... reduce needless interdependencies. Also, don't need that extra "types.h" inclusion. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* target: remove unused "bitfield" infrastructureDavid Brownell2009-11-131-2/+0
| | | | | | | | | | | | | | We have too many different registers, and too many version and context dependent interpretations, for this type of bitfield management to be scalable. (Anyone who really wants bitfield interpretation *can* do that in Tcl code...) There are ... quite a few copies of the same ARM dummy registers. There should eventually be one copy; this many is craziness. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* command_t -> struct commandZachary T Welch2009-11-131-1/+1
| | | | Remove misleading typedef and redundant suffix from struct command.
* command_context_t -> struct command_contextZachary T Welch2009-11-131-1/+1
| | | | Remove misleading typedef and redundant suffix from struct command_context.
* target_t -> struct targetZachary T Welch2009-11-131-1/+1
| | | | Remove misleading typedef and redundant suffix from struct target.
* reg_t -> struct regZachary T Welch2009-11-131-15/+15
| | | | Remove misleading typedef and redundant suffix from struct reg.
* etm_context_t -> struct etm_contextZachary T Welch2009-11-131-5/+5
| | | | Remove misleading typedef and redundant suffix from struct etm_context.
* etb_t -> struct etbZachary T Welch2009-11-131-10/+10
| | | | Remove misleading typedef and redundant suffix from struct etb.
* reg_cache_t -> struct reg_cacheZachary T Welch2009-11-131-2/+2
| | | | Remove misleading typedef and redundant suffix from struct reg_cache.
* etmv1_trace_data_t -> struct etmv1_trace_dataZachary T Welch2009-11-131-1/+1
| | | | Remove misleading typedef and redundant suffix from struct etmv1_trace_data.
* etm_capture_driver_t -> struct etm_capture_driverZachary T Welch2009-11-131-1/+1
| | | | Remove misleading typedef and redundant suffix from struct etm_capture_driver.
* etb_reg_t -> struct etb_regZachary T Welch2009-11-131-4/+4
| | | | Remove misleading typedef and redundant suffix from struct etb_reg.
* scan_field_t -> struct scan_fieldZachary T Welch2009-11-131-5/+5
| | | | Remove useless structure typedef.
* jtag_tap_t -> struct jtag_tapZachary T Welch2009-11-131-2/+2
| | | | | Search and destroy the jtag_tap_t typedef. This also cleans up a layering violation, removing the declaration from types.h.
* use COMMAND_HANDLER macro to define all commandsZachary T Welch2009-11-131-1/+1
|
* ETM: remove old mid-level ETM handleDavid Brownell2009-11-111-1/+1
| | | | | | | | | | | | | | | | | | Now that nothing uses the old ETM handle any more, remove it. Add minimal header tweaks, letting non-ARM7 and non-ARM9 cores access ETM facilities. Now ARM11 could support standard ETM (and ETB) access as soon as it derives from "struct arm" ... its scanchain 6 is used access the ETM, just like ARM7 and ARM9. The Cortex parts (both M3 and A8) will need modified access methods (via ETM init parameters), so they use the DAP. Our first A8 target (OMAP3) needs that for both ETM and ETB, but the M3 ETM isn't very useful without SWO trace support (it's painfully stripped down), so that support won't be worth adding for a while. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ETM: update port driversDavid Brownell2009-11-111-6/+6
| | | | | | | | | | Make both useful ETM port drivers (etb, etm_dummy) use the new toplevel ETM handle, instead of the to-be-removed lower level one. Do the same for the "oocd-trace" prototype too; and fix its error reporting paths: return failure codes, don't exit(), etc Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* remove more useless declarationsZachary T Welch2009-11-111-13/+12
| | | | | Removes forward declarations by moving command registration after defintion of the command handlers.
* Minor ETB and ETM bugfixes and doc updatesdbrownell2009-10-021-47/+46
| | | | | | | | | | | | | | | | | | | | | - ETB * report _actual_ hardware status, not just expected status * add a missing diagnostic on a potential ETB setup error * prefix any diagnostics with "ETB" - ETM * make "etm status" show ETM hardware status too, instead of just traceport status (which previously was fake, sigh) - Docs * flesh out "etm tracemode" docs a bit * clarify "etm status" ... previously it was traceport status * explain "etm trigger_percent" as a *traceport* option ETM+ETB tracing still isn't behaving, but now I can see that part of the reason is that the ETB turns itself off almost immediately after being enabled, and before collecting any data. git-svn-id: svn://svn.berlios.de/openocd/trunk@2790 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* ETB: cleanup needless symbol exports and forward decls.dbrownell2009-09-291-34/+35
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2772 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs before ')'.zwelch2009-06-231-2/+2
| | | | | | | - Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs after '('.zwelch2009-06-231-1/+1
| | | | | | | - Replace '([ \t]*' with '('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '+' whitespacezwelch2009-06-231-26/+26
| | | | | | | | | | - Replace ')\(+\)(' with ') \1 ('. - Replace ')\(+\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(+\)(' with '\1 \2 ('. - Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '=' whitespacezwelch2009-06-231-2/+2
| | | | | | | | | - Replace ')\(=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(=\)(' with '\1 \2 ('. - Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '==' whitespacezwelch2009-06-231-1/+1
| | | | | | | | - Replace ')\(==\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* C99 printf() -Werror fixesduane2009-06-211-3/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2315 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* fix jtag_add_callback() args. The first argument is nothing special, it's ↵oharboe2009-06-191-2/+3
| | | | | | just another generic argument. git-svn-id: svn://svn.berlios.de/openocd/trunk@2290 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u32' to 'uint32_t' in src/targetzwelch2009-06-181-10/+10
| | | | | | | | - 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 'u8' to 'uint8_t' in src/targetzwelch2009-06-181-7/+7
| | | | | | | | - 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
* Eliminate MixedCaps symbol from public JTAG TAP API:zwelch2009-06-051-1/+1
| | | | | | | | - 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
* Rename jtag_add_end_state to jtag_set_end_state since "add" implies thatoharboe2009-06-041-3/+3
| | | | | | this fn has something to do with the queue, which it does not as such. git-svn-id: svn://svn.berlios.de/openocd/trunk@2050 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Introduce jtag_get_end_state() fn to clarify code a bit.oharboe2009-06-041-6/+6
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2049 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* remove TAP_INVALID as argument to jtag_add_xxx() fn'soharboe2009-06-041-6/+6
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2042 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Consolidate target selection code into single get_target() that handles both ↵kc8apf2009-05-181-2/+2
| | | | | | names and numbers. Provided by David Brownell <david-b@pacbell.net> git-svn-id: svn://svn.berlios.de/openocd/trunk@1804 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* switch to jtag_add_dr_scan_check() - USB performance fixoharboe2009-05-111-4/+10
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1738 b42882b7-edfa-0310-969c-e2dbd0fdcd60