Skip to content

improve: adc avg calc structure #85

improve: adc avg calc structure

improve: adc avg calc structure #85

Workflow file for this run

name: Build firmware
on:
push:
branches:
- '**'
paths:
- 'device/firmware/**'
workflow_call:
workflow_dispatch:
jobs:
build-firmware:
name: make firmware
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: check toolchain cache
id: toolchain-cache
uses: actions/cache@v4
with:
path: toolchain/arm-none-eabi
key: arm-none-eabi
- name: download and extract toolchain
if: steps.toolchain-cache.outputs.cache-hit != 'true'
run: |
url="https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz?rev=e434b9ea4afc4ed7998329566b764309&hash=CA590209F5774EE1C96E6450E14A3E26"
mkdir toolchain
curl -L $url | tar -xJf - -C toolchain
mv toolchain/`ls toolchain` toolchain/arm-none-eabi
- name: build firmware
run: |
cd device/firmware
mkdir -p actions/release
make GCC_PATH=../../toolchain/arm-none-eabi/bin
for file in build/firmware.*; do mv "$file" "${file/firmware./firmware-release.}"; done
mv build/firmware-release.* actions/release
make clean
mkdir -p actions/debug
make GCC_PATH=../../toolchain/arm-none-eabi/bin DEBUG=1
for file in build/firmware.*; do mv "$file" "${file/firmware./firmware-debug.}"; done
mv build/firmware-debug.* actions/debug
- uses: actions/upload-artifact@v4
with:
name: fsk-energymeter-firmware
path: device/firmware/actions