Skip to content

updated bootloader to different pin + updates from klib #7

updated bootloader to different pin + updates from klib

updated bootloader to different pin + updates from klib #7

Workflow file for this run

name: klib bootloader
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 klib
uses: actions/checkout@v3
with:
repository: itzandroidtab/klib
- name: removing example project content
# create a main file that includes all the header files for the current target
run: |
rm -rf ${{github.workspace}}/project/*
- name: Fetching project
uses: actions/checkout@v3
with:
path: "${{github.workspace}}/project/"
- name: arm-none-eabi-gcc install
uses: carlosperate/arm-none-eabi-gcc-action@v1.6.0
with:
release: '12.2.Rel1'
- name: arm-none-eabi-gcc version
run: arm-none-eabi-gcc --version
- 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}}/targets/arm/
- name: generating header
run: |
mkdir -p ${{github.workspace}}/targets/${{matrix.cpu}}/docs
wget -q -O ${{github.workspace}}/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}}/targets/${{matrix.cpu}}/docs/${{matrix.cpu}}.svd --generate=header -o ${{github.workspace}}/targets/${{matrix.cpu}}/ > /dev/null || true
sed -i '/#include "system_/d' ${{github.workspace}}/targets/${{matrix.cpu}}/${{matrix.cpu}}.h
- 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: CC=arm-none-eabi-gcc CXX=arm-none-eabi-g++ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTARGET_CPU=${{matrix.cpu}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/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}}/build/project/klib.elf
${{github.workspace}}/build/project/klib.map
${{github.workspace}}/build/project/klib.lss
${{github.workspace}}/build/project/klib.memory