aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-11-11ETM cleanupDavid Brownell
Various cleanups of ETM related code. - Saner error return paths - Simplify arm7_9 init ... no need for extra zeroing! - Shrink some lines - Tweak some diagnostics - Use shorter name for ETM struct type. - Don't exit() and similar. The diagnostics look forward to having this ETM code work with more than just ARM7/ARM9. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10fix bug in ARM720: bugfixZachary T Welch
2009-11-10ARM720: bugfixDavid Brownell
The "ARM720 uses the new inheritance/nesting scheme" patch wrongly scrubbed a calloc() from arm720t_target_create(). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10target: MMU-aware init for memory read/writeDavid Brownell
Start switching MMU handling over to a more sensible scheme. Having an mmu() method enables MMU-aware behaviors. Not having one kicks in simpler ones, with no distinction between virtual and physical addresses. Currently only a handful of targets have methods to read/write physical memory: just arm720, arm920, and arm926. They should all initialize OK now, but the arm*20 parts don't do the "extra" stuff arm926 does (which should arguably be target-generic). Also simplify how target_init() loops over all targets by making it be a normal "for" loop, instead of scattering its three parts to the four winds. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10target.cfg: (re)move some bogus reset_config linesDavid Brownell
General rule, this is all board-specific and doesn't belong in target config files. Some of these were just cosmetic. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10stm32.cfg: remove reset_configThomas Kindler
Here's a patch for the double-reset problem on STM32. I've tested downloading and debugging with GDB and Eclipse, and everything seems to work fine. This effectively sets reset_config to none. trst_only would also be ok, but that's better left to a board configuration file since not all boards wire it up. The NVIC is used to trigger reset, which at least on this chip also pulses nSRST so the whole system does get rest -- exactly once. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10arm11: add etmr/etmw registers to access ETM via DBGTAP scan chainMichael Bruck
First cut of these commands. Øyvind tinkered a bit with the number parsing to bring it up to speed + rebased it. Ready for testing. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10ARM11: remove old mrc/mcr commandsØyvind Harboe
Switch to new commands in config scripts Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10telo.cfg: fix search pathsØyvind Harboe
Add the missing "target/" prefix for scripts in the target folder. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10Target: minor cleanupDavid Brownell
- improve some names -- a "default" prefix is not descriptive - add doxygen @todo entries for some issues - avr8 isn't ever going to need those MMU hooks Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10ARM920: implement basic MMU opsDavid Brownell
mmu() works; virt2phys() fails and logs an error. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10ARM720: implement basic MMU opsDavid Brownell
mmu() works; virt2phys() fails and logs an error. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10Target: fix bad error messagesDavid Brownell
And shrink a few too-long lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10httpd: fix warnings, more robust error handling, improved MIME handlingØyvind Harboe
The httpd is work in progress... No mime type set by default. Let the browser guess. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10tcl: HostOs now picks up eCos as well during compile timeØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-09svf,xsvf,arm7_9_common: trim forard declarationsZachary T Welch
Remove forward declarations by reordering command registration.
2009-11-09command.c: make commands staticZachary T Welch
Removes useless declarations, moving the handler functions to appear before their use in the (much bigger) command registriation function.
2009-11-09server: remove useless declarationsZachary T Welch
Remove server command declarations, make handler routines static.
2009-11-09jtag: remove useless declarationsZachary T Welch
Contrary to my previous assessment, some opportunities to remove forward declarations were overlooked. Remove them by moving the definitions of the command registration and interface structure to the end of files.
2009-11-09target.c: remove useless declarationsZachary T Welch
This patch removes the last batch of forward references from the tree, moving the target command registration routines to the end of the file.
2009-11-09{pic32m,stm32}x.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09str{7,9}x*.c: remove useless forward declarationsZachary T Welch
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/<various>.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/<assorted>.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/at91sam[37].c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registration to end of file. Moves flash structure definitions to end of files. Changes a few references to global flash structure to local refs. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/lpc2???.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/*nand*.c: remove useless declarationsZachary T Welch
Remove useless forward declarations. Moves command registration to end of files. Moves flash structure definition to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09flash/flash.c: remove forward declarationsZachary T Welch
Remove useless forward declarations. Moves command registration to end of file. Moves flash structure definition to end of file. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09Revert "target: add target->type->has_mmu fn"David Brownell
This patch introduced a bug preventing flash writes from working on Cortex-M3 targets like the STM32. Moreover, it's the wrong approach for handling no-MMU targets. The right way to handle no-MMU targets is to provide accessors for physical addresses, and use them everywhere; and any code which tries to work with virtual-to-physical mappings should use a identity mapping (which can be defaulted). And ... we can tell if a target has an MMU by seeing if it's got an mmu() method. No such methood means no MMU. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09finish removing deprecated/obsolete commandsDavid Brownell
It's been about a year since these were deprecated and, in most cases, removed. There's no point in carrying that documentation, or backwards compatibility for "jtag_device" and "jtag_speed", around forever. (Or a few remnants of obsolete code...) Removed a few obsolete uses of "jtag_speed": - The Calao stuff hasn't worked since July 2008. (Those Atmel targets need to work with a 32KHz core clock after reset until board-specific init-reset code sets up the PLL and enables a faster JTAg clock.) - Parport speed controls don't actually work (tops out at about 1 MHz on typical HW). - In general, speed controls need to live in board.cfg files (or sometimes target.cfg files), not interface.cfg ... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09User's Guide: Flash/NAND doc tweaksDavid Brownell
Rename the "Drivers, Options, and Commands" sections to be just "Driver List" matching the earlier reference. Add an example of parallel CFI flash. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09src/target: remove 'extern' and wrap headersZachary T Welch
Remove extern keywords from function prototypes and wrap long lines.
2009-11-09target.h: remove extern keyword and wrapZachary T Welch
Removes 'extern' keyword from function prototypes and wraps long lines.
2009-11-09src/{server,pld,svf,xsvf}: remove 'extern' keywordZachary T Welch
Removes 'extern' keyword from function declarations in header filess.
2009-11-09src/flash: remove 'extern' and wrap headersZachary T Welch
Removes 'extern' keywords from function prototypes in the flash headers. Wraps long lines to fit into 80 columns. Adds multiple inclusion protection for s3c2xx_nand.h.
2009-11-09src/jtag: remove 'extern' and wrap headers.Zachary T Welch
Removes the 'extern' keyword from function declarations. Wraps long prototypes to fit into 80 columns. Fixes documentation for jtag_tap_s::{,has}idcode fields.
2009-11-09src/helper: wrap and clean headers.Zachary T Welch
Remove all useless 'extern' keywords from function prototypes. Wraps long lines for readability.
2009-11-09User's Guide: bugfix global state infoDavid Brownell
The "$ocd_HOSTOS" variable was wrongly documented. Fix its documentation, and its value on Linux. Shrink a few of the too-long lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09EmbeddedICE: minor cleanupsDavid Brownell
Add comments (Doxygen and normal), remove unused code, shrink some overlong lines. Get rid of a forward decl. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09Overhaul time support APIZachary T Welch
This patch changes the duration_* API in several ways. First, it updates the API to use better names. Second, string formatting has been removed from the API (with its associated malloc). Finally, a new function added to convert the time into seconds, which can be used (or formatted) by the caller. This eliminates hidden calls to malloc that require associated calls to free(). This patch also removes the useless extern keyword from prototypes, and it eliminates the duration_t typedef (use 'struct duration'). These API also allows proper error checking, as it is possible for gettimeofday to fail in certain circumstances. The consumers have all been chased to use this new API as well, as there were relatively few cases doing this type of measurement. In most cases, the code performs additional checks for errors, but the calling code looks much cleaner in every case.
2009-11-08Add private header for ARM11 internals.Zachary T Welch
Reduces confusion about location of associated routines and reduces clutter in the arm11 header. Removes extra whitespace around the lines touched by these changes.
2009-11-08ARM11: remove exports and forward declsZachary T Welch
Unneeded exports cause confusion about the module interfaces. Make almost everything static in the arm11.c module.
2009-11-08ARM: minor simulator cleanupDavid Brownell
Make several functions be static. Shrink some of the overlong lines. Use pure tab indents in some places that mixed in spaces. This gives a minor object code shrink (about 2% on amd64). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-08Cortex-M3: fix (debug) message priorityDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-08target.cfg: remove "-work-area-virt 0"David Brownell
The semantics of "-work-area-virt 0" (or phys) changed with the patch to require specifying physical or virtrual work area addresses. Specifying zero was previously a NOP. Now it means that address zero is valid. This patch addresses three related issues: - MMU-less processors should never specify work-area-virt; remove those specifications. Such processors include ARM7TDMI, Cortex-M3, and ARM966. - MMU-equipped processors *can* specify work-area-virt... but zero won't be appropriate, except in mischievous contexts (which hide null pointer exceptions). Remove those specs from those processors too. If any of those mappings is valid, someone will need to submit a patch adding it ... along with a comment saying what OS provides the mapping, and in which context. Example, say "works with Linux 2.6.30+, in kernel mode". (Note that ARM Linux doesn't map kernel memory to zero ...) - Clarify docs on that "-virt" and other work area stuff. Seems to me work-area-virt is quite problematic; not every operating system provides such static mappings; if they do, they're not in every MMU context... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-07Fix vsllink bulk out endpoint parsing.Zachary T Welch
2009-11-06Merge branch 'master' of ↵David Brownell
ssh://dbrownell@openocd.git.sourceforge.net/gitroot/openocd/openocd
2009-11-06target: don't swap MMU/no-MMU work areasDavid Brownell
Resolve serious bug inserted by the "target: require working area for physical/virtual addresses to be specified" patch. It forced use of (invalid) virtual addresses when the MMU was disabled, and vice versa. Observed to break at least Cortex-M3, ARM926, ARM7TDMI whenever work areas are used, such as during bulk writes to flash, DDR2, SRAM, and so on. Also, fix overlong lines and whitespace goofs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-06Simplify nand indentation.Zachary T Welch
Removes check covered by new nand_command_get_device_by_num helper. Reverses logic of probe check to further reduce indentation.
2009-11-06Improve flash indentation.Zachary T Welch
Removes redundant tests and reverses backwards logic to reduce the indentation level in flash.c.