- 17 Nov, 2009 1 commit
-
-
David Brownell authored
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>
-
- 16 Nov, 2009 4 commits
-
-
Zachary T Welch authored
Use size_t instead of uint32_t when specifying file sizes. Update all consumers up through the layers to use size_t when required. These changes should be safe, but the higher-levels will need to be updated further to receive the intended benefits (i.e. large file support). Add error checking for fileio_read and file_write. Previously, all errors were being silently ignored, so this change might cause some problems for some people in some cases. However, it gives us the chance to handle any errors that do occur at higher-levels, rather than burying our heads in the sand.
-
Zachary T Welch authored
Add const keyword to file url and cast to free(). Make size an ssize_t and chase all format strings that use it.
-
Zachary T Welch authored
Improves the name of this macro, moves it to types.h, and adds a block of Doxygen comments to describe what it does.
-
David Brownell authored
Most files in the tree seem to have ended up including this, and *quite* needlessly ... only code implementing or using breakpoints actually needs these declarations. So take it out of the header files which included it, and put it in files which use it ... reduce needless interdependencies. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
- 15 Nov, 2009 2 commits
-
-
David Brownell authored
Previously this flag was stored in "target_type", so that for example if there were two ARM7TDMI targets in a scan chain, both would claim to have been examined although only the first one actually had its examine() method called. Move this state to where it should have been in the first place, and hide a method that didn't need exposure ... the flag is write-once. Provide some doxygen. The examine() method is confusing, since it isn't separating one-time setup from the after-each-reset stuff. And the ARM7/ARM9 version is, somewhat undesirably, not leaving the debug state alone after reset ... probably more of an issue for trace setup than for watchpoints and breakpoints. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
Krzysztof Dziuba authored
-
- 14 Nov, 2009 2 commits
-
-
Dean Glazeski authored
This fixes an issue due to the new command handler syntax caused by the mw handler playing with the args pointer before using the CMD_NAME macro. Fix is to move this call above the lines changing args.
-
Ferdinand Postema authored
Changed some printf format strings.. [dbrownell@users.sourceforge.net: shrink lines, fix indents] Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
- 13 Nov, 2009 22 commits
-
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct command_context.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct target.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct reg.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct target_type.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct image. Also removes the typedef from enum image_type, as it is used in image.h only.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct trace.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct breakpoint.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct target_event_action.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct target_timer_callback.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct target_event_callback.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct working_area.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct reg_arch_type.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct reg_cache.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct watchpoint.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct reg_param.
-
Zachary T Welch authored
Remove misleading typedef and redundant suffix from struct mem_param.
-
Zachary T Welch authored
Search and destroy the jtag_tap_t typedef. This also cleans up a layering violation, removing the declaration from types.h.
-
Zachary T Welch authored
Remove useless structure typedef.
-
Zachary T Welch authored
By introducing the CMD_NAME macro, this parameter may be integrated as args[-1] in command.[ch], without touching any other call sites.
-
Zachary T Welch authored
By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or even removed in inherited signatures, without requiring revisiting all of the various call sites.
-
Zachary T Welch authored
Define the numerous helpers that inherit command handler parameters using the COMMAND_HELPER macro.
-
Zachary T Welch authored
-
- 11 Nov, 2009 1 commit
-
-
Zachary T Welch authored
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.
-
- 10 Nov, 2009 4 commits
-
-
David Brownell authored
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>
-
David Brownell authored
- 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>
-
David Brownell authored
And shrink a few too-long lines. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
Zachary T Welch authored
This patch removes the last batch of forward references from the tree, moving the target command registration routines to the end of the file.
-
- 09 Nov, 2009 3 commits
-
-
David Brownell authored
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>
-
David Brownell authored
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>
-
Zachary T Welch authored
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.
-
- 06 Nov, 2009 1 commit
-
-
David Brownell authored
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>
-