Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

sent "a" but my computer can recive correct char

i sent "a" but my computer can recive correct char through com1.

anyone help me .

my code is# include "system.h"# include "stdio.h"

main()

{

FILE*fp;

char*msg="a";

fp=fopen("/dev/uart","w");

fprintf(fp,"%s",msg);

}

i do not use ucos

in nios II ide console i recive permission denied

i do not know why

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i change the system frequency.i can receive the char but the message of "can not open the uart. permission denied."aslo in the console window.anyone can tell me the reason.thank you very much!