mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
wip
This commit is contained in:
parent
37acc9ec33
commit
8cc0804f99
@ -175,7 +175,7 @@ int startCopyingFPGAProgram(FILE **fd, uint64_t fsize, char *mess) {
|
||||
LOG(logERROR, (mess));
|
||||
return FAIL;
|
||||
}
|
||||
LOG(logINFO, ("ready to copy program to %s\n", TEMP_PROG_FILE_NAME));
|
||||
LOG(logINFO, ("Copying program to %s\n", TEMP_PROG_FILE_NAME));
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@ -3722,8 +3722,8 @@ int program_fpga(int file_des) {
|
||||
uint64_t filesize = 0;
|
||||
if (receiveData(file_des, &filesize, sizeof(filesize), INT64) < 0)
|
||||
return printSocketReadError();
|
||||
LOG(logINFOBLUE, ("Program size is: %lld\n",
|
||||
(long long unsigned int)filesize));
|
||||
LOG(logDEBUG1,
|
||||
("Program size is: %lld\n", (long long unsigned int)filesize));
|
||||
|
||||
// open file and allocate memory for part program
|
||||
FILE *fd = NULL;
|
||||
@ -3784,18 +3784,18 @@ int program_fpga(int file_des) {
|
||||
}
|
||||
free(src);
|
||||
fclose(fd);
|
||||
LOG(logINFO, ("\tCopying done\n"));
|
||||
|
||||
/* if (ret != FAIL) {
|
||||
fpgasrc[totalsize] = '\0';
|
||||
}*/
|
||||
|
||||
/*
|
||||
/*
|
||||
|
||||
// opening file pointer to flash and telling FPGA to not touch flash
|
||||
if (startWritingFPGAprogram(&fp) != OK) {
|
||||
ret = FAIL;
|
||||
sprintf(mess, "Could not write to flash. Error at startup.\n");
|
||||
LOG(logERROR, (mess));
|
||||
// opening file pointer to flash and telling FPGA to not touch
|
||||
flash if (startWritingFPGAprogram(&fp) != OK) { ret = FAIL;
|
||||
sprintf(mess, "Could not write to flash. Error at
|
||||
startup.\n"); LOG(logERROR, (mess));
|
||||
}
|
||||
Server_SendResult(file_des, INT32, NULL, 0);
|
||||
|
||||
@ -3813,13 +3813,12 @@ int program_fpga(int file_des) {
|
||||
// closing file pointer to flash and informing FPGA
|
||||
ret = stopWritingFPGAprogram(fp);
|
||||
if (ret == FAIL) {
|
||||
strcpy(mess, "Failed to program fpga. FPGA is taking too long "
|
||||
"to pick up program from flash! Try to flash "
|
||||
"again without rebooting!\n");
|
||||
LOG(logERROR, (mess));
|
||||
strcpy(mess, "Failed to program fpga. FPGA is taking too
|
||||
long " "to pick up program from flash! Try to flash " "again without
|
||||
rebooting!\n"); LOG(logERROR, (mess));
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
#endif // end of Blackfin programming
|
||||
|
@ -1293,7 +1293,7 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
}
|
||||
|
||||
// convert src to dst rawbin
|
||||
LOG(logDEBUG1) << "Converting " << fname << " to " << destfname;
|
||||
LOG(logINFOBLUE) << "Converting " << fname << " to " << destfname;
|
||||
{
|
||||
constexpr int pofNumHeaderBytes = 0x11C;
|
||||
constexpr int pofFooterOfst = 0x1000000;
|
||||
@ -1342,7 +1342,7 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
if (close(dst) != 0) {
|
||||
throw RuntimeError("Program FPGA: Could not close destination file");
|
||||
}
|
||||
LOG(logDEBUG1) << "File has been converted to " << destfname;
|
||||
LOG(logINFOBLUE) << "File has been converted to " << destfname;
|
||||
|
||||
// loading dst file to memory
|
||||
FILE *fp = fopen(destfname, "r");
|
||||
|
Loading…
x
Reference in New Issue
Block a user