Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Commit 8e53ad8

Browse files
committed
initial commit
1 parent 19acd4c commit 8e53ad8

File tree

235 files changed

+40389
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+40389
-1
lines changed

.github/workflows/actionlint.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: actionlint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/**'
7+
8+
jobs:
9+
actionlint:
10+
name: actionlint with reviewdog
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: actionlint
16+
uses: reviewdog/[email protected]
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
reporter: github-pr-review

.github/workflows/build.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build_arm32v7:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: setup QEMU
14+
uses: docker/[email protected]
15+
with:
16+
platforms: arm
17+
18+
- name: setup docker buildx
19+
uses: docker/[email protected]
20+
21+
- name: build
22+
uses: docker/build-push-action@v2
23+
with:
24+
context: .
25+
file: Dockerfile.arm32v7

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/src_core"]
2+
path = src/src_core
3+
url = https://github.com/ut-issl/c2a-core.git

CMakeLists.txt

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
## CMake file for RaspberryPi and S2E integration
2+
3+
cmake_minimum_required(VERSION 3.13)
4+
project(C2A)
5+
6+
# options
7+
# SCI COM for connection to WINGS TMTC IF
8+
# !!!注意!!!
9+
# これをONにした状態で,SCIの受け口がない場合(TMTC IFが動いてない状態)
10+
# そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること!
11+
option(USE_SCI_COM_WINGS "Use SCI_COM_WINGS")
12+
13+
# SCI COM for connection to PC UART
14+
# !!!注意!!!
15+
# これをONにした状態で,SCIの受け口がない場合(受けてのTeratermが起動していない状態)
16+
# そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること!
17+
option(USE_SCI_COM_UART "Use SCI_COM_UART")
18+
19+
# default config
20+
set(USE_SCI_COM_WINGS OFF)
21+
set(USE_SCI_COM_UART OFF)
22+
23+
set(USE_ALL_C2A_CORE_APPS OFF)
24+
set(USE_32BIT_COMPILER ON)
25+
26+
if(BUILD_C2A_AS_CXX)
27+
message("build C2A as C++!")
28+
endif()
29+
30+
set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_core)
31+
set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_user)
32+
33+
include_directories(src)
34+
35+
# Output debug print to SILS console window
36+
option(SHOW_DEBUG_PRINT_ON_SILS "Show debug print")
37+
set(SHOW_DEBUG_PRINT_ON_SILS ON)
38+
if(SHOW_DEBUG_PRINT_ON_SILS)
39+
add_definitions(-DSHOW_DEBUG_PRINT_ON_SILS)
40+
message("Show debug print")
41+
endif()
42+
43+
add_subdirectory(${C2A_CORE_DIR})
44+
45+
add_subdirectory(${C2A_USER_DIR}/Applications)
46+
add_subdirectory(${C2A_USER_DIR}/Drivers)
47+
add_subdirectory(${C2A_USER_DIR}/IfWrapper)
48+
add_subdirectory(${C2A_USER_DIR}/Library)
49+
add_subdirectory(${C2A_USER_DIR}/Settings)
50+
add_subdirectory(${C2A_USER_DIR}/TlmCmd)
51+
52+
set(C2A_SRCS
53+
${C2A_USER_DIR}/c2a_main.c
54+
)
55+
56+
if(BUILD_C2A_AS_CXX)
57+
message("Build as C++!!!")
58+
set_source_files_properties(${C2A_SRCS} PROPERTIES LANGUAGE CXX) # C++
59+
endif()
60+
61+
if(USE_C2A)
62+
add_library(${PROJECT_NAME} STATIC ${C2A_SRCS})
63+
else()
64+
add_executable(${PROJECT_NAME} ${C2A_SRCS})
65+
endif()
66+
67+
set(C2A_USER_MODULES
68+
C2A_USER_APPS
69+
C2A_USER_CMD_TLM
70+
C2A_USER_DRIVERS
71+
C2A_USER_IF_WRAPPER
72+
C2A_USER_LIB
73+
C2A_USER_SETTINGS
74+
)
75+
76+
# for compile core applicatons
77+
set(C2A_APPS
78+
${C2A_CORE_DIR}/Applications/anomaly_handler.c
79+
${C2A_CORE_DIR}/Applications/divided_cmd_utility.c
80+
${C2A_CORE_DIR}/Applications/gs_command_dispatcher.c
81+
${C2A_CORE_DIR}/Applications/event_utility.c
82+
${C2A_CORE_DIR}/Applications/memory_dump.c
83+
${C2A_CORE_DIR}/Applications/nop.c
84+
${C2A_CORE_DIR}/Applications/realtime_command_dispatcher.c
85+
${C2A_CORE_DIR}/Applications/timeline_command_dispatcher.c
86+
${C2A_CORE_DIR}/Applications/utility_counter.c
87+
${C2A_CORE_DIR}/Applications/telemetry_manager.c
88+
)
89+
90+
add_library(C2A_CORE_APPS_MODULE OBJECT ${C2A_APPS})
91+
92+
if(BUILD_C2A_AS_CXX)
93+
set_source_files_properties(${C2A_APPS} PROPERTIES LANGUAGE CXX) # C++
94+
endif()
95+
96+
if(MSVC)
97+
target_link_options(${PROJECT_NAME} PRIVATE "/WHOLEARCHIVE")
98+
target_link_libraries(${PROJECT_NAME} PRIVATE
99+
C2A_CORE_APPS_MODULE
100+
C2A_CORE
101+
${C2A_USER_MODULES}
102+
)
103+
else()
104+
target_link_libraries(${PROJECT_NAME} PRIVATE
105+
-Wl,--whole-archive
106+
C2A_CORE_APPS_MODULE
107+
C2A_CORE
108+
-Wl,--no-whole-archive
109+
pthread
110+
${C2A_USER_MODULES}
111+
-lm
112+
)
113+
endif()
114+
115+
if(WIN32)
116+
add_custom_command(TARGET ${PROJECT_NAME}
117+
PRE_BUILD
118+
COMMAND git_revision.bat
119+
WORKING_DIRECTORY ${C2A_USER_DIR}/Script)
120+
else()
121+
add_custom_command(TARGET ${PROJECT_NAME}
122+
PRE_BUILD
123+
COMMAND ./git_revision.sh
124+
WORKING_DIRECTORY ${C2A_USER_DIR}/Script)
125+
endif()
126+
127+
include(${C2A_USER_DIR}/common.cmake)

CMakeSettings.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Win32",
5+
"generator": "Visual Studio 16 2019",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [
8+
"msvc_x86"
9+
],
10+
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
11+
"cmakeCommandArgs": "",
12+
"buildCommandArgs": "",
13+
"ctestCommandArgs": ""
14+
}
15+
]
16+
}

Dockerfile.arm32v7

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM arm32v7/gcc:11-bullseye
2+
RUN apt-get update -y && apt-get install -y cmake
3+
WORKDIR /c2a_raspi
4+
COPY . .
5+
RUN git submodule init && git submodule update
6+
RUN mkdir build
7+
WORKDIR /c2a_raspi/build
8+
RUN cmake ..
9+
RUN cmake --build .

0 commit comments

Comments
 (0)