Forum Discussion

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

Standard IO in the Nios II ISS

Hi,

Serious newbie here. My apologies in advance...

Our team is developing an automated test suite for a board which contains a Nios II FPGA. We don't have hardware yet so we are hoping to get basic communications working to the rest of our test environment using the ISS. The software has been previously developed by a different team and presumable works on the target, but the other team has not used the ISS.

Our present environment is the Nios II Eclipse IDE (v7.2) to build and the Cygwin command line tools to run the ISS. I have had to add lots of# ifdef's to the application to prevent it from hanging on the ISS. Now I think about all it's doing is defining an ISR for the serial port I wish to communicate with i.e.

(void)alt_irq_register(COM_UART_IRQ, 0, HandleComSerialPortInterrupt);

Now all I want to be able to do it redirect standard IO from the Cygwin shell to a real COM port on the Windows box. I am using this command

[SOPC Builder]$ nios2-iss -f CPE_off_chip.elf -p CPE.ptf --stdin=Com_uart --stdout=Com_uart <> /dev/ttyS11

However the ISR does not appear to trigger when data is sent to that port. In fact it doesn't when I pipe the output of the text file either. i.e.

[SOPC Builder]$ cat hello_world.c | nios2-iss -f CPE_off_chip.elf -p CPE.ptf --stdin=Com_uart

Questions:

1) Is what I am trying to do even possible / practical using the Cygwin ISS? If not, are there other simulation alternatives, such as using Linux?

2) Would it help to upgrade to the v9.1 toolset?

3) I have searched a fair bit in the documents for redirecting Std I/O, and there some references to generating a new BSP using "nios2-bsp". Perhaps this is what I should be investigating more?

Thanks for your interest.
No RepliesBe the first to reply