Forum Discussion
Altera_Forum
Honored Contributor
16 years agoActive Host File System from NIOS II ECLIPSE
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 ...
Altera_Forum
Honored Contributor
16 years agoIn 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); }