image loading: fix problem with offsets > 0x80000000
Fixes bug that prevented users from specifying a base address of 0x80000000 or higher in image commands (flash write_image, etm image, xscale trace_image). image.base_address is an offset from the start address contained in the image file (if there is one), or from 0 (for binary files). As a signed 32-bit int, it couldn't be greater than 0x7fffffff, which is a problem when trying to write a binary file to flash above that address. Changing it to a 64-bit long long keeps it as a signed offset, but allows it to cover the entire 32-bit address space. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
committed by
Øyvind Harboe
parent
a540033a71
commit
f85ad1e52a
@@ -1761,7 +1761,7 @@ COMMAND_HANDLER(handle_etm_image_command)
|
||||
if (CMD_ARGC >= 2)
|
||||
{
|
||||
etm_ctx->image->base_address_set = 1;
|
||||
COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], etm_ctx->image->base_address);
|
||||
COMMAND_PARSE_NUMBER(llong, CMD_ARGV[1], etm_ctx->image->base_address);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user