Forum Discussion

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

Store string using small C library

Hi,

I want to enter a string in NiosII console & once pressed enter for it to store in a char array. How do I do it using the functions enabled in the small c library.? Can I have an example?

Need help,

Thanx in advance.

>>The final output of my program is to transmit those char values through the rs232 UART.

1 Reply

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

    Take a look at any software example that accepts characters over the terminal like memtest, board_diag, simple_socket_server, etc...

    Are you trying to communicate to the board and use the board to repeat those characters over RS-232 or do you plan on communicating with the board through RS-232 directly? If it's the latter, you can direct standard in/out/error to the UART in your SOPC Builder system in the BSP settings and then use use any terminal program you like on the host side.