updated comments from template #8
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
name: flash loader lpc1756 is25lq040b | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: MinSizeRel | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
# You can convert this to a matrix build if you need cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cpu: [ lpc1756 ] | |
steps: | |
- name: Fetching project | |
uses: actions/checkout@v3 | |
with: | |
path: "${{github.workspace}}/ofl/" | |
- name: Fetching klib | |
uses: actions/checkout@v3 | |
with: | |
repository: itzandroidtab/klib | |
path: "${{github.workspace}}/klib/" | |
- name: getting arm headers | |
uses: actions/checkout@v3 | |
with: | |
repository: ARM-software/CMSIS_5 | |
ref: 'develop' | |
fetch-depth: '1' | |
path: './CMSIS' | |
- name: moving arm headers | |
run: | | |
cp ${{github.workspace}}/CMSIS/CMSIS/Core/Include/* ${{github.workspace}}/klib/targets/arm/ | |
- name: generating header | |
run: | | |
mkdir -p ${{github.workspace}}/klib/targets/${{matrix.cpu}}/docs | |
wget -q -O ${{github.workspace}}/klib/targets/${{matrix.cpu}}/docs/${{matrix.cpu}}.svd https://raw.githubusercontent.com/itzandroidtab/klib-svd/master/${{matrix.cpu}}.svd | |
wget -q -O ${{github.workspace}}/svdconv.tbz2 https://github.com/Open-CMSIS-Pack/devtools/releases/download/tools%2Fsvdconv%2F3.3.44/svdconv-3.3.44-linux64-amd64.tbz2 | |
tar -xf ${{github.workspace}}/svdconv.tbz2 | |
chmod +x ${{github.workspace}}/svdconv | |
${{github.workspace}}/svdconv ${{github.workspace}}/klib/targets/${{matrix.cpu}}/docs/${{matrix.cpu}}.svd --generate=header -o ${{github.workspace}}/klib/targets/${{matrix.cpu}}/ > /dev/null || true | |
sed -i '/#include "system_/d' ${{github.workspace}}/klib/targets/${{matrix.cpu}}/${{matrix.cpu}}.h | |
- name: arm-none-eabi-gcc install | |
uses: carlosperate/[email protected] | |
with: | |
release: '12.2.Rel1' | |
- name: arm-none-eabi-gcc version | |
run: arm-none-eabi-gcc --version | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: | | |
cd ${{github.workspace}}/ofl/ | |
CC=arm-none-eabi-gcc CXX=arm-none-eabi-g++ cmake -B ${{github.workspace}}/ofl/build | |
- name: Build | |
# Build your program with the given configuration | |
run: | | |
cd ${{github.workspace}}/ofl/ | |
cmake --build ${{github.workspace}}/ofl/build --config ${{env.BUILD_TYPE}} | |
- name: Uploading artifact | |
uses: actions/upload-artifact@v3 | |
# upload the elf file as a artifact | |
with: | |
name: ${{matrix.cpu}} | |
path: | | |
${{github.workspace}}/ofl/build/flash_loader.elf | |
${{github.workspace}}/ofl/build/flash_loader.map | |
${{github.workspace}}/ofl/build/flash_loader.lss | |
${{github.workspace}}/ofl/build/flash_loader.memory |