diff options
author | Keith Packard <keithp@keithp.com> | 2013-03-24 15:30:24 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-07 20:16:52 -0700 |
commit | 1f30b1f14dbab6e6ea94177e459c80732e31e433 (patch) | |
tree | f348ec2ef70b862a9563e0d33f4215516fcc858c /ao-tools/lib/ccdbg.h | |
parent | 7d98fc5d3f106f3063608a2e5c69d9359061437a (diff) |
ao-tools/lib: Add loading support for 32-bit ihx files
These place the upper 16 bits of the address in a special record. That
requires handling records in file order, so don't sort them in address
order anymore, instead find the bounds of the loaded data by scanning
them all.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/lib/ccdbg.h')
-rw-r--r-- | ao-tools/lib/ccdbg.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ao-tools/lib/ccdbg.h b/ao-tools/lib/ccdbg.h index ca596143..a27ff5d1 100644 --- a/ao-tools/lib/ccdbg.h +++ b/ao-tools/lib/ccdbg.h @@ -122,8 +122,8 @@ struct hex_file { }; struct hex_image { - uint16_t address; - uint16_t length; + uint32_t address; + uint32_t length; uint8_t data[0]; }; @@ -253,6 +253,9 @@ ccdbg_hex_image_create(struct hex_file *hex); void ccdbg_hex_image_free(struct hex_image *image); +struct hex_image * +ccdbg_hex_load(char *filename); + int ccdbg_hex_image_equal(struct hex_image *a, struct hex_image *b); |