Forum Discussion

MathiasB's avatar
MathiasB
Icon for Occasional Contributor rankOccasional Contributor
5 years ago
Solved

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)...
  • MathiasB's avatar
    MathiasB
    5 years ago

    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.