Forum Discussion
DE1-SOC 'My_First_HPS' -- Hello World!
Hi,
I have made my way through 'My_First_HPS' tutorial targeting the DE1-SOC board. However, when I execute the downloaded my_first_hps executable on my DE1-SOC board, instead of seeing the 'Hello Word!' printed I see 'Killed' printed. I assume the executable is being prevented from running. On the other hand, I am more a FPGA developer than a software/embedded person. Can someone possible explain why this is happening and how I should go about resolving it?
Thank you.
16 Replies
- tehjingy_Altera
Regular Contributor
Hi
From the looks of it you have successfully boot into the linux environment.
The error message that you are looking at means that the "hello world" application crashed when the application launches.
It means that the application itself is faulty, there are multiple factors that could cause this.
I would not be alarm at this as the hello world is just a simple program in to print something in the linux environment, it does not indicate that there are something wrong with the board it self.
May I ask what is the end goal that you are looking at?
Regards
Jingyang, Teh
- KAT1
New Contributor
Hi,
Thank you for your response. My end goal is to become familiarized with writing and compiling my own application to run on the DE1-SOC board. I am starting from my_first_hps tutorial as way to setup all the tools and work my way through running the first application on the DE1-SOC board. Although I am not concerned with any hardware related issue as the source of the problem, I am trying to determine the reason why this simple program would be faulty, even though I have followed the steps from my_first_hps tutorial as closely as possible. Without resolving this issue, I assume I cannot complete any other tutorial or exercise that involves applications running on the HPS. Thus, why I am trying to get to the root cause of this application crash. Thank you.
- tehjingy_Altera
Regular Contributor
Hi
Did you meet any issue when running the make command on your host pc?
And did the application successfully copied over to the board?
Could you issue "ls -l" to check the size of the application on the board?
Regards
Jingyang, Teh
- KAT1
New Contributor
Hi,
Please see my response below to your question.
Did you meet any issue when running the make command on your host pc?
answer: No. The following was displayed when I ran the make command.
$ make
arm-eabi-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-eabi-gcc -g -Wall main.o -o my_first_hpsAnd did the application successfully copied over to the board?
answer: Yes. I could see the file when I did ls -l. See below.
root@socfpga:~# ls -l
-rwxrwxrwx 1 root root 248524 Sep 28 05:02 my_first_hpsCould you issue "ls -l" to check the size of the application on the board?
answer: see above. I did notice that in the My_First_HPS.pdf tutorial pdf, the file size shown in the screenshot on page 10 was showing the file size to be 6521.
- tehjingy_Altera
Regular Contributor
Hi
I see that the compiler that are using is not the cross compiler that was describ in the tutorial.
That could be the reason the application could not be run on the linux device.
Could you try using the describe cross compiler "arm-linux-gnueabihf".
Regards
Jingyang, Teh
- KAT1
New Contributor
Hi,
I did my best to follow the steps outlined in ug_soc_eds-683187-666301.pdf, section 2.3. Windows to install the SoC EDS tools and the cross compiler. In section 2.3.5 Installing Linaro Bare Metal Toolchain, I followed the instruction, and performed ./install_linaro.sh. In the Linaro folder, I have the following files and directories:
/c/intelfpga/20.1/embedded/host_tools/linaro
$ ls
gcc gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-eabi.tar.xz install_linaro.sh newlib newlib-cygwinHowever, after following these instructions to install the SoC tools, I could not successfully run the 'make' file as described in My_First_HPS.pdf, when using the arm-linux-gnueabihf-gcc cross compiler. I would get the following error:
$ make
arm-linux-gnueabihf-gcc -g -Wall main.o -o my_first_hps
process_begin: CreateProcess(NULL, arm-linux-gnueabihf-gcc -g -Wall main.o -o my_first_hps, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [my_first_hps] Error 2On the other hand, after modifying the make file to call out the arm-eabi-gcc cross compiler, then I could complete the compilation and generate the my_first_hps executable. See below:
$ make
arm-eabi-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-eabi-gcc -g -Wall main.o -o my_first_hpsHave I installed the SoC EDS tools incorrectly? Please advise on how I can get the tools installed correctly to use the intended arm-linux-gnueabihf-gcc cross compiler.
Thank you!
- tehjingy_Altera
Regular Contributor
Hi
Sorry for the late reply.
Could you try out the adding the compiler to the PATH variable so that it could find the correct compiler
After going into the gcc folder and entering the command below:
"export PATH=`pwd`/gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-eabi/bin:$PATH"
After that could you try the make file again.
Regards
Jingyang, Teh
- tehjingy_Altera
Regular Contributor
Hi
Are you able to launch the correct compiler after adding the path into the system environment?
Regards
Jingyang, Teh
- KAT1
New Contributor
Hi,
I tried entering the export path in the 'gcc' folder, but it indicated that the path cannot be found. Below see below.
C:\intelFPGA\20.1\embedded\host_tools\linaro\gcc>"export PATH=`pwd`/gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-eabi/bin:$PATH"
The system cannot find the path specified.And below are the sub-folders and files under the 'gcc' folder...
Directory of C:\intelFPGA\20.1\embedded\host_tools\linaro\gcc
12/04/2019 11:03 AM <DIR> .
02/22/2024 10:44 PM <DIR> ..
12/04/2019 11:03 AM <DIR> arm-eabi
12/04/2019 11:03 AM <DIR> bin
12/04/2019 11:03 AM 10,507 gcc-linaro-7.5.0-2019.12-win32-manifest.txt
12/04/2019 11:02 AM <DIR> include
12/04/2019 11:04 AM <DIR> lib
12/04/2019 10:53 AM <DIR> libexec
12/04/2019 11:02 AM <DIR> share
12/04/2019 09:45 AM <DIR> usr - tehjingy_Altera
Regular Contributor
Hi
Could you please try downloading the linaro toolchain with the command below:
tar xf gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz
rm gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz
export PATH=`pwd`/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/bin:$PATH
Once finish please try the make command again this time with
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-eabi-gcc -g -Wall main.o -o my_first_hps
instead of the the arm-eabi-gcc or arm-linux-gnueabihf-gcc
Regards
Jingyang, Teh
- KAT1
New Contributor
Hi,
I followed the instruction as indicated. And, below is the sub-directory that was created under the 'linaro' folder.
/cygdrive/c/intelFPGA/20.1/embedded/host_tools/linaro
$ ls
gcc install_linaro.sh
gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf newlib
gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-eabi.tar.xz newlib-cygwinHowever, when executing the 'make' command, I got the following error message:
$ 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
process_begin: CreateProcess(NULL, 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, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [main.o] Error 2Please advise. Thanks.
- KAT1
New Contributor
Hi,
FYI - I also tried renaming the /gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf subfolder to /gcc, and then tried running the make file. This time I got the following error message:
$ 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
process_begin: CreateProcess(C:\intelFPGA\20.1\embedded\host_tools\linaro\gcc\bin\arm-none-linux-gnueabihf-gcc, 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, ...) failed.
make (e=193): Error 193
make: *** [main.o] Error 193Hope this provides you more information as to what the problem may be.