- 17 Nov, 2009 1 commit
-
-
David Brownell authored
Fix bug noted by Øyvind: terminate the IR length autoscan when the IR is too long, or otherwise broken. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
- 16 Nov, 2009 39 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
Uses unsigned type to pass line numbers. Use uint64_t to pass sleep routines their milliseconds. Updates sleep routines to use this type and improve whitespace.
-
Zachary T Welch authored
The jim_register command just needed to use the type defined by jim.h.
-
Zachary T Welch authored
-
Zachary T Welch authored
The getopt_long call allows a const struct option, so mark ours const too.
-
David Brownell authored
Tweak "standard" ARM disassembler diagnostics to fail if the target is not "an ARM" (vs. not "an ARMV4/5"), so it makes more sense for cores inheriting this as the "generic" disassembler. Also, to use the Thumb2 entry instead of the original Thumb entry. This makes it work better for both newer cores (which support those added instructions) and for BL and BLX instructions on older cores. (Those instructions are 32-bits, which requires curious state-aware code to go through a 16-bit decode interface...) Plus minor cleanups, notably to have fewer exit paths and to make sure they all return failure codes. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
No point in multiple includes, and that file doesn't use its functions any more. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
They're really too big to inline, at least for code that's not in any performance-critical loops. Also move the associated string table to the rodata section. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
The "improve inline binarybuffer helpers" mis-handled bytes with the high bit set; treat them as unsigned, not signed. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
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>
-
Zachary T Welch authored
The ARRAY_SIZE macro was defined in several target files, so move it to types.h. This patch also removes two other identical macros: DIM (from jtag.h) and asizeof (from arm11.h).
-
Zachary T Welch authored
Eliminate redundant check that gets covered by using unsigned type. Created to eliminate noise from subsequent patches, but this kind of conversion will be beneficial in similar ways throughout the tree.
-
Zachary T Welch authored
Use DIV_ROUND_UP(n, 8) instead of TAP_SCAN_BYTES macro.
-
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.
-
Zachary T Welch authored
The container_of macro is useful as a general solution. It belongs in types.h, rather than target.h where it was introduced. Requires the offsetof macro, which comes from <stddef.h> (moved as well).
-
Zachary T Welch authored
Use COMMAND_HELPER macro to define nand_command_get_device_by_num. Use CALL_COMMAND_HANDLER to invoke it.
-
Zachary T Welch authored
Use COMMAND_HELPER macro to declare flash_command_get_bank_by_num. This is required for COMMAND_PARSE_NUMBER macro.
-
Zachary T Welch authored
Remove two vestigial externs from our JTAG minidriver source files. Also, removes many extra blank lines from the minidummy driver.
-
Zachary T Welch authored
Add the 'nand verify' command to perform a dump and fake-write simultaneously, checking the read bits against those generated by the write process. Appropriate user documentation for this command has been added to the user guide as well. The algorithm presently makes a relatively naive comparison. Some chips that use ECC may not verify correctly using this implementation, but the new documentation provides details about this limitation.
-
Zachary T Welch authored
In some cases, the FILEIO_NONE access mode may be useful as a parameter to indicate that file access should be disabled. High-level routines can use it to skip file access calls, as 'fileio_open' will fail presently if called to open a file using this mode.
-
Zachary T Welch authored
This patch eliminates duplicated code in the the NAND 'dump' and 'write' by using the new static helper functions. These changes also fix a possible memory leak in nand dump command, in the case that the dump file failed to open. Overall, the changes should be functionally equivalent, but the resulting code will be easier to improve and extend further.
-
Zachary T Welch authored
This patch provides helpers APIs that will eliminate duplicated code in the the NAND 'dump' and 'write' commands by factoring their common code into static helper functions. These helpers may be useful for creating new commands, as shown in the final patch to 'verify' flash from a file. Several previously unreported error conditions now generate messages and propogate the return codes, such as when the file fails to open and bad arguments are given. These changes will fix a possible memory leak in nand dump command, in the case that the dump file failed to open. Overall, the changes should be functionally equivalent, but the resulting code will be easier to improve and extend consistently.
-
Zachary T Welch authored
Adds Doxygen documentation for a number of the binarybuffer APIs, including "unexpected" behavior exposed during review on the list.
-
Zachary T Welch authored
Use void*, unsigned, and bool types with inline helpers.
-
Zachary T Welch authored
Use void * and unsigned types for buffer and their sizes. Allows it to be used with more than uint8_t * without casts.
-
Zachary T Welch authored
Use memset instead of loop. Improve types, using void * and unsigned.
-
Zachary T Welch authored
Use memcpy for bulk of copy, improve final byte handling. Improve types by using void * for buffers and unsigned for size.
-
Zachary T Welch authored
Rewrite buf_cmp to use memcpy for bulk of comparison. Add static helper to perform comparison of trailing byte, which uses another static helper to perform a maksed comparison. The masked comparison helper is used by the buf_cmp_mask to simplify its loop. Improve types to use void *, unsigned, and return bool.
-
Zachary T Welch authored
Improve types: use void * and unsigned. Move all variables to point of first use. Move radix guessing logic to new str_radix_guess helper.
-
Zachary T Welch authored
Reduce some noise from subsequent patches.
-
Zachary T Welch authored
Add inter-operator whitespace. Improve existing documentation.
-
David Brownell authored
Don't include "target.h" from more headers than necessary. This avoids needless interdependencies and duplicated include paths. Don't needlessly include it in source files, either. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
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>
-
David Brownell authored
Lots of files still include it, often through needless duplicate inclusion of "log.h"; sigh. This cleans up the inclusion graph a bunch, so there are fewer inclusion paths, but it doesn't change much otherwise. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
David Brownell authored
Most files in the tree seem to have ended up including this, and *quite* needlessly ... only code implementing or using downloadable algorithms 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. Also: "algorithm.h" doesn't need to include "types.h" again; it already comes from a different header. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net>
-
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>
-