Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12469 Discussions

Problem reading pcx files inside SD with Nios II Eclipse

Altera_Forum
Honored Contributor II
816 Views

Hello guys, I've written a small program in C that reads PCX files from inside a SD card. On its development, I used fopen("name.pcx", "r") to open the files and I got some errors because fopen was unable to read some parts of the file. To solve it, I just used fopen("name.pcx", "rb") to open the file as a binary file, and the problems were gone. 

 

Now I'm trying to write the same program using the Nios II Eclipse IDE, but I'm facing the same problem again. I'm using alt_up_sd_card_fopen to open the image file from the SD card, but the same problem is happening again. Is there a way to open files like "rb" opens them as a binary, instead of a text file? 

 

Thanks in advance!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
105 Views

Problem solved. Please, the thread can be closed now.

Reply