Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit SOURCE to run-helloworld target #412

Closed
wants to merge 1 commit into from

Conversation

StMiky
Copy link
Contributor

@StMiky StMiky commented Oct 18, 2023

Description

This change prevents the application build process from entering a recursive loop where infinite file descriptors are opened on the host system, eventually resulting in a build failure (see #411).

Only the "all-in-one" targets are affected (run-helloworld and run-blinkfreertos), and only when launched on a clean clone of X-HEEP. Building the same applications with make app PROJECT=... works as expected.

- sove CMake recursion deadlock when launching the target
@JuanSapriza
Copy link
Contributor

Replicated the issue by

make clean-all
make verilator-sim
make  run-helloworld
# gets stuck
make app PROJECT=hello_world
# makes succefully
make run-helloworld
# makes and run successfully. 

However, after that, once I made make run-helloworld i get the full simulation model build and never again the issue. Therefore, i wouldn't be able to tell if the issue was solved in the PR :(
I did see after switching to the PR that WHEN running make run-blinkyfreertos, after the simulation model building I get an error that seems to be related to not getting the source. However, not adding the SOURCE should be an issue, because downstream the default path would be grabbed, if im not wrong.

@StMiky is it possible that the fix worked for you because you had previously tried making make app PROJECT=...?

@JuanSapriza
Copy link
Contributor

I just make clean-all in the PR and get stuck here

INFO: Setting up project
INFO: Building simulation model

make -C sw PROJECT=blinky_freertos TARGET=sim LINKER=on_chip COMPILER=gcc COMPILER_PREFIX=riscv32-unknown- ARCH=rv32imc SOURCE=./sw/;
make[1]: Entering directory '/home/juan/Desktop/ESL/0_x-heep/sw'
$You are executing from: /home/juan/Desktop/ESL/0_x-heep/sw
$You are fetching sources from  
if [ ! -d build ] ; then mkdir build ; fi
cd build;  \
	cmake \
	    -G "Unix Makefiles" \
		-DCMAKE_TOOLCHAIN_FILE=../cmake/riscv.cmake \
		-DROOT_PROJECT=/home/juan/Desktop/ESL/0_x-heep/sw/ \
		-DSOURCE_PATH=/ \
		-DTARGET=sim \
		-DPROJECT:STRING=blinky_freertos \
		-DRISCV:STRING=/home/juan/tools/riscv \
		-DINC_FOLDERS:STRING=/home/juan/Desktop/ESL/0_x-heep/sw/device/target/sim/ \
		-DLINK_FOLDER:STRING=/home/juan/Desktop/ESL/0_x-heep/sw/linker \
		-DLINKER:STRING=on_chip \
		-DCOMPILER:STRING=gcc \
		-DCOMPILER_PREFIX:STRING=riscv32-unknown- \
	    ../ 
-- The ASM compiler identification is GNU
-- Found assembler: /home/juan/tools/riscv/bin/riscv32-unknown-elf-gcc
-- The C compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/juan/tools/riscv/bin/riscv32-unknown-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done

@JoseCalero JoseCalero closed this Oct 27, 2023
@JoseCalero JoseCalero mentioned this pull request Oct 27, 2023
@StMiky StMiky deleted the fix-run-targets branch March 6, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants