Notifications
Clear all

Error of building C program in Catapult Studio with CMake

 

(@Anonymous 15026)
New Member Guest
Joined: 1 year ago
Posts: 4
Topic starter  

I am following the instructions of chapter 5 of the "RVfpga_GettingStartedGuide_NexysA7-DDR". I tried to build the LED_Switches_c_lang.c program. The error is strange with some test program. Could anyone help solve this problem? Many thanks.

2024 06 17 17 57 22 CMakeTestCCompiler.cmake LedsSwitches C Lang Visual Studio Code

 


   
QuoteSolved
dchaver
(@dchaver)
Member Admin
Joined: 4 years ago
Posts: 92
 

Hello,

I'll run the same program but I'd like to exactly replicate your situation. Can you give me more details such as the Operating System that you are using, the Catapult version that you've installed, if you are using the EL2 or the EH1 core, etc.?

Thanks


   
ReplyQuote
(@nannan)
New Member
Joined: 4 weeks ago
Posts: 2
 

@dchaver Thanks for the quick reply. I am using the Windows 10, Catapult SDK 2024.1.0, and EL2 core. cmake version is 3.267.6. 

I fixed the error by adding the following line in the MakeLists.txt file. If you would suggest other solutions, please do let me know. Thanks a lot. 

set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY"
2024 06 18 12 14 43 CMakeLists.txt LedsSwitches C Lang Visual Studio Code

But I have a new error as below. I searched this error on google, some people say that this is cmake version error. Could you please help on solving this problem? Many thanks,

[cmake] CMake Error at C:/RVfpga/RVfpgaEL2/RVfpga_NexysA7-DDR/common/Common.cmake:42 (get_filename_component):
[cmake]   get_filename_component called with incorrect number of arguments
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:19 (include)
2024 06 18 12 25 01 Common.cmake LedsSwitches C Lang Visual Studio Code

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

Hello again,

Catapult v2024 has introduced some changes which are giving some problems when used with RVfpga. There is another topic where we held a long discussion about Catapult new versions: https://university.imgtec.com/forums/rvfpga/new-user-requesting-help/

Can you take a look at that topic?

As you'll see there, our final suggestion is to "only use Catapult v1.X.X for now (for example v1.9.1, which can be downloaded here:  https://github.com/imgtec-riscv/catapult-sdk/releases/tag/v1.9.1  )."

Let us know if you can resolve the problems or you need more help.

Best regards

Dani


   
ReplyQuote
(@nannan)
New Member
Joined: 4 weeks ago
Posts: 2
 

@dchaver Thank you much. I changed to v1.9.1 and used the catapult studio included.  I could finish the GSG. My request has been solved. Thanks again.


   
ReplyQuote