Forum Discussion
LucasM
New Contributor
7 years agoHow to read from stdin in NIOSII with the small_c_library
whithout the small_c_library checked, i am unable to read from standard input. unless there's some sort of alt_fopen, how do i read from the standard character streams whithout gets,scanf and fopen?...
- 7 years ago
It seems that with the small c library enabled stdin,stdou and stderr are "preopened" files, so i can interact with them as files whithout opening them, can't find right now exactly where i saw this info.
AnandRaj_S_Intel
Regular Contributor
7 years agoHi,
Are you saying that, using normal c libraries you are able to read write but not able to read using small c libraries ?
- If simple console read write ->use alt_printf, alt_putstr, alt_putchar & alt_getchar. Refer table 34 gives you the comparison between libraries https://www.intel.com/content/altera-www/global/en_us/index/documentation/mwh1416947091611.html#mwh1416946791328__ID-356-000027c6 OR
- If Read, write to from FPGA peripherals? use IORD and IOWR functions.
Let me know if this has helped resolve the issue you are facing or if you need any further assistance.
Best Regards,
Anand