Forum Discussion
file io with NIOS II
- 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
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
Hi, eric
I didn't solve the problem yet,
and only knew how to perform generating hex->bmp file // sobel -edge-detect
through quartus testbench (altera-modelsim using fopen&fclose without NIOS)
I think I have to study more to ask detail & intuitive question later.
thanks for every help