Hi,I am new to nios processor. when I use getchar function in my programm, I am getting error "undefined reference to `getc'".My task is very simple.I need to read a charecter from console and compare that charecter,if it is "w" I have to send data to pio ( again from console and it is just 8 bit pio). If it is "r" I have to read data from PIO (I am lucky, atleast printf is working ).Can anybody tell me what is wrong with getchar function ? and any suggestions to impliment my task. Sarat
Hi friends,Sorry for the previous post.I have got solution from some other thread.I have increased the memory size and I have unchecked the small c library on bps properties and my code is working fine:). Sarat
The 'small' C library may well have a function to read a character directly from the JTAG UART fifo - it wouldn't be that big!But I wouldn't know what it was called!
The hal.enable_lightweight_device_driver_api must set to true if the small device drivers bsp option is checked.Both settings can be made in the BSP editor links: http://www.altera.com/support/kdb/solutions/rd10152012_873.html http://www.altera.com/literature/an/an459.pdf page 36