From 4d0adcb0159a2f82a108b47444cd10ced2535666 Mon Sep 17 00:00:00 2001 From: sksat Date: Thu, 12 Oct 2023 21:40:01 +0900 Subject: [PATCH 1/5] CMake: USE_SILS_MOCKUP -> C2A_BUILD_WITH_SILS_MOCKUP --- examples/mobc/CMakeLists.txt | 6 +++--- examples/mobc/src/src_user/hal/CMakeLists.txt | 2 +- examples/subobc/CMakeLists.txt | 6 +++--- examples/subobc/src/src_user/hal/CMakeLists.txt | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/mobc/CMakeLists.txt b/examples/mobc/CMakeLists.txt index 5011d7287..881e133ef 100644 --- a/examples/mobc/CMakeLists.txt +++ b/examples/mobc/CMakeLists.txt @@ -16,11 +16,11 @@ option(USE_SCI_COM_WINGS "Use SCI_COM_WINGS" ON) # そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること! option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF) -option(USE_SILS_MOCKUP "Use SILS mockup for build C2A with minimal user in C89 only" OFF) +option(C2A_BUILD_WITH_SILS_MOCKUP "Build C2A with SILS mockup for check undefined symbols by build minimal C2A user executable(C89 only)" OFF) option(C2A_BUILD_FOR_SILS "Build C2A for SILS target" ON) -if(USE_SILS_MOCKUP) +if(C2A_BUILD_WITH_SILS_MOCKUP) set(C2A_BUILD_AS_CXX OFF) endif() @@ -74,7 +74,7 @@ if(C2A_BUILD_AS_CXX) set_source_files_properties(${C2A_SRCS} PROPERTIES LANGUAGE CXX) # C++ endif() -if(USE_SILS_MOCKUP) +if(C2A_BUILD_WITH_SILS_MOCKUP) add_definitions(-DDEFINE_MAIN_ON_SILS) add_executable(${PROJECT_NAME} ${C2A_SRCS}) else() diff --git a/examples/mobc/src/src_user/hal/CMakeLists.txt b/examples/mobc/src/src_user/hal/CMakeLists.txt index 084c84cf3..4e96f8e7f 100644 --- a/examples/mobc/src/src_user/hal/CMakeLists.txt +++ b/examples/mobc/src/src_user/hal/CMakeLists.txt @@ -7,7 +7,7 @@ set(C2A_COMMON_SRCS ) # 通常,S2EではC++ビルドされるが,C2A core開発のため,C2A単体をC89でライブラリビルドする場合は,mockupをビルド対象にする -if(USE_SILS_MOCKUP) +if(C2A_BUILD_WITH_SILS_MOCKUP) message("USE SILS_MOCKUP") #target_sources(${PROJECT_NAME} PRIVATE diff --git a/examples/subobc/CMakeLists.txt b/examples/subobc/CMakeLists.txt index d686f98e2..a2fa6b228 100644 --- a/examples/subobc/CMakeLists.txt +++ b/examples/subobc/CMakeLists.txt @@ -10,7 +10,7 @@ project(C2A) # そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること! option(USE_SCI_COM_WINGS "Use SCI_COM_WINGS" ON) -option(USE_SILS_MOCKUP "Use SILS mockup for build C2A with minimal user in C89 only" OFF) +option(C2A_BUILD_WITH_SILS_MOCKUP "Build C2A with SILS mockup for check undefined symbols by build minimal C2A user executable(C89 only)" OFF) option(C2A_BUILD_FOR_SILS "Build C2A for SILS target" ON) @@ -18,7 +18,7 @@ option(C2A_BUILD_FOR_SILS "Build C2A for SILS target" ON) set(C2A_USE_ALL_CORE_APPS OFF) set(C2A_USE_ALL_CORE_TEST_APPS OFF) -if(USE_SILS_MOCKUP) +if(C2A_BUILD_WITH_SILS_MOCKUP) set(C2A_BUILD_AS_CXX OFF) endif() @@ -72,7 +72,7 @@ if(C2A_BUILD_AS_CXX) set_source_files_properties(${C2A_SRCS} PROPERTIES LANGUAGE CXX) # C++ endif() -if(USE_SILS_MOCKUP) +if(C2A_BUILD_WITH_SILS_MOCKUP) add_definitions(-DDEFINE_MAIN_ON_SILS) add_executable(${PROJECT_NAME} ${C2A_SRCS}) else() diff --git a/examples/subobc/src/src_user/hal/CMakeLists.txt b/examples/subobc/src/src_user/hal/CMakeLists.txt index dc41fbb67..feaa1c69b 100644 --- a/examples/subobc/src/src_user/hal/CMakeLists.txt +++ b/examples/subobc/src/src_user/hal/CMakeLists.txt @@ -7,7 +7,7 @@ set(C2A_COMMON_SRCS ) # 通常,S2EではC++ビルドされるが,C2A core開発のため,C2A単体をC89でライブラリビルドする場合は,mockupをビルド対象にする -if(USE_SILS_MOCKUP) +if(C2A_BUILD_WITH_SILS_MOCKUP) message("USE SILS_MOCKUP") #target_sources(${PROJECT_NAME} PRIVATE From 19577345d5db6392ae6c89af4a09eb95ae94b2c3 Mon Sep 17 00:00:00 2001 From: sksat Date: Thu, 12 Oct 2023 21:43:03 +0900 Subject: [PATCH 2/5] CMake: SHOW_DEBUG_PRINT_ON_SILS -> C2A_SHOW_DEBUG_PRINT_ON_SILS --- examples/mobc/CMakeLists.txt | 5 ++--- examples/subobc/CMakeLists.txt | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/mobc/CMakeLists.txt b/examples/mobc/CMakeLists.txt index 881e133ef..3362b6ec7 100644 --- a/examples/mobc/CMakeLists.txt +++ b/examples/mobc/CMakeLists.txt @@ -34,9 +34,8 @@ set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_user) include_directories(src) # Output debug print to SILS console window -option(SHOW_DEBUG_PRINT_ON_SILS "Show debug print") -set(SHOW_DEBUG_PRINT_ON_SILS ON) -if(SHOW_DEBUG_PRINT_ON_SILS) +option(C2A_SHOW_DEBUG_PRINT_ON_SILS "Show debug print" ON) +if(C2A_SHOW_DEBUG_PRINT_ON_SILS) add_definitions(-DSHOW_DEBUG_PRINT_ON_SILS) message("Show debug print") endif() diff --git a/examples/subobc/CMakeLists.txt b/examples/subobc/CMakeLists.txt index a2fa6b228..e106173e0 100644 --- a/examples/subobc/CMakeLists.txt +++ b/examples/subobc/CMakeLists.txt @@ -32,9 +32,8 @@ set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_user) include_directories(src) # Output debug print to SILS console window -option(SHOW_DEBUG_PRINT_ON_SILS "Show debug print") -set(SHOW_DEBUG_PRINT_ON_SILS ON) -if(SHOW_DEBUG_PRINT_ON_SILS) +option(C2A_SHOW_DEBUG_PRINT_ON_SILS "Show debug print" ON) +if(C2A_SHOW_DEBUG_PRINT_ON_SILS) add_definitions(-DSHOW_DEBUG_PRINT_ON_SILS) message("Show debug print") endif() From f8f3f481971ad1b247ee413fa71b1174dc5527cb Mon Sep 17 00:00:00 2001 From: sksat Date: Fri, 13 Oct 2023 00:18:58 +0900 Subject: [PATCH 3/5] CMake: USE_SCI_COM_WINGS -> C2A_USE_SCI_COM_WINGS, USE_SCI_COM_UART -> C2A_USE_SCI_COM_UART --- examples/mobc/CMakeLists.txt | 4 ++-- examples/mobc/src/src_user/hal/CMakeLists.txt | 4 ++-- examples/subobc/CMakeLists.txt | 2 +- examples/subobc/src/src_user/hal/CMakeLists.txt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/mobc/CMakeLists.txt b/examples/mobc/CMakeLists.txt index 3362b6ec7..d7b3b4ea8 100644 --- a/examples/mobc/CMakeLists.txt +++ b/examples/mobc/CMakeLists.txt @@ -8,13 +8,13 @@ project(C2A) # !!!注意!!! # これをONにした状態で,SCIの受け口がない場合(TMTC IFが動いてない状態) # そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること! -option(USE_SCI_COM_WINGS "Use SCI_COM_WINGS" ON) +option(C2A_USE_SCI_COM_WINGS "Use SCI_COM_WINGS" ON) # SCI COM for connection to PC UART # !!!注意!!! # これをONにした状態で,SCIの受け口がない場合(受けてのTeratermが起動していない状態) # そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること! -option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF) +option(C2A_USE_SCI_COM_UART "Use SCI_COM_UART" OFF) option(C2A_BUILD_WITH_SILS_MOCKUP "Build C2A with SILS mockup for check undefined symbols by build minimal C2A user executable(C89 only)" OFF) diff --git a/examples/mobc/src/src_user/hal/CMakeLists.txt b/examples/mobc/src/src_user/hal/CMakeLists.txt index 4e96f8e7f..f48d19cf4 100644 --- a/examples/mobc/src/src_user/hal/CMakeLists.txt +++ b/examples/mobc/src/src_user/hal/CMakeLists.txt @@ -26,7 +26,7 @@ else() sils/wdt_sils.cpp ) - if(USE_SCI_COM_WINGS) + if(C2A_USE_SCI_COM_WINGS) add_definitions(-DUSE_SCI_COM_WINGS) #target_sources(${PROJECT_NAME} PUBLIC set(C2A_HAL_COM_WINGS_SRCS @@ -35,7 +35,7 @@ else() message("USE SCI_COM_WINGS") endif() - if(USE_SCI_COM_UART) + if(C2A_USE_SCI_COM_UART) add_definitions(-DUSE_SCI_COM_UART) #target_sources(${PROJECT_NAME} PUBLIC set(C2A_HAL_COM_UART_SRCS diff --git a/examples/subobc/CMakeLists.txt b/examples/subobc/CMakeLists.txt index e106173e0..b26d22b15 100644 --- a/examples/subobc/CMakeLists.txt +++ b/examples/subobc/CMakeLists.txt @@ -8,7 +8,7 @@ project(C2A) # !!!注意!!! # これをONにした状態で,SCIの受け口がない場合(TMTC IFが動いてない状態) # そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること! -option(USE_SCI_COM_WINGS "Use SCI_COM_WINGS" ON) +option(C2A_USE_SCI_COM_WINGS "Use SCI_COM_WINGS" ON) option(C2A_BUILD_WITH_SILS_MOCKUP "Build C2A with SILS mockup for check undefined symbols by build minimal C2A user executable(C89 only)" OFF) diff --git a/examples/subobc/src/src_user/hal/CMakeLists.txt b/examples/subobc/src/src_user/hal/CMakeLists.txt index feaa1c69b..7f073b584 100644 --- a/examples/subobc/src/src_user/hal/CMakeLists.txt +++ b/examples/subobc/src/src_user/hal/CMakeLists.txt @@ -24,7 +24,7 @@ else() sils/wdt_sils.cpp ) - if(USE_SCI_COM_WINGS) # TODO: これ USE_SCI_COM_UART では? + if(C2A_USE_SCI_COM_WINGS) # TODO: これ USE_SCI_COM_UART では? add_definitions(-DUSE_SCI_COM_WINGS) #target_sources(${PROJECT_NAME} PUBLIC set(C2A_HAL_COM_UART_SRCS From baac4e4b410135a4f1d3888878ef6c4306e7e62f Mon Sep 17 00:00:00 2001 From: sksat Date: Fri, 13 Oct 2023 00:20:37 +0900 Subject: [PATCH 4/5] update comment --- examples/subobc/src/src_user/hal/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/subobc/src/src_user/hal/CMakeLists.txt b/examples/subobc/src/src_user/hal/CMakeLists.txt index 7f073b584..5297e0708 100644 --- a/examples/subobc/src/src_user/hal/CMakeLists.txt +++ b/examples/subobc/src/src_user/hal/CMakeLists.txt @@ -24,7 +24,7 @@ else() sils/wdt_sils.cpp ) - if(C2A_USE_SCI_COM_WINGS) # TODO: これ USE_SCI_COM_UART では? + if(C2A_USE_SCI_COM_WINGS) # option 名が confusing だが,subobc の upstream(単体試験では WINGS と疎通するポート)は UART add_definitions(-DUSE_SCI_COM_WINGS) #target_sources(${PROJECT_NAME} PUBLIC set(C2A_HAL_COM_UART_SRCS From 1a54a0ee43a64ad70d9dba1447ffeb87857e9b14 Mon Sep 17 00:00:00 2001 From: sksat Date: Fri, 13 Oct 2023 00:51:33 +0900 Subject: [PATCH 5/5] update CMake option config in example user c2a-sils-runtime build --- examples/mobc/build.rs | 2 +- examples/subobc/build.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mobc/build.rs b/examples/mobc/build.rs index d22f07cf5..865f73701 100644 --- a/examples/mobc/build.rs +++ b/examples/mobc/build.rs @@ -6,7 +6,7 @@ fn main() { .define("C2A_BUILD_FOR_32BIT", "OFF") .define("C2A_BUILD_AS_C99", "ON") .define("C2A_BUILD_FOR_SILS", "ON") - .define("USE_SCI_COM_WINGS", "OFF") + .define("C2A_USE_SCI_COM_WINGS", "OFF") .build_target("C2A"); println!("cargo:rerun-if-changed=./src/src_core"); diff --git a/examples/subobc/build.rs b/examples/subobc/build.rs index 620a43451..afdbe5fc5 100644 --- a/examples/subobc/build.rs +++ b/examples/subobc/build.rs @@ -6,7 +6,7 @@ fn main() { .define("C2A_BUILD_FOR_32BIT", "ON") .define("C2A_BUILD_AS_C99", "ON") .define("C2A_BUILD_FOR_SILS ", "ON") - .define("USE_SCI_COM_WINGS", "OFF") + .define("C2A_USE_SCI_COM_WINGS", "OFF") .build_target("C2A"); println!("cargo:rerun-if-changed=./CMakeLists.txt");