From: Øyvind H. <go...@us...> - 2010-06-09 17:13:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 9ab7636ce6276d222662be431a1e6be96d9d34c0 (commit) from 49e6c61bcc9a176119721c38004eca02b3e77f19 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9ab7636ce6276d222662be431a1e6be96d9d34c0 Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Jun 9 17:12:52 2010 +0200 flash: add error message if image is too big for flash replaced assert() w/error message if the image is too big. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index 1bd09b4..429bad6 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -636,7 +636,11 @@ int flash_write_unlock(struct target *target, struct image *image, LOG_INFO("Padding image section %d with %d bytes", section_last-1, pad_bytes); } - assert (run_address + run_size - 1 <= c->base + c->size - 1); + if (run_address + run_size - 1 > c->base + c->size - 1) + { + LOG_ERROR("The image is too big for the flash"); + return ERROR_FAIL; + } /* If we're applying any sector automagic, then pad this * (maybe-combined) segment to the end of its last sector. ----------------------------------------------------------------------- Summary of changes: src/flash/nor/core.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |