This commit is contained in:
2021-09-03 17:29:27 +02:00
parent 0c7ff62d8d
commit a718d69368
7 changed files with 54 additions and 23 deletions

View File

@ -1,6 +1,5 @@
#pragma once
#include <openssl/md5.h>
#include <stdint.h>
#include <stdio.h>
/**

View File

@ -3725,6 +3725,14 @@ int program_fpga(int file_des) {
LOG(logDEBUG1,
("Program size is: %lld\n", (long long unsigned int)filesize));
// checksum
uint16_t checksum = 0;
if (receiveData(file_des, &checksum, sizeof(filesize), INT32) < 0)
return printSocketReadError();
LOG(logINFOBLUE,
("checksum: %d\n", checksum));
// open file and allocate memory for part program
FILE *fd = NULL;
ret = startCopyingFPGAProgram(&fd, filesize, mess);