cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
12,541 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
Highlighted
Xilinx Employee
Xilinx Employee
20,382 Views
Registered: ‎08-02-2007

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.
----------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
11 Replies
Highlighted
Xilinx Employee
Xilinx Employee
12,512 Views
Registered: ‎08-02-2007

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
Highlighted
Explorer
Explorer
12,504 Views
Registered: ‎09-08-2014

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
Highlighted
Xilinx Employee
Xilinx Employee
12,502 Views
Registered: ‎08-02-2007

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
12,500 Views
Registered: ‎09-08-2014

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

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
12,495 Views
Registered: ‎08-02-2007

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
Highlighted
Explorer
Explorer
12,492 Views
Registered: ‎09-08-2014

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
Highlighted
Xilinx Employee
Xilinx Employee
12,481 Views
Registered: ‎08-02-2007

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
Highlighted
Explorer
Explorer
12,324 Views
Registered: ‎09-08-2014

@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
Highlighted
Xilinx Employee
Xilinx Employee
20,383 Views
Registered: ‎08-02-2007

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.
----------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Highlighted
Visitor
Visitor
971 Views
Registered: ‎06-05-2018
This fixed my problem too - I'm using a custom board without a board file and the hello world assigned pins for the uart to uart1 instead of uart0. Once I made the modification to the mss then it fixed my problem.
0 Kudos
Highlighted
Visitor
Visitor
968 Views
Registered: ‎06-05-2018
Actually it was the other way around, it defaulted to uart0.
0 Kudos