Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

Image Filtering problem

Altera_Forum
Honored Contributor II
1,672 Views

Hi, 

 

I have a problem opening image from FLASH memory for writing. It opens it for reading only. There is some program code: 

 

fp1 = fopen("/mnt/rozips/circuit_ch.bmp", "w"); 

if(fp1 == NULL){ 

printf("Can't open file: circuit_ch.bmp\n"); 

return 1; 

 

fwrite((void*) buff2, 280*272, 1, fp1); 

fclose(fp1); 

 

It always printf a message that cant open a file. 

 

I have programed my flash memory with ziped(without compression) images. 

Can anyone help me? 

 

P.S I run the program in Eclipse 

 

Kind regards 

 

Kycas
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
461 Views

If you are using the Zip filesystem provided with the Nios environment, then you can't write anything. The software module's full name is "Read-only ZIP filesystem"

0 Kudos
Altera_Forum
Honored Contributor II
461 Views

Thanks for Your reply. 

But how can I write an image into flash memory?
0 Kudos
Altera_Forum
Honored Contributor II
461 Views

What do you want to do with the image contents once they are flashed? One way could just be to define a fixed area in the flash and just write the binary file contents there (maybe with an indication of the data size somewhere, and a magic number to signal the contents are valid).

0 Kudos
Reply