Skip to content

Commit

Permalink
Added firmware to windows release
Browse files Browse the repository at this point in the history
  • Loading branch information
djupdal committed Jan 14, 2020
1 parent 6e3966d commit d8c01a2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
23 changes: 17 additions & 6 deletions lynsyn_tester/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ void programTest(void) {
fflush(stdout);
getchar();

printf("*** Enter fpga mcs filename [fwbin/lynsyn.mcs]:\n");
printf("*** Enter fpga mcs filename [fwbin/original/lynsyn_2.0.mcs]:\n");
fflush(stdout);
char filename[80];
if(!fgets(filename, 80, stdin)) {
printf("I/O error\n");
exit(-1);
}
if(filename[0] == '\n') strncpy(filename, "fwbin/lynsyn.mcs", 80);
if(filename[0] == '\n') strncpy(filename, "fwbin/original/lynsyn_2.0.mcs", 80);
filename[strcspn(filename, "\n")] = 0;

if(!programFpga(filename)) exit(-1);
Expand All @@ -384,26 +384,37 @@ void programTest(void) {

getchar();

printf("*** Enter boot bin filename [fwbin/lynsyn_boot.bin]:\n");
char *bootbin;
char *mainbin;

if(hwVersion >= HW_VERSION_3_0) {
bootbin = "fwbin/lite/lynsyn_boot_2.0.bin";
mainbin = "fwbin/lite/lynsyn_main_2.0.bin";
} else {
bootbin = "fwbin/original/lynsyn_boot_2.0.bin";
mainbin = "fwbin/original/lynsyn_main_2.0.bin";
}

printf("*** Enter boot bin filename [%s]:\n", bootbin);
fflush(stdout);
char bootFilename[80];
if(!fgets(bootFilename, 80, stdin)) {
printf("I/O error\n");
fflush(stdout);
exit(-1);
}
if(bootFilename[0] == '\n') strncpy(bootFilename, "fwbin/lynsyn_boot.bin", 80);
if(bootFilename[0] == '\n') strncpy(bootFilename, bootbin, 80);
bootFilename[strcspn(bootFilename, "\n")] = 0;

printf("*** Enter main bin filename [fwbin/lynsyn_boot.bin]:\n");
printf("*** Enter main bin filename [%s]:\n", mainbin);
fflush(stdout);
char mainFilename[80];
if(!fgets(mainFilename, 80, stdin)) {
printf("I/O error\n");
fflush(stdout);
exit(-1);
}
if(mainFilename[0] == '\n') strncpy(mainFilename, "fwbin/lynsyn_main.bin", 80);
if(mainFilename[0] == '\n') strncpy(mainFilename, mainbin, 80);
mainFilename[strcspn(mainFilename, "\n")] = 0;

if(!programMcu(bootFilename, mainFilename)) {
Expand Down
1 change: 1 addition & 0 deletions windeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ cp /mingw64/bin/nm bin/
cp jtagdevices bin/jtagdevices
cp ../zadig-2.4.exe bin/
cp COPYING bin/COPYING.txt
cp -r fwbin_precompiled bin/fwbin

0 comments on commit d8c01a2

Please sign in to comment.