Forum Discussion
Altera_Forum
Honored Contributor
8 years agoThe binary image can be extracted from the .jic file. I'm doing it like below
struct
{
unsigned short typ;
unsigned len;
} jicrechdr;
finput = fopen(filename,"rb");
fread(buffer,1,12,finput);
while (!feof(finput))
{
fread(&jicrechdr,1,6,finput);
if (jicrechdr.typ != 0x1c)
fseek(finput,jicrechdr.len,SEEK_CUR);
else
break;
}
if (feof(finput))
exit(1);
fseek(finput,jicrechdr.len & 0xff,SEEK_CUR);
imagesize = jicrechdr.len & 0xffffff00;
// read binary image