]> git.zerfleddert.de Git - hmcfgusb/blobdiff - flash-hmmoduart.c
firmware: fix maximum size
[hmcfgusb] / flash-hmmoduart.c
index e8487d36e6e6fddec3f6c1a2afa2b09eea797465..60f73f53e747917ee1d420e16ed4b4bb00e0d9de 100644 (file)
@@ -1,6 +1,6 @@
 /* flasher for HM-MOD-UART
  *
 /* flasher for HM-MOD-UART
  *
- * Copyright (c) 2016 Michael Gernoth <michael@gernoth.net>
+ * Copyright (c) 2016-20 Michael Gernoth <michael@gernoth.net>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -117,7 +117,7 @@ int main(int argc, char **argv)
                exit(EXIT_FAILURE);
        }
 
                exit(EXIT_FAILURE);
        }
 
-       fw = firmware_read_firmware(filename, debug);
+       fw = firmware_read_firmware(filename, ATMEGA_UNKNOWN, debug);
        if (!fw)
                exit(EXIT_FAILURE);
 
        if (!fw)
                exit(EXIT_FAILURE);
 
@@ -125,13 +125,15 @@ int main(int argc, char **argv)
 
        memset(&rdata, 0, sizeof(rdata));
 
 
        memset(&rdata, 0, sizeof(rdata));
 
+       printf("\nInitializing HM-MOD-UART...\n");
+
        dev = hmuart_init(uart, parse_hmuartlgw, &rdata, 0);
        if (!dev) {
                fprintf(stderr, "Can't initialize HM-MOD-UART\n");
                exit(EXIT_FAILURE);
        }
 
        dev = hmuart_init(uart, parse_hmuartlgw, &rdata, 0);
        if (!dev) {
                fprintf(stderr, "Can't initialize HM-MOD-UART\n");
                exit(EXIT_FAILURE);
        }
 
-       printf("\nHM-MOD-UART opened.\n\n");
+       printf("HM-MOD-UART opened.\n\n");
 
        printf("Flashing %d blocks", fw->fw_blocks);
        if (debug) {
 
        printf("Flashing %d blocks", fw->fw_blocks);
        if (debug) {
Impressum, Datenschutz