cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
thrylos107
Visitor
Visitor
3,700 Views
Registered: ‎01-27-2019

xilinx sdk fatal error xil_printf.h no such file or directory

Hi team,

I'm new in Xilinx and I tried to make a test project following the instructions for Xilinx SDK creating a c project "Hello world".

As soon as the project is created it gives me errors such as xil_printf.h no such file or directory.

What might be wrong??

Untitled.png
0 Kudos
3 Replies
ibaie
Xilinx Employee
Xilinx Employee
3,649 Views
Registered: ‎10-06-2016

Hi @thrylos107,

Xil_printf is not a header file (xil_printf.h does not exist). You need to include "xil_io.h" header file which does include the xil_printf prototype.

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
stefangriebel
Observer
Observer
1,380 Views
Registered: ‎11-09-2011

I have this exact same problem with the 2019.1 SDK, and the error even happens with Xilinx's own helloworld.c application project!

11-20-2020 8-33-34 AM.png

 It usually goes like this:

  1. I create a new BSP with a new FPGA build
  2. I change my own Microblaze standalone project to reference the new BSP
  3. I run launch the code on hardware and...
    1. The JTAG virtual UART mysteriously stops working and I have no way to interact with my code.
    2. Even launching the code in debug mode, main() is never reached.
  4. I do a full Clean of all projects and...
  5. I get the xil_printf.h error

This happens on code that was compiling and running just fine. Usually I have to close SDK, blow away my entire workspace, re-import all my C code, create the new BSP and then things return to normal. 

However, I've had to do this about 10 times in the last couple weeks. Any ideas what could be going on?!

Tags (3)
0 Kudos
556 Views
Registered: ‎03-09-2021

Agreed --- the helloworld.c doesn't build on the Linux version of Vitis, for this reason.  xil_printf.h definitely exists, in a variety of directories of the form 

data/embeddedsw/lib/bsp/standalone_v7_1/src/common/

... but I don't know if I should just start adding Include directories?  The example programs should, well, work.  Does anyone know the correct solution?

 

UPDATE: For fun I just commented out the #include line ... and it worked.  Got the "hello world" printouts from the UART.  Not at all confident that this is a good solution ... but for the next reader, well, it worked.

 

 

Thanks for any advice!

 

0 Kudos