gowin: Fix flash write message and display checksum when SRAM fail

This commit is contained in:
Gwenhael Goavec-Merou 2020-09-28 16:25:33 +02:00
parent 0adae3ffd0
commit 5d99237652
1 changed files with 3 additions and 2 deletions

View File

@ -195,9 +195,10 @@ void Gowin::program(unsigned int offset)
/* check if file checksum == checksum in FPGA */
status = readUserCode();
if (_fs->checksum() != status)
if (_fs->checksum() != status) {
printError("SRAM Flash: FAIL");
else
printf("%04x %04x\n", _fs->checksum(), status);
} else
printSuccess("SRAM Flash: Success");
if (_verbose)
displayReadReg(readStatusReg());