diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-06-09 16:01:10 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-06-09 16:01:10 +0200 |
commit | 49e6c61bcc9a176119721c38004eca02b3e77f19 (patch) | |
tree | d262d287f336866dd0dc13c05135d3accdbfe860 | |
parent | c63468038473420bf4f25d2b93e3ce7620d0b572 (diff) | |
download | openocd_libswd-49e6c61bcc9a176119721c38004eca02b3e77f19.tar.gz openocd_libswd-49e6c61bcc9a176119721c38004eca02b3e77f19.tar.bz2 openocd_libswd-49e6c61bcc9a176119721c38004eca02b3e77f19.tar.xz openocd_libswd-49e6c61bcc9a176119721c38004eca02b3e77f19.zip |
flash: flash erase_address takes unsigned arguments
fixed bug where address was parsed as a signed, rather
than unsigned it.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
-rw-r--r-- | src/flash/nor/tcl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c index b3dbd7b8..cf1ca4af 100644 --- a/src/flash/nor/tcl.c +++ b/src/flash/nor/tcl.c @@ -199,8 +199,8 @@ COMMAND_HANDLER(handle_flash_erase_address_command) { struct flash_bank *p; int retval = ERROR_OK; - int address; - int length; + uint32_t address; + uint32_t length; bool do_pad = false; bool do_unlock = false; struct target *target = get_current_target(CMD_CTX); @@ -229,8 +229,8 @@ COMMAND_HANDLER(handle_flash_erase_address_command) return ERROR_COMMAND_SYNTAX_ERROR; } - COMMAND_PARSE_NUMBER(int, CMD_ARGV[0], address); - COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], length); + COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], address); + COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], length); if (length <= 0) { |