Merge pull request #466 from ckormanyos/update_docs #2840
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# Copyright Christopher Kormanyos 2021 - 2024. | |
# Distributed under the Boost Software License, | |
# Version 1.0. (See accompanying file LICENSE_1_0.txt | |
# or copy at http://www.boost.org/LICENSE_1_0.txt) | |
name: real-time-cpp | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
schedule: | |
- cron: '40 23 * * *' # run at 11:40 PM UTC | |
jobs: | |
gnumake-clang-tidy-native: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install clang clang-tidy | |
- name: gnumake-clang-tidy-native | |
run: | | |
cd .tidy/make | |
echo "running clang-tidy" | |
echo "make prepare -f make_tidy_01_generic.gmk MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}" | |
echo | |
make prepare -f make_tidy_01_generic.gmk MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }} | |
echo "make tidy -f make_tidy_01_generic.gmk --jobs=8 MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}" | |
make tidy -f make_tidy_01_generic.gmk --jobs=8 MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }} | |
echo | |
echo "verify empty word count of ./tmp/all.tidy_txt" | |
wc ./tmp/all.tidy_txt | grep '0 0 0' | |
target-avr: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ avr, atmega2560 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-avr avr-libc | |
- name: target-avr-${{ matrix.suite }} | |
run: | | |
./target/build/build.sh ${{ matrix.suite }} rebuild | |
ls -la ./bin/ref_app.hex ./bin/ref_app.s19 ./bin/ref_app.map | |
working-directory: ./ref_app/ | |
target-avr-cmake: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ avr, atmega2560 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-avr avr-libc | |
- name: target-avr-cmake-${{ matrix.suite }} | |
run: | | |
mkdir build | |
cd build | |
cmake -Wno-dev ../ref_app -DTRIPLE=avr -DTARGET=${{ matrix.suite }} -DCMAKE_TOOLCHAIN_FILE=../ref_app/cmake/gcc-toolchain.cmake | |
make -j ref_app | |
ls -la ref_app.hex ref_app.s19 ref_app.map | |
working-directory: ./ | |
target-avr-macos: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ avr, atmega2560 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-osx-cross-homebrew-avr | |
run: | | |
echo 'Clone osx-cross/homebrew-avr' | |
echo "" | |
git clone -b main --depth 1 https://github.com/osx-cross/homebrew-avr ${{ runner.workspace }}/homebrew-avr | |
working-directory: ./ | |
- name: install-osx-cross-homebrew-avr | |
run: | | |
echo 'Tap osx-cross/homebrew-avr on MacOS via brew' | |
echo "" | |
echo 'Install osx-cross/homebrew-avr on MacOS via brew' | |
cd ${{ runner.workspace }}/homebrew-avr | |
brew tap osx-cross/avr | |
brew install avr-gcc@12 | |
working-directory: ./ | |
- name: target-avr-macos-${{ matrix.suite }} | |
run: | | |
echo query the GNUmake version | |
make --version | |
echo Add the brew-installed-avr-gcc@12 path | |
PATH="/usr/local/opt/avr-gcc@12/bin:$PATH" | |
echo "" | |
echo Query the avr-gcc version | |
avr-g++ -v | |
echo "" | |
echo Manually call GNUmake to build the target | |
echo "" | |
make -f target/app/make/app_make_linux.gmk rebuild TGT=${{ matrix.suite }} | |
echo "" | |
ls -la ./bin/ref_app.hex ./bin/ref_app.s19 ./bin/ref_app.map | |
working-directory: ./ref_app/ | |
target-arm: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ am335x, bcm2835_raspi_b, lpc11c24, nxp_imxrt1062, stm32f100, stm32f407, stm32f429, stm32f446, stm32h7a3, stm32l100c, stm32l152 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-arm-none-eabi | |
- name: target-arm-${{ matrix.suite }} | |
run: | | |
./target/build/build.sh ${{ matrix.suite }} rebuild | |
ls -la ./bin/ref_app.hex ./bin/ref_app.s19 ./bin/ref_app.map | |
working-directory: ./ref_app/ | |
target-arm-cmake: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ am335x, bcm2835_raspi_b, lpc11c24, nxp_imxrt1062, stm32f100, stm32f407, stm32f429, stm32f446, stm32h7a3, stm32l100c, stm32l152 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-arm-none-eabi | |
- name: target-arm-cmake-${{ matrix.suite }} | |
run: | | |
mkdir build | |
cd build | |
cmake -Wno-dev ../ref_app -DTRIPLE=arm-none-eabi -DTARGET=${{ matrix.suite }} -DCMAKE_TOOLCHAIN_FILE=../ref_app/cmake/gcc-toolchain.cmake | |
make -j ref_app | |
ls -la ref_app.hex ref_app.s19 ref_app.map | |
working-directory: ./ | |
target-arm-macos: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ am335x, bcm2835_raspi_b, lpc11c24, nxp_imxrt1062, stm32f100, stm32f407, stm32f429, stm32f446, stm32h7a3, stm32l100c, stm32l152 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: wget-macos-gnu-arm-toolchain | |
run: | | |
echo 'wget-macos-gnu-arm-toolchain' | |
echo "" | |
mkdir -p macos-gnu-arm-toolchain && cd macos-gnu-arm-toolchain | |
wget --no-check-certificate https://developer.arm.com/-/media/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-darwin-x86_64-arm-none-eabi.tar.xz | |
working-directory: ${{ runner.workspace }} | |
- name: unpack-macos-gnu-arm-toolchain | |
run: | | |
cd ${{ runner.workspace }}/macos-gnu-arm-toolchain | |
tar -xvf arm-gnu-toolchain-12.3.rel1-darwin-x86_64-arm-none-eabi.tar.xz | |
- name: target-arm-macos-${{ matrix.suite }} | |
run: | | |
echo 'set and verify add path macos gnu arm toolchain' | |
PATH="${{ runner.workspace }}/macos-gnu-arm-toolchain/arm-gnu-toolchain-12.3.rel1-darwin-x86_64-arm-none-eabi/bin:$PATH" | |
echo "" | |
echo 'arm-none-eabi-g++ -v' | |
arm-none-eabi-g++ -v | |
echo "" | |
echo query the GNUmake version | |
make --version | |
echo Manually call GNUmake to build the target | |
echo "" | |
make -f target/app/make/app_make_linux.gmk rebuild TGT=${{ matrix.suite }} | |
echo "" | |
ls -la ./bin/ref_app.hex ./bin/ref_app.s19 ./bin/ref_app.map | |
working-directory: ./ref_app/ | |
target-riscvfe310: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ riscvfe310 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: | | |
wget --no-check-certificate https://buildbot.embecosm.com/job/riscv32-gcc-ubuntu2204-release/6/artifact/riscv32-embecosm-ubuntu2204-gcc13.1.0.tar.gz | |
tar -xvzf riscv32-embecosm-ubuntu2204-gcc13.1.0.tar.gz | |
working-directory: ./ | |
- name: target-riscvfe310-${{ matrix.suite }} | |
run: | | |
PATH=../riscv32-embecosm-ubuntu2204-gcc13.1.0/bin:$PATH | |
./target/build/build.sh ${{ matrix.suite }} rebuild | |
ls -la ./bin/ref_app.elf ./bin/ref_app.hex ./bin/ref_app.map ./bin/ref_app.s19 | |
working-directory: ./ref_app/ | |
target-x86_64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: build-target-x86_64-w64-mingw32 | |
run: | | |
./target/build/build.sh x86_64-w64-mingw32 rebuild | |
ls ./bin/ref_app.exe | |
working-directory: ./ref_app/ | |
shell: bash | |
target-host-cmake: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: build-target-host | |
run: | | |
mkdir build | |
cd build | |
cmake -Wno-dev ../ref_app -DTARGET=host -DCMAKE_TOOLCHAIN_FILE=../ref_app/cmake/gcc-toolchain.cmake | |
make -j ref_app | |
ls ref_app.exe ref_app.map | |
working-directory: ./ | |
shell: bash | |
msvc-msbuild: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: cmd | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ Debug, Release ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
toolset: 14.2 | |
- name: msvc-msbuild-${{ matrix.suite }} | |
run: | | |
MSBuild -m ref_app.sln -p:Configuration=${{ matrix.suite }} -p:Platform=x64 /t:Rebuild | |
dir .\tmp\${{ matrix.suite }}\ref_app.exe | |
working-directory: ./ref_app/ | |
benchmark_gcc-clang: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ g++, clang++ ] | |
standard: [ c++14, c++17, c++2a ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
working-directory: ./ | |
- name: clone-cppalliance-decimal | |
run: | | |
git clone -b develop --depth 1 https://github.com/cppalliance/decimal.git ../cppalliance-decimal-root | |
working-directory: ./ | |
- name: benchmark_gcc-clang | |
run: ./target/build/test_app_benchmarks.sh ${{ matrix.compiler }} ${{ matrix.standard }} | |
working-directory: ./ref_app/ | |
benchmark_gcc-clang-8-9: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ g++-8, g++-9, clang++-8, clang++-9 ] | |
standard: [ c++14, c++17 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install g++-8 g++-9 clang-8 clang-9 | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
working-directory: ./ | |
- name: clone-cppalliance-decimal | |
run: | | |
git clone -b develop --depth 1 https://github.com/cppalliance/decimal.git ../cppalliance-decimal-root | |
working-directory: ./ | |
- name: benchmark_gcc-clang-8-9 | |
run: ./target/build/test_app_benchmarks.sh ${{ matrix.compiler }} ${{ matrix.standard }} | |
working-directory: ./ref_app/ | |
benchmark_gcc-clang-10: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ g++-10, clang++-10 ] | |
standard: [ c++14, c++17, c++20 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-10 clang-10 | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
working-directory: ./ | |
- name: clone-cppalliance-decimal | |
run: | | |
git clone -b develop --depth 1 https://github.com/cppalliance/decimal.git ../cppalliance-decimal-root | |
working-directory: ./ | |
- name: benchmark_gcc-clang-10 | |
run: ./target/build/test_app_benchmarks.sh ${{ matrix.compiler }} ${{ matrix.standard }} | |
working-directory: ./ref_app/ | |
benchmark_apple-clang: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ g++, clang++ ] | |
standard: [ c++14, c++17, c++2a ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
working-directory: ./ | |
- name: clone-cppalliance-decimal | |
run: | | |
git clone -b develop --depth 1 https://github.com/cppalliance/decimal.git ../cppalliance-decimal-root | |
working-directory: ./ | |
- name: benchmark_apple-clang | |
run: ./target/build/test_app_benchmarks.sh ${{ matrix.compiler }} ${{ matrix.standard }} | |
working-directory: ./ref_app/ | |
benchmark_builds-avr: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-avr avr-libc | |
- name: benchmark_builds-avr | |
run: ./target/build/test_app_benchmarks_avr.sh ${{ matrix.standard }} | |
working-directory: ./ref_app/ | |
benchmark_builds-stm32f446: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14, c++17, c++2a ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-arm-none-eabi | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
working-directory: ./ | |
- name: clone-cppalliance-decimal | |
run: | | |
git clone -b develop --depth 1 https://github.com/cppalliance/decimal.git ../cppalliance-decimal-root | |
working-directory: ./ | |
- name: benchmark_builds-stm32f446 | |
run: ./target/build/test_app_benchmarks_stm32f446.sh ${{ matrix.standard }} | |
working-directory: ./ref_app/ | |
benchmark_single-stm32f446: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-arm-none-eabi | |
- name: benchmark_single-stm32f446 | |
run: | | |
mkdir -p bin | |
arm-none-eabi-g++ -std=c++14 -Wall -Wextra -pedantic -O2 -g -gdwarf-2 -ffunction-sections -fdata-sections -x c++ -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=32 -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=soft -mno-unaligned-access -mno-long-calls -I./src/mcal/stm32f446 -I./src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_CRC -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_crc.cpp ./target/micros/stm32f446/make/single/crt.cpp -nostartfiles -Wl,--gc-sections -Wl,-Map,./bin/app_benchmark_crc.map -T ./target/micros/stm32f446/make/stm32f446.ld -o ./bin/app_benchmark_crc.elf | |
arm-none-eabi-objcopy ./bin/app_benchmark_crc.elf -O ihex ./bin/app_benchmark_crc.hex | |
ls -la ./bin/app_benchmark_crc.elf ./bin/app_benchmark_crc.hex ./bin/app_benchmark_crc.map | |
working-directory: ./ref_app/ | |
benchmark_single-cnl: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ g++, clang++ ] | |
standard: [ c++20 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: benchmark_single-cnl | |
run: | | |
git clone -b main --depth 1 https://github.com/johnmcfarlane/cnl.git ../cnl-root | |
mkdir -p bin | |
${{ matrix.compiler }} -std=${{ matrix.standard }} -Wall -Werror -O3 -march=native -fsanitize=address -I./src -I../cnl-root/include -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_CNL_SCALED_INTEGER -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_cnl_scaled_integer.cpp -o ./bin/app_benchmark_cnl_scaled_integer.exe | |
ls -la ./bin/app_benchmark_cnl_scaled_integer.exe | |
./bin/app_benchmark_cnl_scaled_integer.exe | |
working-directory: ./ref_app/ | |
benchmark_single-stm32f429-qemu-cnl: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: | | |
sudo apt install libncurses5 libpython2.7 | |
mkdir -p emu_env && cd emu_env | |
wget --no-check-certificate https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
tar -xvf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
wget --no-check-certificate https://github.com/xpack-dev-tools/qemu-arm-xpack/releases/download/v7.1.0-1/xpack-qemu-arm-7.1.0-1-linux-x64.tar.gz | |
tar -xvzf xpack-qemu-arm-7.1.0-1-linux-x64.tar.gz | |
working-directory: ./ref_app/ | |
- name: benchmark_single-stm32f429-qemu-cnl | |
run: | | |
git clone -b main --depth 1 https://github.com/johnmcfarlane/cnl.git ../cnl-root | |
mkdir -p bin | |
./emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++ -std=c++20 -Wall -Wextra -pedantic -O2 -g -gdwarf-2 -ffunction-sections -fdata-sections -x c++ -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=128 -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=soft -mno-unaligned-access -mno-long-calls -I./src/mcal/stm32f429 -I./src -I../cnl-root/include -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_CNL_SCALED_INTEGER -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_cnl_scaled_integer.cpp ./target/micros/stm32f429/make/single/crt.cpp -nostartfiles -Wl,--gc-sections -Wl,-Map,./bin/app_benchmark_cnl_scaled_integer.map -T ./target/micros/stm32f429/make/stm32f429.ld -o ./bin/app_benchmark_cnl_scaled_integer.elf | |
./emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-objcopy ./bin/app_benchmark_cnl_scaled_integer.elf -O ihex ./bin/app_benchmark_cnl_scaled_integer.hex | |
ls -la ./bin/app_benchmark_cnl_scaled_integer.elf ./bin/app_benchmark_cnl_scaled_integer.hex ./bin/app_benchmark_cnl_scaled_integer.map | |
working-directory: ./ref_app/ | |
- name: emulate-target stm32f429 | |
run: | | |
./emu_env/xpack-qemu-arm-7.1.0-1/bin/qemu-system-gnuarmeclipse --verbose --mcu STM32F429ZI --nographic --gdb tcp::9999 -d unimp,guest_errors & | |
working-directory: ./ref_app/ | |
- name: run-test-on-target | |
run: | | |
./emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb-py ./bin/app_benchmark_cnl_scaled_integer.elf -x ./target/build/test_app_benchmarks_emulator.py | |
qemu_result=$? | |
echo "qemu_result" "$qemu_result" | |
echo "qemu_result" "$qemu_result" | grep 'qemu_result 0' | |
working-directory: ./ref_app/ | |
benchmark_single-stm32f429-qemu: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: | | |
sudo apt install libncurses5 libpython2.7 | |
mkdir -p emu_env && cd emu_env | |
wget --no-check-certificate https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
tar -xvf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
wget --no-check-certificate https://github.com/xpack-dev-tools/qemu-arm-xpack/releases/download/v7.1.0-1/xpack-qemu-arm-7.1.0-1-linux-x64.tar.gz | |
tar -xvzf xpack-qemu-arm-7.1.0-1-linux-x64.tar.gz | |
working-directory: ./ref_app/ | |
- name: build benchmark_single-stm32f429 | |
run: | | |
mkdir -p bin | |
emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++ -std=c++20 -Wall -Wextra -pedantic -O0 -g -gdwarf-2 -ffunction-sections -fdata-sections -x c++ -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=32 -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=soft -mno-unaligned-access -mno-long-calls -I./src/mcal/stm32f429 -I./src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_CRC -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_crc.cpp ./target/micros/stm32f429/make/single/crt.cpp -nostartfiles -Wl,--gc-sections -Wl,-Map,./bin/app_benchmark_crc.map -T ./target/micros/stm32f429/make/stm32f429.ld --specs=nano.specs --specs=nosys.specs -o ./bin/app_benchmark_crc.elf | |
emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-objcopy ./bin/app_benchmark_crc.elf -O ihex ./bin/app_benchmark_crc.hex | |
ls -la ./bin/app_benchmark_crc.elf ./bin/app_benchmark_crc.hex ./bin/app_benchmark_crc.map | |
working-directory: ./ref_app/ | |
- name: emulate-target stm32f429 | |
run: | | |
./emu_env/xpack-qemu-arm-7.1.0-1/bin/qemu-system-gnuarmeclipse --verbose --mcu STM32F429ZI --nographic --gdb tcp::9999 -d unimp,guest_errors & | |
working-directory: ./ref_app/ | |
- name: run-test-on-target | |
run: | | |
./emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb-py ./bin/app_benchmark_crc.elf -x ./target/build/test_app_benchmarks_emulator.py | |
qemu_result=$? | |
echo "qemu_result" "$qemu_result" | |
echo "qemu_result" "$qemu_result" | grep 'qemu_result 0' | |
working-directory: ./ref_app/ |