bios: Increment address when writing to flash
authorKonrad Beckmann <konrad.beckmann@gmail.com>
Sat, 19 Oct 2019 20:58:24 +0000 (22:58 +0200)
committerKonrad Beckmann <konrad.beckmann@gmail.com>
Sat, 19 Oct 2019 20:58:24 +0000 (22:58 +0200)
litex/soc/software/bios/main.c

index 9d47011b95e5875b814e0743bc6c75a434b7fc9c..a19e7ce9d6a57aa1a241f3dd48a8b8ca7041df84 100644 (file)
@@ -210,7 +210,7 @@ static void fw(char *addr, char *value, char *count)
                        return;
                }
        }
-       for (i=0;i<count2;i++) write_to_flash(addr2, (unsigned char *)&value2, 4);
+       for (i=0;i<count2;i++) write_to_flash(addr2 + i * 4, (unsigned char *)&value2, 4);
 }
 #endif