Link Copied
The 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
--- Quote Start --- The 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
--- Quote End --- Is this c programming lauguage, i not familiar with this programming? any tool to direct convert it?
Yes, C language. I have my own tool converting .jic to .hex. Reason is that Quartus had (still has?) a bug making the .hex binary output incompatible with CRC check during remote system upgrade.
For a one time action, you can cut out the binary image with a hex editor.Is there any documentation available for the JIC file format or programming files in general? Plus there is parts missing from your code. Unsigned short is 16bit (!?) and unsigned len is 32 or 64 bit depending on system (!?). Would be better to use stdint types here.
Can you make full source available? MarkusConsider the code being written for a 32 bit tool.
--- Quote Start --- Consider the code being written for a 32 bit tool. --- Quote End --- Cool, can you consider publishing the complete code (I guess there is parts missing)? Markus
For more complete information about compiler optimizations, see our Optimization Notice.