Skip to content
Snippets Groups Projects
Commit 2e160c6b authored by ntfreak's avatar ntfreak
Browse files

- issue warning when flash image exceeds configured flash size.

parent e77ae909
Branches
No related tags found
No related merge requests found
......@@ -1053,7 +1053,11 @@ int flash_write(target_t *target, image_t *image, u32 *written, int erase)
/* fit the run into bank constraints */
if (run_address + run_size > c->base + c->size)
{
LOG_WARNING("writing %d bytes only - as image section is %d bytes and bank is only %d bytes", \
c->base + c->size - run_address, run_size, c->size);
run_size = c->base + c->size - run_address;
}
/* allocate buffer */
buffer = malloc(run_size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment