- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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? Markus- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Consider the code being written for a 32 bit tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page