- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 KycasLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for Your reply.
But how can I write an image into flash memory?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).

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