ulp riscv example not building

bittnert
Posts: 5
Joined: Mon Feb 01, 2021 7:40 pm

ulp riscv example not building

Postby bittnert » Mon Feb 01, 2021 8:04 pm

Hi,

I would like to write a program for my ESP32s2 for the RISC-V ulp. I installed the ESP IDF following the documentation here: https://docs.espressif.com/projects/esp ... index.html

I also tried to compile the hello world example which works fine. Then I tried to compile the ulp_riscv example. But unfortunately this fails with the following error message:
❯ idf.py app
Executing action: app
Running make in directory /home/thomas/esp/ulp_riscv/build
Executing "make -j 26 app"...
[ 1%] Performing build step for 'ulp_main'
[ 1%] Built target esp32s2_linker_script
[ 1%] Built target custom_bundle
[ 2%] Built target _project_elf_src
[ 2%] Built target __idf_ulp
[ 9%] Generating /home/thomas/esp/esp-idf/components/ulp/ulp_riscv/ulp_riscv_utils.c
make[7]: cmake: Permission denied
make[7]: *** [CMakeFiles/ulp_main.dir/build.make:89: /home/thomas/esp/esp-idf/components/ulp/ulp_riscv/ulp_riscv_utils.c] Error 127
make[7]: *** Waiting for unfinished jobs....
[ 27%] Generating /home/thomas/esp/esp-idf/components/ulp/ulp_riscv/start.S
[ 27%] Generating /home/thomas/esp/ulp_riscv/main/ulp/main.c
make[7]: cmake: Permission denied
make[7]: *** [CMakeFiles/ulp_main.dir/build.make:85: /home/thomas/esp/esp-idf/components/ulp/ulp_riscv/start.S] Error 127
make[7]: cmake: Permission denied
make[7]: *** [CMakeFiles/ulp_main.dir/build.make:81: /home/thomas/esp/ulp_riscv/main/ulp/main.c] Error 127
make[6]: *** [CMakeFiles/Makefile2:96: CMakeFiles/ulp_main.dir/all] Error 2
make[5]: *** [CMakeFiles/Makefile2:131: CMakeFiles/build.dir/rule] Error 2
make[4]: *** [Makefile:150: build] Error 2
make[3]: *** [esp-idf/main/CMakeFiles/ulp_main.dir/build.make:130: esp-idf/main/ulp_main-prefix/src/ulp_main-stamp/ulp_main-build] Error 2
make[2]: *** [CMakeFiles/Makefile2:4991: esp-idf/main/CMakeFiles/ulp_main.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 2%] Built target __idf_esp_serial_slave_link
make[1]: *** [CMakeFiles/Makefile2:2229: CMakeFiles/app.dir/rule] Error 2
make: *** [Makefile:313: app] Error 2
make failed with exit code 2
I have some experience working with GNU Make, unfortunately cmake I'm not very experienced.

I think I was able to figure out the following thing. Error 127 as mentioned means that some thing was not found (might be the riscv compiler as this only happens for riscv example).

I checked and there is a riscv compiler (riscv32-esp-elf) in ~/.espressif/tools available and it is in my PATH variable.

Additionally, I get the error "cmake: Permission denied" so I checked the ownership of the source files and the tools but it all checks out.

Unfortunately I was unable to find any information what triggers the "permission denied" error.

Now my questions:
Does anyone have any idea what exactly could go wrong?
Is there a way to activate a verbose mode in the build process to get more information what exactly is triggering this issue?

I'm thankfull for any help.
BR
Thomas

ESP_Sprite
Posts: 9582
Joined: Thu Nov 26, 2015 4:08 am

Re: ulp riscv example not building

Postby ESP_Sprite » Tue Feb 02, 2021 1:29 am

Code: Select all

[ 9%] Generating /home/thomas/esp/esp-idf/components/ulp/ulp_riscv/ulp_riscv_utils.c
make[7]: cmake: Permission denied
Did you perhaps check out esp-idf as root?

bittnert
Posts: 5
Joined: Mon Feb 01, 2021 7:40 pm

Re: ulp riscv example not building

Postby bittnert » Tue Feb 02, 2021 5:35 pm

Thank you for your response.

No I did checkout the esp-idf using my user. To be sure I ran chown -R with my user and group on my whole home directory. Unfortunately, this did not fix the problem.

What I also realized is:
make[7]: cmake: Permission denied
make[7]: *** [CMakeFiles/ulp_main.dir/build.make:81: /home/thomas/esp/ulp_riscv/main/ulp/main.c] Error 127
The file mentioned here "CMakeFiles/ulp_main.dir/build.make" in my opinion should be found in the "build" folder. Unfortunately, this make file does not exist there which might point the problem. Is it possible the file was not created?

BR
Thomas

ESP_Sprite
Posts: 9582
Joined: Thu Nov 26, 2015 4:08 am

Re: ulp riscv example not building

Postby ESP_Sprite » Wed Feb 03, 2021 2:09 am

Interesting... what OS are you running? Can you create that file yourself?

I think some files are generated in the ESP-IDF directory as they're not dependent on any project configuration and only need to be generated once.

bittnert
Posts: 5
Joined: Mon Feb 01, 2021 7:40 pm

Re: ulp riscv example not building

Postby bittnert » Thu Feb 04, 2021 5:46 pm

Hi,

I'm running Archlinux.

I can create the file my self but I don't know what input is needed.

Fortunately, I found a way to build the software.

I downloaded the ESP IDF docker container and I'm able now to build and flash the firmware using this docker container.

Thank you to everyone for their help.

BR
Thomas

getvobot
Posts: 3
Joined: Sun Dec 08, 2019 7:45 am

Re: ulp riscv example not building

Postby getvobot » Thu Jul 08, 2021 11:31 am

exact the same problem here.

It used to be OK, however the ULP RISC-V example is unable to build today.

Who is online

Users browsing this forum: Google [Bot] and 270 guests