summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* add const keyword to some APIsZachary T Welch2009-11-1115-20/+22
| | | | | | Add 'const' keyword to 'char *' parameters to allow command handlers to pass constant string arguments. These changes allow the 'args' command handler to be changed to 'const' in a subsequent patch.
* change argv to args in command handlersZachary T Welch2009-11-113-28/+28
| | | | | | | | | | | Subsequent patches expect all command handlers to use a uniform parameter naming scheme. In the entire tree, these two files used standard 'argv' instead of our non-standard 'args'. This patch opts to reduces the noise required to unify the command handlers, using dominant 'args' form. A future patch may be used to convert us back to the standard argv, but that requires coordination with all developers to minimize disruptions.
* script_debug(): improve typesZachary T Welch2009-11-112-5/+6
| | | | Use unsigned type for number of arguments.
* command.c: make private routines staticZachary T Welch2009-11-111-2/+4
| | | | This patch also improves the signature of run_command function.
* log: improve log_callback_fn signatureZachary T Welch2009-11-114-6/+6
| | | | Use unsigned type for line number in log_callback_fn signature.
* time_support: improve use of typesZachary T Welch2009-11-112-26/+15
| | | | | Update timeval_add_time to use long int; implement timeval_add with it. Update timeval_ms to check gettimeofday return value, return int64_t.
* makefiles: improve build orderZachary T Welch2009-11-112-85/+123
| | | | | | | | | | | Separates various groups of files to be built in logical succession. In each layer, the core module (target.c, nand.c, etc.) is built _after_ their helper modules (e.g. image.c, nand_ecc.c) but _before_ any of their drivers (e.g. arm966e.c, mx3_nand.c). This allows problems introduced at the bottom of the stack to result in build failures as soon as possible, as the helpers and core should wrap portions of them.
* ETM cleanupDavid Brownell2009-11-114-131/+120
| | | | | | | | | | | | | | | | 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>
* fix bug in ARM720: bugfixZachary T Welch2009-11-101-1/+1
|
* ARM720: bugfixDavid Brownell2009-11-101-1/+2
| | | | | | | 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>
* target: MMU-aware init for memory read/writeDavid Brownell2009-11-102-28/+51
| | | | | | | | | | | | | | | | | | 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>
* target.cfg: (re)move some bogus reset_config linesDavid Brownell2009-11-105-13/+3
| | | | | | | 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>
* stm32.cfg: remove reset_configThomas Kindler2009-11-101-3/+0
| | | | | | | | | | | | | | | 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>
* arm11: add etmr/etmw registers to access ETM via DBGTAP scan chainMichael Bruck2009-11-103-0/+142
| | | | | | | | 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>
* ARM11: remove old mrc/mcr commandsØyvind Harboe2009-11-105-129/+9
| | | | | | Switch to new commands in config scripts Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* telo.cfg: fix search pathsØyvind Harboe2009-11-102-8/+8
| | | | | | | Add the missing "target/" prefix for scripts in the target folder. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Target: minor cleanupDavid Brownell2009-11-102-13/+21
| | | | | | | | - 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>
* ARM920: implement basic MMU opsDavid Brownell2009-11-101-0/+22
| | | | | | mmu() works; virt2phys() fails and logs an error. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM720: implement basic MMU opsDavid Brownell2009-11-101-0/+22
| | | | | | mmu() works; virt2phys() fails and logs an error. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Target: fix bad error messagesDavid Brownell2009-11-101-7/+10
| | | | | | And shrink a few too-long lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* httpd: fix warnings, more robust error handling, improved MIME handlingØyvind Harboe2009-11-101-6/+9
| | | | | | | | 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>
* tcl: HostOs now picks up eCos as well during compile timeØyvind Harboe2009-11-101-0/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* svf,xsvf,arm7_9_common: trim forard declarationsZachary T Welch2009-11-093-53/+55
| | | | Remove forward declarations by reordering command registration.
* command.c: make commands staticZachary T Welch2009-11-091-50/+48
| | | | | Removes useless declarations, moving the handler functions to appear before their use in the (much bigger) command registriation function.
* server: remove useless declarationsZachary T Welch2009-11-094-52/+64
| | | | Remove server command declarations, make handler routines static.
* jtag: remove useless declarationsZachary T Welch2009-11-096-295/+248
| | | | | | 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.
* target.c: remove useless declarationsZachary T Welch2009-11-091-103/+127
| | | | | This patch removes the last batch of forward references from the tree, moving the target command registration routines to the end of the file.
* {pic32m,stm32}x.c: remove useless declarationsZachary T Welch2009-11-092-98/+73
| | | | | | | | 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>
* str{7,9}x*.c: remove useless forward declarationsZachary T Welch2009-11-093-141/+108
| | | | | | | | 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>
* flash/<various>.c: remove useless declarationsZachary T Welch2009-11-093-75/+42
| | | | | | | Remove useless forward declarations. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
* flash/<assorted>.c: remove useless declarationsZachary T Welch2009-11-095-170/+103
| | | | | | | | 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>
* flash/at91sam[37].c: remove useless declarationsZachary T Welch2009-11-092-53/+44
| | | | | | | | | | 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>
* flash/lpc2???.c: remove useless declarationsZachary T Welch2009-11-093-72/+43
| | | | | | | | 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>
* flash/*nand*.c: remove useless declarationsZachary T Welch2009-11-096-167/+132
| | | | | | | | 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>
* flash/flash.c: remove forward declarationsZachary T Welch2009-11-091-57/+62
| | | | | | | | 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>
* Revert "target: add target->type->has_mmu fn"David Brownell2009-11-093-48/+5
| | | | | | | | | | | | | | | | 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>
* finish removing deprecated/obsolete commandsDavid Brownell2009-11-0913-211/+10
| | | | | | | | | | | | | | | | | | | | 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>
* User's Guide: Flash/NAND doc tweaksDavid Brownell2009-11-091-3/+12
| | | | | | | | 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>
* src/target: remove 'extern' and wrap headersZachary T Welch2009-11-0926-190/+296
| | | | Remove extern keywords from function prototypes and wrap long lines.
* target.h: remove extern keyword and wrapZachary T Welch2009-11-091-53/+72
| | | | Removes 'extern' keyword from function prototypes and wraps long lines.
* src/{server,pld,svf,xsvf}: remove 'extern' keywordZachary T Welch2009-11-097-18/+26
| | | | Removes 'extern' keyword from function declarations in header filess.
* src/flash: remove 'extern' and wrap headersZachary T Welch2009-11-097-45/+69
| | | | | | | 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.
* src/jtag: remove 'extern' and wrap headers.Zachary T Welch2009-11-094-63/+72
| | | | | | | Removes the 'extern' keyword from function declarations. Wraps long prototypes to fit into 80 columns. Fixes documentation for jtag_tap_s::{,has}idcode fields.
* src/helper: wrap and clean headers.Zachary T Welch2009-11-096-63/+95
| | | | | Remove all useless 'extern' keywords from function prototypes. Wraps long lines for readability.
* User's Guide: bugfix global state infoDavid Brownell2009-11-092-11/+14
| | | | | | | | | 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>
* EmbeddedICE: minor cleanupsDavid Brownell2009-11-091-52/+101
| | | | | | | 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>
* Overhaul time support APIZachary T Welch2009-11-096-215/+153
| | | | | | | | | | | | | | | | | | | 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.
* Add private header for ARM11 internals.Zachary T Welch2009-11-084-50/+74
| | | | | | | Reduces confusion about location of associated routines and reduces clutter in the arm11 header. Removes extra whitespace around the lines touched by these changes.
* ARM11: remove exports and forward declsZachary T Welch2009-11-082-164/+138
| | | | | Unneeded exports cause confusion about the module interfaces. Make almost everything static in the arm11.c module.
* ARM: minor simulator cleanupDavid Brownell2009-11-081-25/+49
| | | | | | | | 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>