From bf5d40e7ffb3609f7568eb6b80732c1cf67e3b02 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 18 Jul 2022 11:49:51 +0200 Subject: [PATCH] adds MSVC compatibility fixes --- .gitignore | 1 + CMakeLists.txt | 6 +++--- scc | 2 +- src/sc_main.cpp | 5 +++++ src/tgc_vp/tb.cpp | 2 ++ src/tgc_vp/tb.h | 2 ++ tgc-iss/dbt-rise-core | 2 +- tgc-iss/dbt-rise-tgc | 2 +- vpvper | 2 +- 9 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 1c4ca24..a5ce291 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /coverage.info /output.txt /output.trc +CMakeSettings.json diff --git a/CMakeLists.txt b/CMakeLists.txt index c8ddc8c..e8db919 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,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(NO_FW_BUILD "Disable the automatic rebuild of firmware running on the VP" OFF) +option(FW_BUILD "Enable the automatic rebuild of firmware running on the VP" ON) 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) @@ -79,7 +79,7 @@ conan_cmake_autodetect(settings) conan_install() # needed when using CentOS devenv-7 or -8 and boost does not build because of missing GLIBCXX version #conan_install(BUILD b2 missing) -find_package(tcc) +find_package(tcc QUIET) find_package(elfio) find_package(fmt) find_package(gsl-lite) @@ -123,7 +123,7 @@ endif() if(NOT LIBS_ONLY) add_subdirectory(src) endif() -if(NOT NO_FW_BUILD) +if(FW_BUILD) add_custom_target(fw-hello-world ALL COMMAND make -C fw/hello-world USES_TERMINAL WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endif() diff --git a/scc b/scc index 93a5676..bee44d8 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit 93a5676fec9c1cb851b6a9cd4c462142de6dc144 +Subproject commit bee44d83d0b86d71e4e191c7150332e34cc2dd56 diff --git a/src/sc_main.cpp b/src/sc_main.cpp index 967af21..f4fbab3 100644 --- a/src/sc_main.cpp +++ b/src/sc_main.cpp @@ -16,8 +16,13 @@ #include #include +#include #include #include +#ifdef ERROR +#undef ERROR +#endif + const std::string core_path{"tb.top.core_complex"}; using namespace sysc; diff --git a/src/tgc_vp/tb.cpp b/src/tgc_vp/tb.cpp index da2d0a6..dbacd2d 100644 --- a/src/tgc_vp/tb.cpp +++ b/src/tgc_vp/tb.cpp @@ -15,8 +15,10 @@ tb::tb(const sc_core::sc_module_name &nm): sc_core::sc_module(nm) { gpio_s[i].in(top.pins_o[i]); top.pins_i[i](gpio_s[i].out); } +#ifndef WIN32 // terminal terminal.tx_o(gpio_s[16].in); gpio_s[17].out(terminal.rx_i); +#endif } } diff --git a/src/tgc_vp/tb.h b/src/tgc_vp/tb.h index 764e8c9..062905f 100644 --- a/src/tgc_vp/tb.h +++ b/src/tgc_vp/tb.h @@ -21,7 +21,9 @@ public: tgc_vp::rst_gen rst_gen{"rst_gen"}; sc_core::sc_vector> gpio_s{"gpio_s", 32}; sc_core::sc_signal rst_n{"rst_n"}; +#ifndef WIN32 // Seasocks not available under windows vpvper::generic::terminal terminal{"terminal"}; +#endif }; } /* namespace tgc_vp */ diff --git a/tgc-iss/dbt-rise-core b/tgc-iss/dbt-rise-core index 44acf8a..159cabb 160000 --- a/tgc-iss/dbt-rise-core +++ b/tgc-iss/dbt-rise-core @@ -1 +1 @@ -Subproject commit 44acf8a55936d5eedb5daf8cae0799ec1616413f +Subproject commit 159cabb63cf2ac000a92ceb925da59369f5e8725 diff --git a/tgc-iss/dbt-rise-tgc b/tgc-iss/dbt-rise-tgc index c054d75..4876f18 160000 --- a/tgc-iss/dbt-rise-tgc +++ b/tgc-iss/dbt-rise-tgc @@ -1 +1 @@ -Subproject commit c054d75717dcefbc2048ab277fdfe1cb428640ef +Subproject commit 4876f18ba941f62176eeab8d902aaf7fa1211577 diff --git a/vpvper b/vpvper index 11e6dc5..74a5fff 160000 --- a/vpvper +++ b/vpvper @@ -1 +1 @@ -Subproject commit 11e6dc5926a4ee250dc1eb206c97445472049d80 +Subproject commit 74a5fffd1ac89e5db991f0d0e6305542583d4256