Notifications
Clear all

RVfpgaSOC Lab5 cmake error

 

(@plc330)
Active Member
Joined: 2 years ago
Posts: 4
Topic starter  

I encountered the following issue while working on RVfpgaSOC Lab5 when I ran the command make -f tensorflow/lite/micro/tools/make/Makefile TARGET=zephyr_swervolf BUILD_TYPE=debug hello_world_bin as instructed in the guide:

Build flags:
make VERBOSE=1 [targets] verbose build
cmake -DW=n Enable extra gcc checks, n=1,2,3 where
1: warnings which may be relevant and do not occur too often
2: warnings which occur quite often but may still be relevant
3: more obscure warnings, can most likely be ignored
Multiple levels can be combined with W=12 or W=123
CMake Error at /home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/zephyr/cmake/app/boilerplate.cmake:415 (message):
Invalid usage
Call Stack (most recent call first):
CMakeLists.txt:2 (include)

-- Configuring incomplete, errors occurred!
See also "/home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow/tensorflow/lite/micro/tools/make/gen/zephyr_swervolf_x86_64_debug/hello_world/build/CMakeFiles/CMakeOutput.log".
make[1]: Entering directory "/home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow/tensorflow/lite/micro/tools/make/gen/zephyr_swervolf_x86_64_debug/hello_world/build"
make[1]: No targets specified and no makefile found. Stop.
make[1]: Leaving directory "/home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow/tensorflow/lite/micro/tools/make/gen/zephyr_swervolf_x86_64_debug/hello_world/build"
tensorflow/lite/micro/examples/hello_world/zephyr_riscv/Makefile.inc:52: recipe for target 'hello_world_bin' failed
make:
[hello_world_bin] Error 2

My environment variables are set correctly.Could someone help me identify what went wrong here?


   
Quote
Topic Tags
(@zubairlk)
Member Admin
Joined: 4 years ago
Posts: 11
 

Hi,

Did you check out the exact versions specified in the document?

For everything, swervolf, zephyr SDK, tensorflow etc


   
ReplyQuote
(@plc330)
Active Member
Joined: 2 years ago
Posts: 4
Topic starter  

@zubairlk 

I have now resolved the above issue, mainly because SweRVolf has been renamed to VeeRwolf, which affected Lab 3, 4, and 5 in the RVfpgaSoC series. This means that in Lab 3, the command fusesoc library add swervolf https://github.com/chipsalliance/Cores-SweRVolf used to add the repository should now reflect the file swervolf.core in the $WORKSPACE/fusesoc_libraries/swervolf path being renamed to veerwolf.core. To run simulation builds using fusesoc, the command in the experiment guide fusesoc run --target=sim swervolf should be changed to fusesoc run --target=sim veerwolf. Similarly, in experiment 5, the board target swervolf_nexys specified in the Makefile.inc file should be changed to veerwolf_nexys. This resolves the issues mentioned above.

Following this, when I run the command make -f tensorflow/lite/micro/tools/make/Makefile TARGET=zephyr_swervolf BUILD_TYPE=debug hello_world_bin -j 16, I encounter an error indicating that the veerwolf_nexys board target requires Zephyr SDK version 0.13.1 or above, whereas the experiment guide provides Zephyr SDK version 0.12.4, which is a mismatch. The renaming of SweRVolf to VeeRwolf renders the RVfpgaSoC experiment guide completely outdated.

After downloading Zephyr SDK 0.13.1 myself, the above issues were essentially resolved. However, I encountered a new problem:

(venv-zephyr) plc330@ubuntu:~/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow$ make -f tensorflow/lite/micro/tools/make/Makefile TARGET=zephyr_swervolf BUILD_TYPE=debug hello_world_bin -j 16
tensorflow/lite/micro/tools/make/downloads/flatbuffers already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/pigweed already exists, skipping the download.
[Execution process here...]
In file included from /home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow/tensorflow/lite/micro/tools/make/gen/zephyr_swervolf_x86_64_debug/prj/hello_world/cmake/./tensorflow/lite/micro/simple_memory_allocator.h:23,
from /home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow/tensorflow/lite/micro/tools/make/gen/zephyr_swervolf_x86_64_debug/prj/hello_world/cmake/tensorflow/lite/micro/simple_memory_allocator.cc:16:
/home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow/tensorflow/lite/micro/tools/make/gen/zephyr_swervolf_x86_64_debug/prj/hello_world/cmake/./tensorflow/lite/core/api/error_reporter.h:18:10: fatal error: cstdarg: No such file or directory
18 | #include <cstdarg>
| ^~~~~~~~~
compilation terminated.
[Further build messages...]

 

I already updated the contents of CMakeLists.txt in the path tensorflow/tensorflow/lite/micro/tools/make/gen/zephyr_swervolf_x86_64_debug/prj/hello_world/cmake/ from:

target_include_directories(app PRIVATE . third_party/gemmlowp third_party/flatbuffers/include third_party/ruy third_party/kissfft /home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow /riscv64-zephyr-elf/riscv64-zephyr-elf/include/c++/9.2.0 /riscv64-zephyr-elf/riscv64-zephyr-elf/include /riscv64-zephyr-elf/riscv64-zephyr-elf/include/c++/9.2.0/riscv64-zephyr-elf/rv32i/ilp32 )

to reflect the changes in the new Zephyr SDK 0.13.1:

target_include_directories(app PRIVATE . third_party/gemmlowp third_party/flatbuffers/include third_party/ruy third_party/kissfft /home/plc330/RVfpgaSoC/Labs/LabProjects/SweRVolf/tensorflow /riscv64-zephyr-elf/riscv64-zephyr-elf/include/c++/10.3.0 /riscv64-zephyr-elf/riscv64-zephyr-elf/include /riscv64-zephyr-elf/riscv64-zephyr-elf/include/c++/10.3.0/riscv64-zephyr-elf/rv32im/ilp32 )

 

But the above error is still encountered.

This post was modified 8 months ago by plc330

   
ReplyQuote
(@zubairlk)
Member Admin
Joined: 4 years ago
Posts: 11
 
 
I'm afraid it is quite hard for us to provide guidance in such situations.
 
The educational materials have been built & tested to work with the specific versions explicitly mentioned in guides.
 
Our suggestion is to download & use a clean new set of versions of the exact zephyr/tensorflow/svervolf available.
 
Alternatively, if a suitable solution is found, we really appreciate a detailed blog post on the versions that worked alongside the key changes that were made
 
 
Thanks
Zubair

   
ReplyQuote
(@samuelgebsons)
New Member
Joined: 7 months ago
Posts: 1
 

After downloading Zephyr SDK 0.13.1 myself, the above issues were essentially resolved. However, I encountered a new problem:


   
ReplyQuote
dchaver
(@dchaver)
Member Admin
Joined: 4 years ago
Posts: 95
 

Hi @samuelgebsons,

Can you provide more information about the new problem? Something like screenshots, the output of your terminal, etc.

Thanks

Best regards

Dani


   
ReplyQuote