UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 17362

3.2 EDK - I get an "error:mdt - No stdin interface available for driver for peripheral my_uart" when I set my desired uart driver level

Description

Keywords: EDK, 3.2, error, mdt, stdin, interface, level, available, driver, peripheral, uart

Urgency: Standard

General Description:
I'm using EDK 3.2, and I'm creating a basic processing subsystem. I want to be able to set the uart driver level to 1, but when I do so I get the error message:

"error:mdt - No stdin interface available for driver for peripheral my_uart."

I can set the driver level to 0 and get things to work that way, but that's not what I want.

Solution

The setting of the driver level depends on the type of function the user wishes to call for the uart. This is set up by the user, so the user needs to know what functions or level of driver to compile.

There is a caveat here, which is that the uartlite driver level can only be set to either 1 or 0 and not both. This means that if there is a "stdio.h" function like printf, scanf, xil_printf, etc., then the uart needs to be set to Level 0 to produce the correct "xuartlite_l.h" file for compilation. Users cannot use the uart as stdin/stdout AND use the level 1 drivers for it. It has to be one way or the other.

If users want to use the uart as stdin/stdout, then they should set the uart to level 0. If they would like to use the higher level functions (level 1), then they should set the uart to level 1. If the driver level is set to 1 for a uart, then stdin/stdout cannot be used for the uart in question.

In summary:

If a user would like to use the Level 1 driver for a uart, then select Level 1.
If a user would like to use the Level 0 driver for a uart, then select Level 0.
Level 0 drivers are used for the STDIN/STDOUT settings. That is, if users would like to use printf, scanf, xil_printf, or other stdio.h functions, then the driver level should be set to level 0 to call on the inbyte and outbyte functions to send and receive data from a "stdio.h" call. The Level 1 drivers are used for accessing registers from high-level function calls. Users need to know what functions they will be using with their uarts, and then select the level 0 or level 1 drivers accordingly.

The two main files created by LibGen once the code is written and the hardware is built will produce "xuartlite_l.h" or "xuartlite.h" files for use; "xuartlite_l.h" is the level 0 driver header file and "xuartlite.h" is the level 1 driver header file.
AR# 17362
Date Created 05/31/2003
Last Updated 04/06/2007
Status Archive
Type General Article