Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12437 Discussions

fopen("/dev/uart","w") returning NULL

Altera_Forum
Honored Contributor II
853 Views

Hey guys, 

 

I'm attempting to communicate between my PC to the Nios II via RS-232. 

I've built up my system in SOPC and I'm using the eclipse tool to code in c. 

When I use the function fp = fopen("/dev/uart","w"), I always receive NULL. 

/dev/uart is the correct path according to my system.h file. 

 

Could you offer any advice? 

 

Thanks, 

Justin
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
168 Views

To fix the problem I unchecked "Lightweight device driver API" in the BSP editor.

Altera_Forum
Honored Contributor II
168 Views

 

--- Quote Start ---  

To fix the problem I unchecked "Lightweight device driver API" in the BSP editor. 

--- Quote End ---  

 

 

It worked for me too. Thanks!
Reply