euem789
New Contributor
5 years agofile io with NIOS II
Hi all
I wrote a code to read the text file
for implementing in FPGA board (DE1-SOC) with NIOS II ,
but when I build the project, the elf file wasn't generated.
here's my code
----------...
- 5 years ago
Hi, Dong Wook
You are right.
However, there is another way, ie using a character-mode device like UART.
Below example is to write characters to a UART called uart1. You can find the device name (/dev/uart1) in the system.h
#include <stdio.h>
#include <string.h>
int main (void)
{
char* msg = "hello world";
FILE* fp;
fp = fopen ("/dev/uart1", "w");
if (fp!=NULL) { fprintf(fp, "%s",msg); fclose (fp);}
return 0;
}
Thanks.
Eric