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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
11,063 Views
Registered: ‎09-08-2014

xil_printf not working

Jump to solution

Hi 

 

I'm encountering some odd behaviour.

 

I have programmed the Zynq FPGA using the Xilinx SDK (2014.4). I then run  a programme that I know works. It has now stopped outputting any text using xil_printf command to the com port. I'm using a Zedboard and this has an Led which lights when anything is output to com port and it doesn't light at all now. I know the program is running as I can see the main leds on the Zedboard are changing. I've seen posts that say I should increase the stack & heap size. This I've done in the lscript.ld file but still don't get any output. So it apears the problem is on the board. Any suggestions please?

 

Peter

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
18,904 Views
Registered: ‎08-02-2007

Re: xil_printf not working

Jump to solution

hi,

 

yes you can edit the MSS or when configuring the BSP select the drop-down to target ps7_uart.

 

--hem

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
9 Replies
Xilinx Employee
Xilinx Employee
11,034 Views
Registered: ‎08-02-2007

Re: xil_printf not working

Jump to solution

hi,

 

have you run any other example available at http://zedboard.org/support/trainings-and-videos to confirm if board is functional?

 

--hem

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Explorer
Explorer
11,026 Views
Registered: ‎09-08-2014

Re: xil_printf not working

Jump to solution

Yes, I can switch from one version that works to this version that doesn't. The only change I'm making is to create another app & bsp. The app is identical. So the change has to be in the bsp.

 

I have encountered this problem before and it always comes after I've got a system that works and I want to make changes to it in the hardware ie I want to add another IP block. When I then open up the SDK I battle with getting it to recognise the new hardware. The best way I've found it to create a new bsp and app and copy the old app into the new. However when I do this I've quite often seen the xil_printf function stop working.

0 Kudos
Xilinx Employee
Xilinx Employee
11,024 Views
Registered: ‎08-02-2007

Re: xil_printf not working

Jump to solution

hi,

 

can you do a quick difference between the MSS of both BSP's. that might give a clue

 

--hem

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Explorer
Explorer
11,022 Views
Registered: ‎09-08-2014

Re: xil_printf not working

Jump to solution

How do you suggest I do a quick difference between the MSS of both BSP's?

0 Kudos
Xilinx Employee
Xilinx Employee
11,017 Views
Registered: ‎08-02-2007

Re: xil_printf not working

Jump to solution

hi,

 

since the issue is likely around the stdin/stdout, i would suggest you take both the MSS files and use a text editor for a quick comparison. you can focus on the Standalone BSP and the UART section of both MSS files

 

--hem

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Explorer
Explorer
11,014 Views
Registered: ‎09-08-2014

Re: xil_printf not working

Jump to solution

I've attached the 2 mss files. I'm not too sure what I'm looking for. The first one belongs to the systems that is failing. The 2nd is ok.

0 Kudos
Xilinx Employee
Xilinx Employee
11,003 Views
Registered: ‎08-02-2007

Re: xil_printf not working

Jump to solution

hi

 

i have looked at both the MSS files. And it looks that one of the MSS has UART16550(IP in PL) configured for Stdin/Stdout.

The other one is having PS_UART. If you dont have a UART16550 configured in PL, you need to change the stdin/stdout to ps7-uart to see the display.

 

refer to the snapshot attached.

 

--hem

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
Capture.JPG
Explorer
Explorer
10,846 Views
Registered: ‎09-08-2014

Re: xil_printf not working

Jump to solution

@htsvn sorry for slow response. I got diverted onto another job and I've just got back to this one. What you say is exactly what has happened. However I find this to be odd behaviour. I add an extra UART port and what Vivado does is switch the text output from the exiting uart to the new uart. I don't understand why it has done that? At no point did I ask it to do that. So although you have correctly identified the problem what hasn't been explained is why it has changed from one port to the other?   

 

Also how do I switch it back to how it was? Can I edit the MSS file?

0 Kudos
Xilinx Employee
Xilinx Employee
18,905 Views
Registered: ‎08-02-2007

Re: xil_printf not working

Jump to solution

hi,

 

yes you can edit the MSS or when configuring the BSP select the drop-down to target ps7_uart.

 

--hem

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos