Forum Discussion

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

NIOS Not Findary Library

I have simple NIOS processor that has a UART. The NIOS Hello World template is used to create a simple program. I delared FILE *fp. The entire program is as follows: # include stdio.h main () { FILE *fp fp = fopen("dev/uart_rs232", "r+"); fprintf(fp, "New project"); fclose(fp); } it won't compile saying undefined reference to fopen. undefined reference to fwrite (I don't even have fwrite anywhere!) Anyone know what's wrong. Thanks (Can't separate lines for some reason. This forum automatically formats)

2 Replies

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

    Can't figure it out. I deleted the "software" folder in the project and started all over. Now it works! However, it also appears that the "reduced device drivers" has to be UNCHECKED. Don't know yet.

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

    Yeah, I'm pretty certain that very few (to none) of the POSIX-like features would exist in a "reduced drivers" piece of software. There are smaller footprint versions of some of these functions...look for "alt_*" named files...if you need to reduce memory footprint.