From 1be480576d09736bb842f1cdb14d4e2fbfa0e072 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 15 Aug 2023 13:54:13 +0200 Subject: [PATCH] updates launch config and FW build --- .cproject | 3 +- CMakeLists.txt | 19 +++++++--- .../TGC-VP interp dhrystone.launch | 35 +++++++++++++++++++ ...terp.launch => TGC-VP interp hello.launch} | 0 .../TGC-VP tcc dhrystone.launch | 35 +++++++++++++++++++ ...-VP tcc.launch => TGC-VP tcc hello.launch} | 0 6 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 contrib/eclipse_launch/TGC-VP interp dhrystone.launch rename contrib/eclipse_launch/{TGC-VP interp.launch => TGC-VP interp hello.launch} (100%) create mode 100644 contrib/eclipse_launch/TGC-VP tcc dhrystone.launch rename contrib/eclipse_launch/{TGC-VP tcc.launch => TGC-VP tcc hello.launch} (100%) diff --git a/.cproject b/.cproject index f59de53..1382e75 100644 --- a/.cproject +++ b/.cproject @@ -46,11 +46,12 @@ - + + diff --git a/CMakeLists.txt b/CMakeLists.txt index f8b6c58..958d1a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(ecosystem-vp LANGUAGES C CXX VERSION 1.0.0) option(ENABLE_SCV "Enable the use of SCV" ON) option(LIBS_ONLY "Just build the shared libraries needed to build the VP" OFF) -option(FW_BUILD "Enable the automatic rebuild of firmware running on the VP" OFF) +option(FW_BUILD "Enable the automatic download and build of some firmware to run on the VP" OFF) option(EN_EXT_DEBUG "Enable extended debug output at runtime" OFF) option(ENABLE_COVERAGE "Enable code coverage" OFF) option(ENABLE_SANITIZER "Enable address sanitizer" OFF) @@ -77,7 +77,7 @@ set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") list(APPEND CONAN_PACKAGE_LIST seasocks/1.4.4 tcc/0.9.27) list(APPEND CONAN_PACKAGE_OPTIONS lua:compile_as_cpp=False ) - set(WITH_TCC ON) + option(WITH_TCC "Build TCC backend" ON) endif() if(WITH_LLVM) list(APPEND CONAN_PACKAGE_LIST llvm-core/13.0.0) @@ -167,9 +167,20 @@ endif() if(NOT LIBS_ONLY) add_subdirectory(src) endif() + if(FW_BUILD) - add_custom_target(fw-hello-world ALL COMMAND make -C fw/hello-world - USES_TERMINAL WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + include(FetchContent) + set(FETCHCONTENT_BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}/..) + FetchContent_Declare( + riscvfw + GIT_REPOSITORY https://git.minres.com/VP/Firmwares.git + GIT_TAG main + ) + FetchContent_GetProperties(riscvfw) + if(NOT riscvfw_POPULATED) + FetchContent_Populate(riscvfw) + add_subdirectory(${riscvfw_SOURCE_DIR}) + endif() endif() # CTest is a testing tool that can be used to test your project. diff --git a/contrib/eclipse_launch/TGC-VP interp dhrystone.launch b/contrib/eclipse_launch/TGC-VP interp dhrystone.launch new file mode 100644 index 0000000..a1bc0d0 --- /dev/null +++ b/contrib/eclipse_launch/TGC-VP interp dhrystone.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/eclipse_launch/TGC-VP interp.launch b/contrib/eclipse_launch/TGC-VP interp hello.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP interp.launch rename to contrib/eclipse_launch/TGC-VP interp hello.launch diff --git a/contrib/eclipse_launch/TGC-VP tcc dhrystone.launch b/contrib/eclipse_launch/TGC-VP tcc dhrystone.launch new file mode 100644 index 0000000..1c02e04 --- /dev/null +++ b/contrib/eclipse_launch/TGC-VP tcc dhrystone.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/eclipse_launch/TGC-VP tcc.launch b/contrib/eclipse_launch/TGC-VP tcc hello.launch similarity index 100% rename from contrib/eclipse_launch/TGC-VP tcc.launch rename to contrib/eclipse_launch/TGC-VP tcc hello.launch