Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Improvements #615

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b98ba89
Fix builds on native Windows
stellar-aria Jun 10, 2023
e1dfb87
Add CMake toolchain file for LLVMEmbeddedToolchainForArm
stellar-aria Jun 10, 2023
e0a0f07
Update linker arguments of both base and GCC-specific toolchain setups
stellar-aria Jun 10, 2023
c252396
Remove illegal constexpr definitions
stellar-aria Jun 10, 2023
194f379
Remove attribute naked
stellar-aria Jun 10, 2023
c36259d
Add DAISY_STORAGE configure option
stellar-aria Jun 10, 2023
d312e5d
Remove unused variable
stellar-aria Jun 10, 2023
afdefdd
Splits the monolithic CMakeLists.txt file into a semi-proper structure
stellar-aria Jun 10, 2023
3505b06
Split toolchain into architecture and GNU
stellar-aria Jun 10, 2023
7744752
Remove unnecessary comparison
stellar-aria Jun 10, 2023
ad519b7
Fix complications of rebase
stellar-aria Jun 13, 2023
52f5fd0
Update linkerscripts
stellar-aria Jun 14, 2023
d0d084a
Add DaisyProject cmake file and use for default_build
stellar-aria Jun 14, 2023
a538828
Add missing libraries and source files to CMakeLists
stellar-aria Jun 14, 2023
6a26bd3
Add CMakeLists for examples
stellar-aria Jun 14, 2023
dc826ea
Add CMake config for tests
stellar-aria Jun 14, 2023
ebd9b57
Fix issues from merge
stellar-aria Feb 21, 2024
b6ef06b
add toolchain auto-detection
stellar-aria Feb 2, 2024
4117233
Add patch requirements to .gitattributes
stellar-aria Feb 2, 2024
db616a3
Fix some problems with the autodetection
stellar-aria Feb 21, 2024
433f09a
Add extra tools to GNU toolchain
stellar-aria Feb 21, 2024
2f8bb7c
Work on github actions a bit
stellar-aria Feb 22, 2024
8188024
Better bin/hex generation (multi-config)
stellar-aria Feb 22, 2024
15aebdc
Store TOOLCHAIN_PREFIX in the CMake cache
stellar-aria Feb 22, 2024
d3b77b6
Change cross-compiling mechanism
stellar-aria Feb 22, 2024
3e13608
Fix SAI warnings
stellar-aria Feb 22, 2024
2dbd134
Formatting
stellar-aria Feb 22, 2024
1944b24
Add some comments, move module path adjustment
stellar-aria Feb 23, 2024
2036cf1
Build examples as part of CMake CI Build job
stellar-aria Feb 23, 2024
e7ccdf4
Enable verbose build in GitHub Action
stellar-aria Feb 23, 2024
8d73765
Fix silly mistake with missing the GCC config
stellar-aria Feb 23, 2024
33004d9
group examples, add sane optimization defaults
stellar-aria Mar 4, 2024
a111c26
remove weird naming from example targets now that they're grouped
stellar-aria Mar 4, 2024
046434f
move NDEBUG to standalone and DaisyProject
stellar-aria Mar 4, 2024
8dc1c09
Separate tests CMake project
stellar-aria Mar 8, 2024
2826863
Merge remote-tracking branch 'upstream/master' into feature/cmake-imp…
stellar-aria Mar 8, 2024
cddc612
Fix merge resolution, toolchain integration
stellar-aria Mar 9, 2024
47159f7
Move system_stm32h7xx.c to static CMSIS Device library
stellar-aria Mar 11, 2024
eed99c9
Fix strequal comparison
stellar-aria Mar 11, 2024
49b6063
Fix cmake/DaisyProject.cmake
stellar-aria Mar 11, 2024
c8a58fa
Fix compile option propagation; remove semihost
stellar-aria Mar 18, 2024
096de59
add `-fno-finite-loops` to LLVM toolchain file
stellar-aria Mar 19, 2024
10107d8
Merge branch 'master' into feature/cmake-improvements
stellar-aria Oct 11, 2024
7ffaa66
Remove hal_map.c from CMakeLists.txt
stellar-aria Oct 11, 2024
e7071ed
Update llvm toolchains (ubuntu-latest no longer has libtinfo.so)
stellar-aria Oct 11, 2024
395d40a
Change runtime lib arch for LLVM (see ARM-software/LLVM-embedded-tool…
stellar-aria Oct 11, 2024
5086cc0
Remove support for older LLVM Embedded toolchains
stellar-aria Oct 11, 2024
703046c
remove -fno-builtin
stellar-aria Oct 15, 2024
7eee442
Update examples CMakeLists.txt, reduce Clang CI expectations
stellar-aria Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
*.filters text eol=crlf
*.props text eol=crlf
*.xml text eol=crlf
*.patch text eol=lf
64 changes: 49 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
submodules: recursive
- name: Setup arm-none-eabi-gcc
uses: fiam/arm-none-eabi-gcc@v1
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '9-2019-q4'
- name: Setup python
Expand All @@ -47,22 +47,56 @@ jobs:
- name: Build Examples
run: ./ci/build_examples.py -f core doc src tests Drivers

build-cmake:
build-cmake-gcc:
runs-on: ubuntu-latest

strategy:
matrix:
version: [latest, '13.3.Rel1', '12.3.Rel1', '11.3.Rel1', '10.3-2021.10', '9-2020-q2']

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup arm-none-eabi-gcc
uses: fiam/arm-none-eabi-gcc@v1
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '9-2019-q4'
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.20.x'
- name: Configure Library
run: cmake -S . -B build -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE=cmake/toolchains/stm32h750xx.cmake -D TOOLCHAIN_PREFIX=$(which arm-none-eabi-gcc | sed -e "s/bin\/arm-none-eabi-gcc//")
- name: Build Library
run: cmake --build build
release: ${{ matrix.version }}

- name: Setup CMake
uses: lukka/get-cmake@latest

- name: Configure
run: cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release

- name: Build All
run: cmake --build build --target examples --verbose

build-cmake-llvm:
runs-on: ubuntu-latest

strategy:
matrix:
version: [latest, '19.1.1']

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install LLVM Embedded Toolchain for Arm
uses: stellar-aria/llvm-embedded-toolchain-for-arm-action@latest
with:
release: ${{ matrix.version }}

- name: Setup CMake
uses: lukka/get-cmake@latest

- name: Configure
run: cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release

- name: Build All
run: cmake --build build --target BootloaderBlink --verbose # TODO: make this build all examples
26 changes: 14 additions & 12 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- 'src/**'
- 'tests/**'
- '.github/workflows/**'
jobs:
jobs:
###############################################################################
# builds the automated tests with clang; runs tests and exports results
googleTest:
Expand All @@ -24,23 +24,25 @@ jobs:
with:
submodules: recursive

- name: Build
run: |
cd tests
make release

- name: Setup CMake
uses: lukka/get-cmake@latest

- name: Configure CMake
run: cmake -B build -S tests

- name: Build Tests
run: cmake --build build

- name: Run Tests
run: |
cd tests/build/bin
./libDaisy_gtest --gtest_output=xml:gtestresults.xml

run: ctest --test-dir build --output-junit results/gtestresults.xml

- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: Test Results
path: tests/build/bin/**/*.xml
path: build/results/*.xml

event_file:
name: "Event File"
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ LLVM/
transcode report.txt
/examples/*/build
/example_projects/*/build
/build
/build*
/doc/*.md
/core/build
/doc/html
Expand All @@ -129,6 +129,6 @@ VisualGDBCache
vs/*.log

tests/libDaisy_gtest
tests/build/bin/
tests/build/
examples/**/build/

9 changes: 5 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"recommendations": [
"ms-vscode.cpptools",
"ms-vscode.cpptools",
"xaver.clang-format",
"davidschuldenfrei.gtest-adapter",
"vadimcn.vscode-lldb"
"vadimcn.vscode-lldb",
"ms-vscode.cmake-tools",
"matepek.vscode-catch2-test-adapter",
]
}
}
5 changes: 2 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
},
"preLaunchTask": "build-libDaisy-tests",
"osx": {
"type": "lldb",
"MIMode": "lldb",
},
"windows": {
Expand Down Expand Up @@ -48,9 +47,9 @@
"monitor reset"
],
"request": "launch",
"runToMain": true,
"runToEntryPoint": "true",
"servertype": "openocd",
"showDevDebugOutput": true,
"showDevDebugOutput": "none",
"svdFile": "${workspaceRoot}/.vscode/STM32H750x.svd",
"type": "cortex-debug"
}
Expand Down
9 changes: 5 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@
]
},
"testMate.cpp.test.executables": "tests/build/bin/*",
"gtest-adapter.debugConfig": [
"Launch Tests Locally"
"cmake.sourceDirectory": [
"${workspaceFolder}",
"${workspaceFolder}/tests",
],
"gtest-adapter.supportLocation": true,
}
"cmake.buildDirectory": "${sourceDirectory}/build",
}
Loading
Loading