1. 17 Nov, 2009 1 commit
  2. 16 Nov, 2009 4 commits
    • Zachary T Welch's avatar
      fileio: improve API types · 51862bb9
      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.
      51862bb9
    • Zachary T Welch's avatar
      struct fileio: improve member types · 69df712d
      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.
      69df712d
    • Zachary T Welch's avatar
      rename CEIL as DIV_ROUND_UP · a94748ec
      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.
      a94748ec
    • David Brownell's avatar
      target: don't implicitly include "breakpoint.h" · aa7c4496
      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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      aa7c4496
  3. 15 Nov, 2009 2 commits
    • David Brownell's avatar
      target: make "examined" flag be per-target · 9ac7cdec
      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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      9ac7cdec
    • Krzysztof Dziuba's avatar
      Fix for md* commands, similar to mw*. · c2edc790
      Krzysztof Dziuba authored
      c2edc790
  4. 14 Nov, 2009 2 commits
  5. 13 Nov, 2009 22 commits
  6. 11 Nov, 2009 1 commit
    • Zachary T Welch's avatar
      add const keyword to some APIs · ca594adb
      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.
      ca594adb
  7. 10 Nov, 2009 4 commits
  8. 09 Nov, 2009 3 commits
    • David Brownell's avatar
      Revert "target: add target->type->has_mmu fn" · 7269ba5e
      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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      7269ba5e
    • David Brownell's avatar
      finish removing deprecated/obsolete commands · d70d9634
      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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      d70d9634
    • Zachary T Welch's avatar
      Overhaul time support API · 2689f58f
      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.
      2689f58f
  9. 06 Nov, 2009 1 commit
    • David Brownell's avatar
      target: don't swap MMU/no-MMU work areas · a9abfa7d
      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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      a9abfa7d