Forum Discussion
Hi Thierry
Sorry, it took some time to get Quartus 24.3.1 installed in Windows. I did some testing in Windows
Test 1: If I tried to build the project from Riscfree when I opened this just by doing a double-click on the Riscfree.exe file, the build fails, reporting this:
Regardless of this, I see that the hello.elf file is created.
Test2: If I opened RiscFree from a CMD window in which I initialized the Nios V Shell ( C:\intelFPGA_pro\23.4\riscfree\RiscFree\Riscfree.exe), I was able to build the project successfully.
In both cases, I don't see the progress capture in the Console in which you observe the gmake command. The only text that I saw in these 2 tests is the following:
20:41:07 Buildscript generation: app::Debug in C:\NiosVRiscFree_Test\soft2\app\build\Debug
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON -G "Unix Makefiles" "C:\\NiosVRiscFree_Test\\soft2\\app"
-- The ASM compiler identification is GNU
-- Found assembler: C:/intelFPGA_pro/23.4/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-gcc.exe
-- The C compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/intelFPGA_pro/23.4/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 12.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/intelFPGA_pro/23.4/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (9.4s)
-- Generating done (0.1s)
-- Build files have been written to: C:/NiosVRiscFree_Test/soft2/app/build/Debug
20:41:17 Buildscript generation finished (took 9939 ms)
I did some additional test to see if in any of them I could see the progress capture to try to see if I can see what gmake uses. From several attemps I was able to do it:
1) In a CMD window enter into the niosv shell: C:\intelFPGA_pro\23.4\niosv\bin\niosv-shell.exe
2) In this CMD window, run the cmake command: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -B soft2/app/debug -S soft2/app
3) Open RiscFree by double-clicking on the .exe file (not under the niosV shell) and create the C/C++ Cmake project as indicated in the Macnica application note.
4) In Riscfree, build the project. In this case, I see that this fails with the error seen in Test1 above. Close RiscFree.
5) In this CMD window in which the niosv shell is running, open RiscFree using the same workspace used when the project was created.
6) Build this project again. This time the build succeds and now it shows the progress capture as shown next:
17:55:33 **** Incremental Build of configuration Debug for project app ****
"C:\\intelFPGA_pro\\23.4\\riscfree\\build_tools\\bin\\make.exe" -j all
[ 1%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_log_macro.S.obj
[ 3%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/crt0.S.obj
[ 3%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_mcount.S.obj
[ 4%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/machine_trap.S.obj
:
[ 96%] Building C object CMakeFiles/hello.elf.dir/hello.c.obj
[ 97%] Linking C executable hello.elf
[ 97%] Built target hello.elf
[ 98%] Creating hello.elf.objdump.
[100%] Reporting memory available for stack + heap in hello.elf.
[100%] Built target create-objdump
hello.elf
* 124.44 KB - Program size (code + initialized data).
* 24.36 KB - Free for stack + heap.
[100%] Built target niosv-stack-report
Here I can see that it uses the make.exe that is included as part of the RiscFree installation at C:\intelFPGA_pro\23.4\riscfree\build_tools\\bin\\make.exe
Repeating this in Linux, I see that it uses /usr/bin/gmake. I am guessing that perhaps it tries to find gmake and in case it doesn't exist it goes to find make. In Windows I don't have gmake so, perhaps it uses the make included in Riscfree.
I think that you can try to remove the Matlab path from the Windows corresponding $PATH environment and see if this time it uses the make from the RiscFree installation.
Hope these experiments could be helpful.
Thanks
Rolando
Hi Rolando,
yes, you're right. When the path to Matlab is removed, I can compile with make instead of gmake.
I wonder if compiling with gmake is problematic since it is used in Linux systems? This is to avoid having to manage environment variables every time I need Risfree or Matlab.
One last question: are you getting the same warnings "File '/app/build/Debug/compile_commands.json' was not created in the build. Your workbench will not know all include paths and preprocessor defines." (my post 07-08-2025)?
Thank you for your help and thorough testing.
Regards,
Thierry
- RolandoS_Altera5 months ago
Occasional Contributor
Hi Thierry
Yes, I also see these warnings after I create the project with Riscfree:
Let me ask around about the issue of using gmake vs make. Not really sure if it's true that it tries by default using gmake instead of make.
Thanks
Rolando