Skip to content

Commit

Permalink
Merge branch 'main' into ci-matrix-build-and-test
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowChemistryPublishing authored Jun 15, 2024
2 parents b0dfbdf + 04c95d1 commit 4dbc12e
Show file tree
Hide file tree
Showing 46 changed files with 3,103 additions and 2,207 deletions.
495 changes: 247 additions & 248 deletions utils/.clang-format → .clang-format

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
Checks: -*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,
cppcoreguidelines-*,fuchsia-*,google-*,hicpp-*,llvm-*,
misc-*,modernize-*,performance-*,readability-*,
-llvm-header-guard,-fuchsia-default-arguments-calls,-misc-include-cleaner,
-readability-identifier-length,-hicpp-braces-around-statements,
-readability-braces-around-statements,-fuchsia-statically-constructed-objects,
-cert-err58-cpp,-fuchsia-trailing-return,-cppcoreguidelines-avoid-do-while,
-google-explicit-constructor,-hicpp-explicit-conversions,
-fuchsia-overloaded-operator,-cppcoreguidelines-rvalue-reference-param-not-moved,
-clang-diagnostic-error
HeaderFilterRegex: ^((?!/lib/).)*(src|include)/((?!/lib/).)*$
UseColor: true
CheckOptions:
readability-identifier-naming.VariableCase: lower_case
readability-identifier-naming.ConstantCase: CamelCase
readability-identifier-naming.ConstantPrefix: k
readability-identifier-naming.ConstantIgnoredRegexp: .*V$
readability-identifier-naming.FunctionCase: CamelCase
readability-identifier-naming.FunctionIgnoredRegexp: ^(begin|end)$
readability-identifier-naming.EnumCase: CamelCase
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.StructCase: CamelCase
readability-identifier-naming.MemberCase: lower_case
readability-identifier-naming.ProtectedMemberPrex: m_
readability-identifier-naming.PrivateMemberPrex: m_
readability-identifier-naming.ConceptCase: CamelCase
readability-identifier-naming.TemplateParameterCase: CamelCase
readability-identifier-naming.NamespaceCase: lower_case
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
readability-identifier-naming.TypeAliasCase: CamelCase
readability-identifier-naming.TypeAliasIgnoredRegexp: ^(iterator_category|value_type|difference_type|pointer|reference)$
readability-identifier-naming.TypeTemplateParameterCase: CamelCase
readability-function-cognitive-complexity.Threshold: 20
readability-function-cognitive-complexity.IgnoreMacros: true
misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: true
...
6 changes: 3 additions & 3 deletions .clangd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CompileFlags:
Add: [-std=c++2b, -isystem/usr/include/c++/v1]
CompilationDatabase: build
CompileFlags:
Add: [-std=c++2b, -isystem/usr/include/c++/v1]
CompilationDatabase: build
116 changes: 59 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,58 +1,60 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Local Settings
**/.settings/**
**/*.mxproject

# Build Artifacts
**/Debug/**
**/Release/**
*.scratch
*.elf
*.map
*.hex

# Library Code
**/Middlewares/**
**/Drivers/**

# CMake Files
/build

# Clangd
compile_commands.json
.cache

# VSCode
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Local Settings
**/.settings/**
**/*.mxproject

# Build Artifacts
**/Debug/**
**/Release/**
*.scratch
*.elf
*.map
*.hex

# Library Code
**/Middlewares/**
**/Drivers/**

# CMake Files
/build
**/CMakeFiles/**
CMakeCache.txt

# Clangd
compile_commands.json
.cache

# VSCode
/.vscode
36 changes: 18 additions & 18 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[submodule "units"]
path = extern/units
url = [email protected]:nholthaus/units.git
[submodule "extern/stm32-cmake"]
path = extern/stm32-cmake
url = [email protected]:ObKo/stm32-cmake.git
[submodule "extern/googletest"]
path = extern/googletest
url = https://github.com/google/googletest.git
[submodule "STM32CubeH7"]
path = extern/STM32CubeH7
url = https://github.com/STMicroelectronics/STM32CubeH7.git
[submodule "extern/x-cube-freertos"]
path = extern/x-cube-freertos
url = https://github.com/STMicroelectronics/x-cube-freertos.git
[submodule "extern/STM32CubeH7"]
path = extern/STM32CubeH7
url = https://github.com/STMicroelectronics/STM32CubeH7.git
[submodule "units"]
path = extern/units
url = [email protected]:nholthaus/units.git
[submodule "extern/stm32-cmake"]
path = extern/stm32-cmake
url = [email protected]:ObKo/stm32-cmake.git
[submodule "extern/googletest"]
path = extern/googletest
url = https://github.com/google/googletest.git
[submodule "STM32CubeH7"]
path = extern/STM32CubeH7
url = https://github.com/STMicroelectronics/STM32CubeH7.git
[submodule "extern/x-cube-freertos"]
path = extern/x-cube-freertos
url = https://github.com/STMicroelectronics/x-cube-freertos.git
[submodule "extern/STM32CubeH7"]
path = extern/STM32CubeH7
url = https://github.com/STMicroelectronics/STM32CubeH7.git
35 changes: 23 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
cmake_minimum_required(VERSION 3.27)

if (MSVC)
message(FATAL_ERROR "MSVC is not supported since GNU extensions and more complete support of the latest standards are required")
endif()

if (CMAKE_C_COMPILER MATCHES "arm-none-eabi" OR CMAKE_CXX_COMPILER MATCHES "arm-none-eabi")
set(CMAKE_SYSTEM_NAME "Generic")
set(CMAKE_C_COMPILER_FORCED ON)
set(CMAKE_CXX_COMPILER_FORCED ON)

set(BALLOON_CROSS_COMPILING ON)
add_compile_definitions(BALLOON_STM32)
else()
set(BALLOON_CROSS_COMPILING OFF)
add_compile_definitions(BALLOON_HOSTED)
endif()

project(balloon)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_CXX_SCAN_FOR_MODULES OFF CACHE INTERNAL "")

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
include(utils/add-checks.cmake)

if (CMAKE_HOST_APPLE)
message(WARNING "[balloon-obc-401-configure] MacOS is not a fully supported platform, expect errors.")
endif()
Expand All @@ -26,20 +43,14 @@ set(FREERTOS_PATH "${CMAKE_SOURCE_DIR}/extern/x-cube-freertos/Middlewares/Third_
if (BALLOON_CROSS_COMPILING)
include(extern/stm32-cmake/cmake/stm32_gcc.cmake)
include(extern/stm32-cmake/cmake/stm32/common.cmake)
endif()
include(utils/checks.cmake)

add_subdirectory(extern/units)

add_subdirectory(common)
if (BALLOON_CROSS_COMPILING)
add_subdirectory(systems)
endif()

if (NOT BALLOON_CROSS_COMPILING)
else()
set(INSTALL_GTEST OFF CACHE INTERNAL "" FORCE)
add_subdirectory(extern/googletest)

enable_testing()
add_subdirectory(tests)
endif()

add_subdirectory(extern/units)

add_subdirectory(common)
add_subdirectory(systems)
Loading

0 comments on commit 4dbc12e

Please sign in to comment.