From 0de222efe437027c73cd086eaf29ed9921f1b221 Mon Sep 17 00:00:00 2001 From: Bluebie Date: Wed, 18 Dec 2013 09:00:38 +1100 Subject: commandline: fixes --erase-only so it actually works --- commandline/examples/micronucleus.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'commandline') diff --git a/commandline/examples/micronucleus.c b/commandline/examples/micronucleus.c index 0f2000c..f77863f 100644 --- a/commandline/examples/micronucleus.c +++ b/commandline/examples/micronucleus.c @@ -119,6 +119,7 @@ int main(int argc, char **argv) { use_ansi = 0; } else if (strcmp(argv[arg_pointer], "--erase-only") == 0) { erase_only = 1; + progress_total_steps -= 1; } else if (strcmp(argv[arg_pointer], "--timeout") == 0) { arg_pointer += 1; if (sscanf(argv[arg_pointer], "%d", &timeout) != 1) { @@ -224,16 +225,6 @@ int main(int argc, char **argv) { printProgress(1.0); - if (startAddress >= endAddress) { - printf("> No data in input file, exiting.\n"); - return EXIT_FAILURE; - } - - if (endAddress > my_device->flash_size) { - printf("> Program file is %d bytes too big for the bootloader!\n", endAddress - my_device->flash_size); - return EXIT_FAILURE; - } - setProgressData("erasing", 4); printf("> Erasing the memory ...\n"); res = micronucleus_eraseFlash(my_device, printProgress); -- cgit v1.2.3