HLS Compiler (Prime 17.1): change GCC version in use
Hi everyone,
I am trying to compile a C-written component to RTL with HLS Compiler Prime Standard in version 17.1.0.
I can call g++ directly to compile the C file for simulation (this works fine), but I must use i++ itself to compile it for my target architecture (MAX10 in this case).
I tried: $ i++ -march="MAX 10" calibration_hls.c
The problem is that i++ includes files from gcc/g++ 4.8.5 and the build fails. As 4.8.5 as not a supported version, I am trying to use 4.4.7 which is also installed on my workstation.
However I cannot have i++ to refer to the correct GCC version. I have tried aliases and setting CC and CXX variables at the beginning of my command, but none worked. The only thing that made a difference was the following:
$ i++ -I /usr/include/c++/4.4.7 -march="MAX 10" calibration_hls.c
This, however, also fails, but in a different way.
Does anyone know a solution to this?
Please consider that I am using Prime Standard so I do not have access to the switch --gcc-toolchain and that I do not have root rights on the workstation (which runs CentOS 7).
I attached two files to this message. i++Cmdresult.txt is the output of my first command, the other file is the output of the second command.
Thank you very much!
Hi,
Thank you for your answer.
I am afraid I can't do as you suggest, because this version of gcc is useful for other people on the workstation.
However, this gave me an idea that I think is successful. At least I can obtain a "a.prj" directory, seemingly populated. Since I am a complete beginner in HLS, I can't say if everything worked fine.
What I did is the following :
I copied gcc and g++ executables from /usr/bin to ~/bin/ (a new, personal directory). I then added this directory to the beginning of my $PATH variable.
Then I wrote a small TCL script to find what are the necessary include directories for gcc/g++ 4.4.7.
I can then run :
$ i++ `./includes.tcl` -march="MAX 10" --fpga-only calibration_hls.c
This does the trick.
I will continue with this for a bit to see if no new problem emerge, so I leave the topic opened until then.
Regards.
PS: .tcl files are not supported, so I zipped it before attaching it.