Fix: assert flashing succeeded or failed (hosted) once the last buffer has been written
This commit is contained in:
parent
92d6056711
commit
71b67beb98
|
@ -510,6 +510,8 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
|
||||||
unsigned int flashed = target_flash_write(t, opt->opt_flash_start,
|
unsigned int flashed = target_flash_write(t, opt->opt_flash_start,
|
||||||
map.data, map.size);
|
map.data, map.size);
|
||||||
/* Buffered write cares for padding*/
|
/* Buffered write cares for padding*/
|
||||||
|
if (!flashed)
|
||||||
|
flashed = target_flash_done(t);
|
||||||
if (flashed) {
|
if (flashed) {
|
||||||
DEBUG_WARN("Flashing failed!\n");
|
DEBUG_WARN("Flashing failed!\n");
|
||||||
res = -1;
|
res = -1;
|
||||||
|
@ -518,7 +520,6 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
|
||||||
DEBUG_INFO("Success!\n");
|
DEBUG_INFO("Success!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
target_flash_done(t);
|
|
||||||
uint32_t end_time = platform_time_ms();
|
uint32_t end_time = platform_time_ms();
|
||||||
DEBUG_WARN("Flash Write succeeded for %d bytes, %8.3f kiB/s\n",
|
DEBUG_WARN("Flash Write succeeded for %d bytes, %8.3f kiB/s\n",
|
||||||
(int)map.size, (((map.size * 1.0)/(end_time - start_time))));
|
(int)map.size, (((map.size * 1.0)/(end_time - start_time))));
|
||||||
|
|
Loading…
Reference in New Issue