From: Nathael Pajani Date: Sat, 16 Feb 2019 13:15:56 +0000 (+0100) Subject: Add some trace and final completion message X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=08f30cdcce108b3b807341d121320f89693a0b5d;p=soft%2Ftools%2Flpctools Add some trace and final completion message --- diff --git a/prog_commands.c b/prog_commands.c index c1441d7..01572c7 100644 --- a/prog_commands.c +++ b/prog_commands.c @@ -204,11 +204,16 @@ int flash_target(struct part_desc* part, char* filename, int calc_user_code) printf("Invalid configuration, asked to use buffer out of RAM, aborting.\n"); return -1; } + if (trace_on) { + printf("flash size : 0x%08x, nb sectors : %d\n", part->flash_size, part->flash_nb_sectors); + } /* Calc write block size */ write_size = calc_write_size(sector_size, part->ram_buff_size); if (write_size == 0) { printf("Config error, I cannot flash using blocks of nul size !\nAborted.\n"); return -2; + } else if (trace_on) { + printf("write size : %d\n", write_size); } /* Just make sure flash is erased */ @@ -296,6 +301,10 @@ int flash_target(struct part_desc* part, char* filename, int calc_user_code) } } + if (ret == 0) { + printf("Done, binary has been written to internal flash.\n"); + } + free(data); return ret; }