Skip to content

Commit

Permalink
Copy files from c2a-aobc/Example
Browse files Browse the repository at this point in the history
  • Loading branch information
200km committed Sep 22, 2023
1 parent c6525f4 commit 58dd337
Show file tree
Hide file tree
Showing 26 changed files with 1,782 additions and 2 deletions.
25 changes: 25 additions & 0 deletions C2A_AOBC_EXAMPLE.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30413.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c2a_aobc_example", "c2a_aobc_example.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
{C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {51C424BA-5F46-4D27-998C-43D4D4A0A179}
EndGlobalSection
EndGlobal
345 changes: 345 additions & 0 deletions C2A_AOBC_EXAMPLE.vcxproj

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions C2A_AOBC_EXAMPLE.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>
81 changes: 81 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
## CMake file for S2E integration

cmake_minimum_required(VERSION 3.13)
project(C2A)

option(BUILD_C2A_AS_CXX "Build C2A as C++" ON)

option(BUILD_C2A_AS_SILS_FW "Build C2A as SILS firmware" ON)

# UART COM for connection to PC UART
# これをONにした状態でTMTC_IFが動いていない場合,そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること!
option(USE_UART_COM "Use UART COM" OFF)

set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_core)
set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_user)
set(C2A_SATELLITE_PARAMETERS_DIR ../../../../src_aobc_example/Settings/SatelliteParameters/) # relative path from Settings
add_definitions(-DUSER_DEFINED_I2C_ADDRESS)
add_definitions(-DUSER_DEFINED_SENSOR_NUMBER)

if(NOT BUILD_C2A_AS_CXX)
set(BUILD_C2A_AS_C99 ON)
endif()
set(USE_ALL_C2A_CORE_APPS OFF)
set(USE_ALL_C2A_CORE_TEST_APPS OFF)
set(USE_ALL_C2A_CORE_LIB ON)

set(C2A_SRCS
${C2A_CORE_DIR}/Applications/divided_cmd_utility.c
${C2A_CORE_DIR}/Applications/event_utility.c
${C2A_CORE_DIR}/Applications/gs_command_dispatcher.c
${C2A_CORE_DIR}/Applications/memory_dump.c
${C2A_CORE_DIR}/Applications/nop.c
${C2A_CORE_DIR}/Applications/realtime_command_dispatcher.c
${C2A_CORE_DIR}/Applications/timeline_command_dispatcher.c
# ${C2A_CORE_DIR}/Applications/utility_command.c
# ${C2A_CORE_DIR}/Applications/utility_counter.c

# SRC_USER codes
# ${C2A_USER_DIR}/C2A_main.c
)

include_directories(src_aobc/src)
include_directories(src_aobc_example)

add_subdirectory(${C2A_CORE_DIR})

add_subdirectory(${C2A_USER_DIR}/Applications)
add_subdirectory(${C2A_USER_DIR}/Drivers)
add_subdirectory(${C2A_USER_DIR}/IfWrapper)
add_subdirectory(${C2A_USER_DIR}/Library)
add_subdirectory(${C2A_USER_DIR}/Settings)
add_subdirectory(${C2A_USER_DIR}/TlmCmd)

add_library(${PROJECT_NAME} STATIC ${C2A_SRCS})

set(C2A_USER_MODULES
C2A_USER_APPS
C2A_USER_DRIVERS
C2A_USER_CMD_TLM
C2A_USER_IF_WRAPPER
C2A_USER_LIB
C2A_USER_SETTINGS
)

if(MSVC)
target_link_options(${PROJECT_NAME} PRIVATE "/WHOLEARCHIVE")
target_link_libraries(${PROJECT_NAME} PRIVATE
C2A_CORE
${C2A_USER_MODULES}
)
else()
target_link_libraries(${PROJECT_NAME} PRIVATE
-Wl,--whole-archive
C2A_CORE
-Wl,--no-whole-archive
${C2A_USER_MODULES}
-lm
)
endif()

include(${C2A_USER_DIR}/common.cmake)
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# c2a-aobc-example
An example of user settings repository for c2a-aobc
# C2A-AOBC-EXAMPLE

## Overview

- `C2A-AOBC-EXAMPLE` is an example of a project-specific repository of `C2A-AOBC`.
- Users can copy this directory to make their simulation environment.
- **NOTE**: Please rewrite all words like `example, EXAMPLE, or Example` to suit your project in this document after you copy the directory. After that, please delete this description.
- For other detailed descriptions, please also see README of [c2a-aobc](https://github.com/ut-issl/c2a-aobc).

## How to construct the repository

- Directory tree
```
- c2a-aobc-example (Examples directory)
- src_aobc (git submodule)
- src_aobc_example
- project definition files.
```
- `git submodule`
- This repository includes the [c2a-aobc](https://github.com/ut-issl/c2a-aobc) with the `git submodule`. And the `c2a-aobc` also includes [c2a-core](https://github.com/ut-issl/c2a-core) as a submodule. Please use the following command to clone the repository recursively.
```
$ git clone --recursive [email protected]:ut-issl/c2a-aobc-example.git
```
## Build with vMicro for real AOBC (Attitude On Board Computer) development
- Please see the `README` of [c2a-aobc](./src_aobc/README.md)
- This link will be available after the repository construction of `c2a-aobc-example`.
## Build with S2E for SILS test
- Please see the `README` of `s2e-aobc-example`.
## How to change the project-specific parameters
- In the `src_aobc_example/Settings/SatelliteParameters` directory, there are C source files to define the initial satellite parameters.
- Please modify the parameters to suit your project.
Loading

0 comments on commit 58dd337

Please sign in to comment.