Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

4.8.2. Specifying the Default stdio Device

The bsp-stdio-utils.tcl script provides procedures to choose a default stdio slave descriptor and to set the hal.stdin, hal.stdout, and hal.stderr BSP settings to that value.

For more information about these settings, refer to the Nios II Software Build Tools Reference section.

The script searches the .sopcinfo file for a slave descriptor with the string stdio in its name. If bsp-stdio-utils.tcl finds any such slave descriptors, it chooses the first as the default stdio device. If the script finds no such slave descriptor, it looks for a slave descriptor with the string jtag_uart in its component class name. If it finds any such slave descriptors, it chooses the first as the default stdio device. If the script finds no slave descriptors fitting either description, it chooses the last character device slave descriptor connected to the Nios II processor. If bsp-stdio-utils.tcl does not find any character devices, there is no stdio device.