Skip to content

Commit

Permalink
Fix Linux build.
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowChemistryPublishing committed Jun 8, 2024
1 parent 80c11be commit 8b000b0
Show file tree
Hide file tree
Showing 36 changed files with 6,457 additions and 3,633 deletions.
496 changes: 248 additions & 248 deletions .clang-format

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
---
Checks: -*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,
cppcoreguidelines-*,fuchsia-*,google-*,hicpp-*,llvm-*,
misc-*,modernize-*,performance-*,readability-*,
-llvm-header-guard,-modernize-use-trailing-return-type,
-fuchsia-default-arguments-calls,-readability-identifier-length,
-hicpp-braces-around-statements,-readability-braces-around-statements
-fuchsia-statically-constructed-objects,-cert-err58-cpp
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.FunctionCase: CamelCase
readability-identifier-naming.EnumCase: CamelCase
readability-identifier-naming.EnumConstantCase: CamelCase
readability-identifier-naming.EnumConstantPrefix: k
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.StructCase: CamelCase
readability-identifier-naming.MemberCase: lower_case
readability-identifier-naming.PrivateMemberSuffix: _
readability-identifier-naming.NamespaceCase: lower_case
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
readability-identifier-naming.TypeAliasCase: CamelCase
readability-identifier-naming.TypeTemplateParameterCase: CamelCase
...

---
Checks: -*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,
cppcoreguidelines-*,fuchsia-*,google-*,hicpp-*,llvm-*,
misc-*,modernize-*,performance-*,readability-*,
-llvm-header-guard,-modernize-use-trailing-return-type,
-fuchsia-default-arguments-calls,-readability-identifier-length,
-hicpp-braces-around-statements,-readability-braces-around-statements
-fuchsia-statically-constructed-objects,-cert-err58-cpp
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.FunctionCase: CamelCase
readability-identifier-naming.EnumCase: CamelCase
readability-identifier-naming.EnumConstantCase: CamelCase
readability-identifier-naming.EnumConstantPrefix: k
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.StructCase: CamelCase
readability-identifier-naming.MemberCase: lower_case
readability-identifier-naming.PrivateMemberSuffix: _
readability-identifier-naming.NamespaceCase: lower_case
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
readability-identifier-naming.TypeAliasCase: CamelCase
readability-identifier-naming.TypeTemplateParameterCase: CamelCase
...

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
106 changes: 53 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
name: build
on: [push]
jobs:
build:
strategy:
matrix:
platform: [{ os: windows-latest, shell: 'msys2 {0}', gen: 'MSYS Makefiles' }, { os: ubuntu-latest, shell: bash, gen: 'Ninja' }]
toolchain: [{ cross: true, cpref: 'arm-none-eabi-' }, { cross: false, cpref: '' }]
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Windows Toolchain (arm-cross)
uses: msys2/setup-msys2@v2
if: ${{ matrix.platform.os == 'windows-latest' && matrix.toolchain.cross }}
with:
path-type: inherit
msystem: mingw64
install: mingw-w64-x86_64-arm-none-eabi-toolchain
- name: Windows Toolchain (host=target)
uses: msys2/setup-msys2@v2
if: ${{ matrix.platform.os == 'windows-latest' && !matrix.toolchain.cross }}
with:
path-type: inherit
msystem: mingw64
install: mingw-w64-x86_64-toolchain
- name: Linux Toolchain (arm-cross)
if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.toolchain.cross }}
run: |
sudo apt-get upgrade
sudo apt install -y gcc-arm-none-eabi
sudo apt-get install -y ninja-build
- name: Linux Toolchain (host=target)
if: ${{ matrix.platform.os == 'ubuntu-latest' && !matrix.toolchain.cross }}
run: |
sudo apt-get upgrade
sudo apt install -y gcc-13
sudo apt install -y g++-13
sudo apt-get install -y ninja-build
- uses: jwlawson/[email protected]
- name: Configure
run: |
cmake -DCMAKE_C_COMPILER="${{ matrix.toolchain.cpref }}gcc" -DCMAKE_CXX_COMPILER="${{ matrix.toolchain.cpref }}g++" -G"${{ matrix.platform.gen }}" -Bbuild .
- name: Build
run: |
cmake --build ./build --config Debug --target all
- name: Test
if: ${{ !matrix.toolchain.cross }}
run: |
name: build
on: [push]
jobs:
build:
strategy:
matrix:
platform: [{ os: windows-latest, shell: 'msys2 {0}', gen: 'MSYS Makefiles' }, { os: ubuntu-latest, shell: bash, gen: 'Ninja' }]
toolchain: [{ cross: true, cpref: 'arm-none-eabi-' }, { cross: false, cpref: '' }]
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Windows Toolchain (arm-cross)
uses: msys2/setup-msys2@v2
if: ${{ matrix.platform.os == 'windows-latest' && matrix.toolchain.cross }}
with:
path-type: inherit
msystem: mingw64
install: mingw-w64-x86_64-arm-none-eabi-toolchain
- name: Windows Toolchain (host=target)
uses: msys2/setup-msys2@v2
if: ${{ matrix.platform.os == 'windows-latest' && !matrix.toolchain.cross }}
with:
path-type: inherit
msystem: mingw64
install: mingw-w64-x86_64-toolchain
- name: Linux Toolchain (arm-cross)
if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.toolchain.cross }}
run: |
sudo apt-get upgrade
sudo apt install -y gcc-arm-none-eabi
sudo apt-get install -y ninja-build
- name: Linux Toolchain (host=target)
if: ${{ matrix.platform.os == 'ubuntu-latest' && !matrix.toolchain.cross }}
run: |
sudo apt-get upgrade
sudo apt install -y gcc-13
sudo apt install -y g++-13
sudo apt-get install -y ninja-build
- uses: jwlawson/[email protected]
- name: Configure
run: |
cmake -DCMAKE_C_COMPILER="${{ matrix.toolchain.cpref }}gcc" -DCMAKE_CXX_COMPILER="${{ matrix.toolchain.cpref }}g++" -G"${{ matrix.platform.gen }}" -Bbuild .
- name: Build
run: |
cmake --build ./build --config Debug --target all
- name: Test
if: ${{ !matrix.toolchain.cross }}
run: |
ctest --test-dir ./build
114 changes: 57 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
# 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

# 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
Loading

0 comments on commit 8b000b0

Please sign in to comment.