Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

Active Host File System from NIOS II ECLIPSE

Altera_Forum
Honored Contributor II
1,947 Views

Hi,  

I need help with reading/writing files, from the NIOS II target with a PC file. 

 

My IDE is ECLIPSE, so: 

I don't have the project->properties->Associated system Library->System Library oroerties->Software Components->add this SW Component. 

So what's its equivalent. 

 

Thanks:confused:  

Yossi
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,068 Views

In other words, I can't get into the if: 

 

int x; 

char list[30]= {"ABCOCJHAKLSDNJCDKLASNC"}; 

FILE *fd; 

 

if( (fd = fopen("a.txt", "w+t")) != NULL) 

x = fwrite(list, sizeof(char), 12, fd); 

fclose(fd); 

if( (fd = fopen("a.txt", "r+t")) != NULL) 

x = fread(list, sizeof(char), 12, fd); 

fclose(fd); 

}
0 Kudos
Altera_Forum
Honored Contributor II
1,068 Views

Hi, jberman! 

To read your files from ext. Flash memory for NIOS II 9.1: 

BSP Editor -> Software packages -> activate altera_ro_zipfs. 

 

-ro_zipfs_base - base of your Flash memory. 

 

I haven't found how to create "zip file" with my original files to load it to Flash memory . 

Write this "zip file" to Flash using Flash Programmer. 

And use  

fp = fopen ("/mnt/rozipfs/file1.txt", "r"); and so on 

If you know how to create "zip file", to load it to Flash memory, share with me. 

Manual doesn't tell it clearly. 

altera.com/literature/hb/nios2/n2sw_nii52012.pdf
0 Kudos
Altera_Forum
Honored Contributor II
1,068 Views

Hi! 

The answer: 

Michael72 

altera_ro_zipfs niosii for eclipse .
0 Kudos
Altera_Forum
Honored Contributor II
1,068 Views

 

--- Quote Start ---  

Hi,  

I need help with reading/writing files, from the NIOS II target with a PC file. 

 

My IDE is ECLIPSE, so: 

I don't have the project->properties->Associated system Library->System Library oroerties->Software Components->add this SW Component. 

So what's its equivalent. 

 

Thanks:confused:  

Yossi 

--- Quote End ---  

 

 

I meet the same difficult,have you solved you problem?
0 Kudos
Reply