I want to use HPS on my FPGA Board. For this I started with the tutorial and examples like "my_first_hps".
The goal would have been, just like in the example, use my laptop (running on Windows 11) to code and compile everything and transfer it over to the FPGA to execute it.
Now this is where the problem starts.
I can compile my main.c without a problem by just doing "gcc main.c" in the ARM DS Command Prompt, the Embedded-Command-Shell with Cygwin or even on LXDE on the FPGA directly. But only when not using the libraries which are needed for more complex HPS tasks.
Since I want to use HPS and also use the HPS components (LED, ...) I thought it would be useful to do it the intended way, by using the Makefile, just like in the examples.
But as soon as I execute "make" in the cygwin shell it throws the make (e=2) error.
Just like this question and several others on the forum.
I have not found a fix yet, even though I tried almost everything I found online. However I found one question where this link appeared.
This documentation is of course way more detailed. I did EVERYTHING just like it is mentioned on the website.
The only difference is that I used the "free" option for ARM DS IDE since I would probably need more than 30 days for the things I want to do.
I also tried downloading the gcc toolchains separately and added them to Arm DS IDE since the arm-linux-... toolchain was not present in my IDE, which is of course the one I would need. Have I done something wrong while adding it? Do I have to add it to Cygwin somehow as well?
I have no idea how to fix the error.
I also reinstalled everything several times.
Could you please provide the following information?
1) Target FPGA SoC Device/Board
2) Quartus/SoC EDS Version
3) Host OS (Windows or Linux)
4) Boot device(SD-CARD or QSPI)
5) Are Preloader(SPL) and U-Boot up and running?
6) Target OS (Linux, Bare Metal or the other)
7) ARM DS Version
1) I am using the Intel Cyclone V DE10-Standard Board for the University Program
2) I am using Quartus Prime Lite Edition 21.1 and the SoC EDS Version 20.1
3) My Host OS is Windows 11
4) I am booting on the FPGA from a SD-Card
5) I am not able to come this far anyway so I have not tried it
6) The FPGA would run on LXDE and everything works fine
7) I tried the discontinued DS-5 Version and also installed the ARM DS 2021.1 Version
When for example going step by step by the provided PDFs for the FPGA (or provided online) like this one
then the error happens in Chapter 2.4 where they would compile their makefile. If I compile it with just "gcc main.c" it works fine and also works on the FPGA. But for using the HPS libraries (for my own project as well as the provided example projects) I would want to do it the intended way with the makefiles, which is not working due to the error like said before (make(e = 2): ...)
The whole error message (in german) is:
arm-linux-gnueabihf-gcc -g -Wall -D soc_cv_av -I C:/intelFPGA_lite/21.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -I C:/intelFPGA_lite/21.1/embedded/ip/altera/hps/altera_hps/hwlib/include/ -c main.c -o main.o
process_begin: CreateProcess(NULL, arm-linux-gnueabihf-gcc -g -Wall -D soc_cv_av -I C:/intelFPGA_lite/21.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -I C:/intelFPGA_lite/21.1/embedded/ip/altera/hps/altera_hps/hwlib/include/ -c main.c -o main.o, ...) failed.
make (e=2): Das System kann die angegebene Datei nicht finden.
make: *** [main.o] Error 2
Thank you for providing the information with us.
I have duplicated the issue at our site as below.
arm-linux-gnueabihfgcc -g -Wall -Dsoc_cv_av -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/ -c main.c -o main.o
process_begin: CreateProcess(NULL, arm-linux-gnueabihfgcc -g -Wall -Dsoc_cv_av -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/ -c main.c -o main.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [main.o] Error 2
So, I'm investigating the issue.
I’d like to confirm your target application just in case.
Do you want to compile a Linux Application on Windows?
If so, please see the steps below.
2) Extract the tool to your specific folder.
3) Add the bin path to Path variable in “Edit the system environment variables”.
In my case, I installed the tools into C:\tools so actual path is:
4) Update CROSS_COMPILE in Makefile as below.
CROSS_COMPILE = arm-none-linux-gnueabihf-
Here is actual log.
yoshiaki@yoshiaki-mobl1 /cygdrive/c/workspace/hps/my_first_hps $ make arm-none-linux-gnueabihf-gcc -g -Wall -Dsoc_cv_av -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -IC:/intelFPGA/20.1/embedded/ip/altera/hps/altera_hps/hwlib/include/ -c main.c -o main.o arm-none-linux-gnueabihf-gcc -g -Wall main.o -o my_first_hps
Lastly, the hwlibs is for bare metal application, not Linux. See a link below for more details.
Hardware Library (HWLibs)
Thank you for the detailed answer. I was and am currently not able to be online a lot. I will try your posted solution as soon as possible and if it works accept the solution.
Thank you very much in advance.
I have already transitioned this thread to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread.