I’m Mountain8848 from China(other1999@163.com), and I posted the last post using my colleague's account —smalllight by mistake.
However I received both of your email---- cetic and hootsmon.
------------------------------------------------------------------------------
To hootsmon:
I compare your NIOSSerial.c with original one, and find you modified it. I guess the reason of it:
After we use cal_uart, during *.ptf to nios2_system.h the cal_uart module is not regarded as a UART class, so nios2_system.h misses below codes:
/* Executing ...scripts/nios2_system.h/altera_avalon_uart.pm */# ifndef __ASSEMBLY__# include <asm/uart_struct.h># endif
/* The default uart is always the first one found in the PTF file */# define nasys_printf_uart na_uart0
Maybe you modified NIOSSerial.c in order to compile successfully. I don’t know if it is the problem.
NOTICE:
1. I just chang uart to cal_uart with 16byte rx_fifo, 16byte tx_fifo, which should be modified to avoid irq error as:
<cal_uart>/uart_pm.pl:l1933:rx_char_ready to rx_not_empty; regenenate in sopc; recompile in quartus 2. cal_uart’s document was said cal_uart should transparent with software. SO nothing was changed in NIOSSerial.c/ NIOSSerial.h. and nios2_system.h , which was generated with uart ones
3. kernel menuconfig: enable UART driver and UART console
------------------------------------------------------------------------------
To cetic:
I tested cal_uart and uart in my custom board as your method.
Cat /dev/ttyS0 > /tmp/file &
I sent about 30 chars to cal_uart and uart.
1. per 100ms per 30 chars both uarts lost chars
2. per 200 ms per 30 chars cal_uart is OK, while uart still lost chars
3. send 3KB file to them, if I send quickly both
cat process will be terminated abnormal, however the kernel still work fine.
BTW, The size of /tmp/file is always smaller then the one of the send file. I am still a newbie in uClinux, I don’t know why.
Maybe you should send your datas one packets by one packets to let little Nios have a brake :-)
------------------------------------------------------------------------------
After you give the good news I am very interested to put FIFO_UART to "Post Your Own IP".