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
4,121 Views
Registered: ‎08-26-2014

Problem when compiling a hardware function in SDSoC in Linux

Jump to solution

Hello,

 

I have installed SDSoC without major problems in Linux Mint 18.2 Sonya.

 

I copied a C file that was working in Windows to Linux, created a SDx project, added the file, build it without any hardware function and it worked.

 

The problem came when I chose a function to be ran in the fabric. Then I got this error:

 

Performing accelerator source linting for MMC_circuit
INFO: [Linting 83-3001] MMC_circuit
INFO: [Linting 83-3001] MMC_circuit
Performing pragma generation
INFO: [PragmaGen 83-3231] Successfully generated tcl script: /home/sdf/Documentos/Xilinx/HVDC_MMC/Debug/_sds/vhls/MMC_circuit.tcl
Moving function MMC_circuit to Programmable Logic
ERROR: [HLS 200-70] Compilation errors found:
Pragma processor failed: /home/sdf/Documentos/Xilinx/HVDC_MMC/src/main.cpp:2:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
ERROR: [SdsCompiler 83-5019] Exiting sds++ : Error when calling '/opt/Xilinx/SDx/2017.1/Vivado_HLS/bin/vivado_hls /home/sdf/Documentos/Xilinx/HVDC_MMC/Debug/_sds/vhls/MMC_circuit_run.tcl'
make: *** [src/main.o] Error 1
sds++ log file saved as /home/sdf/Documentos/Xilinx/HVDC_MMC/Debug/_sds/reports/sds_main.log
ERROR: [SdsCompiler 83-5004] Build failed

src/subdir.mk:18: fallo en las instrucciones para el objetivo 'src/main.o'

11:50:39 Build Finished (took 4s.792ms)

Does anyone know why it cannot find stdio.h after adding a function to be ran in the FPGA?

 

Thanks,

 

Cerilet

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
6,951 Views
Registered: ‎08-26-2014

Re: Problem when compiling a hardware function in SDSoC in Linux

Jump to solution

I finally got it working. I will try to explain here what I have done to get SDSoC 2017.1 working on Ubuntu 16.04LTS, but I think using Linux Mint 18.2 Sonya will work as well:

 

- Download and install SDSoC 2017.1 from here

- Install all packages listed in pages 16 and 18 of UG1238

- Download and install Linaro GCC 4.9-2014.09 and all its dependencies, which are pretty much the same you need to compile PetaLinux (pages 9 and 10 of UG1144). I actually ran the ./configure script and installed all packages Linaro says it needs, which are a bit less than the ones listed in UG1144.

 

Good luck! And thanks @arpansur for your help!

 

Cerilet

4 Replies
Moderator
Moderator
4,098 Views
Registered: ‎07-01-2015

Re: Problem when compiling a hardware function in SDSoC in Linux

Jump to solution

Hi @cerilet,

 

  1. Was the design working with windows after moving function to PL?
  2. If so can you please try first compiling in Linux without moving to PL?
  3. If 2 passes then add the function to accelerator.
  4. If 3 passes then try compiling the function standalone in HLS and see if you are able to do so.
  5. Also try with supported OS once.

 

Thanks,
Arpan
----------------------------------------------------------------------------------------------
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
4,060 Views
Registered: ‎08-26-2014

Re: Problem when compiling a hardware function in SDSoC in Linux

Jump to solution

Thanks @arpansur for you reply,

 

  1. Yes, the design was working with windows before and after moving the function to PL
  2. It actually compiles in Linux without moving the function to PL
  3. Here is where I get stuck
  4. The function complies in HLS without any major problem
  5. I installed Ubuntu and I get now other errors

Actually, I did not install all the packages needed. I found a complete list in pages 16 and 18 of UG1238. My colleague could ran the code with another machine running Ubuntu 16.04 LTS. I installed Ubuntu as well along with all the packages but now I am getting these errors:

 

[...]
Link application ELF file
/home/sdf/xilinx/projects/MMC/Debug/_sds/est/main.o: In function `MMC_circuit(double*, double*, double*, double*)':
/home/sdf/xilinx/projects/MMC/Debug/_sds/est/main.cpp:342: undefined reference to `_sds_sw_MMC_circuit'
make: *** [MMC.elf] Error 1
[...]

Does anyone have a clue where this problem can come from?

 

 

 

0 Kudos
Moderator
Moderator
4,041 Views
Registered: ‎07-01-2015

Re: Problem when compiling a hardware function in SDSoC in Linux

Jump to solution

Hi @cerilet,

 

Are you able to run the standard templates?

Which version of the tool it is?

Thanks,
Arpan
----------------------------------------------------------------------------------------------
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
6,952 Views
Registered: ‎08-26-2014

Re: Problem when compiling a hardware function in SDSoC in Linux

Jump to solution

I finally got it working. I will try to explain here what I have done to get SDSoC 2017.1 working on Ubuntu 16.04LTS, but I think using Linux Mint 18.2 Sonya will work as well:

 

- Download and install SDSoC 2017.1 from here

- Install all packages listed in pages 16 and 18 of UG1238

- Download and install Linaro GCC 4.9-2014.09 and all its dependencies, which are pretty much the same you need to compile PetaLinux (pages 9 and 10 of UG1144). I actually ran the ./configure script and installed all packages Linaro says it needs, which are a bit less than the ones listed in UG1144.

 

Good luck! And thanks @arpansur for your help!

 

Cerilet