Skip to content

Commit

Permalink
FSK Support (#252)
Browse files Browse the repository at this point in the history
* Make a 3.4 Branch

* SIGNALDuino.ino | SIGNALESP.ino

Fixes default parameter definition

* Implement a Wifi reconnect event to restart the telnet server (#120)

* SIGNALESP.ino

Implement a Wifi reconnect event to restart the telnet server
Set ArduinoJson Version to the desired one

* commands.h

fixed output of version after ping response

* fix names

- fix cc1101 name

* FIX: value of success must be saved before calling reset()

success must be saved before calling reset() because reset() will set it back to FALSE

* [SIGNALESP] FIX: Min. timer time for cronTimer is 1ms

if duration is greater than maxPulse it could happen that the timer time for the cronjob timer becomes negative (or a big value if it is unsigned)

* NEW: Settings if LED_BUILTIN on WEMOS boards as PIN_LED

* baseline for plattformio

* Changes to be compatible with plattformio

* signalesp.h

prevent crash if first char is a linebreak or #

* commands.h

fix unsupported command output which caused a crash

* Arduino IDE compatibility

Added sym links to project files to support arduino compatible layout

* Linked ArduinoJson per file

* platformio.ini

corrected exclude for arduino-ide compatible directory

* corrected CMakeLists.txt for testproject

added testproject to plattformio.ini (does not work)

* build.sh

updated build config and travis config for arduino-ide dir structure

* change travis build config

* clear links

* modified symlinks to be relative

* remove some symlinks to add again

* added symlinks again

* rename dir

* removed file to link later

* added symlinks

* build.sh deploy.sh

executable flag added

* added missing timerone header

* added missing cpp file

* fix compile

* travis

changed arduino core version to 2.6.3

* travis

update arduino cmd

* fixed arduino cmd

* added missing symlinks

* cc1101.cppAdded wait_miso call after select to repair factory reset

* signalesp.h

fixed crash with ; as command

* signalesp.h

modified connection handling

commands.h

added dumpEEPROM when doing factory reset

* SimpleFIFO.h

enqueue: ICACHE_RAM_ATTR added to support usage via interrupt

* Version 3.4.0-dev+20200216

* platformio.ini

added nanocc1101 and nanocc1101@debug

* send.h
fix unexpected serial print until null termination char is found

* platformio.ini

Compile definition for serval boards added

* send.h
cleanup some code

* signalDecoder/src/signalDecoder.cpp

prevents crashes

* Update some compile errors

* Update platformio.ini

* added different bootloaders
* revised HW names
* revised minicul 8/16MHz
* added monitor_port / upload_port variable to define on start

* Update cc1101.cpp

* fix
- no compile in Arduino IDE from nano, promini, esp8266 without cc1101 but with DEBUG flag
- no compile in PlatformIO from nano, promini, esp8266 without cc1101 but with DEBUG flag

* Update signalduino.h

* revised PROGVERS

* Update signalduino.h

* wrong date from PR

* Update platformio.ini

* revised ESP32 config to upload and view monitor

* Update platformio.ini

* revised ESP32 device useful note
* duplicate ESP32 device for DEBUG

* commands.h

add 0x17 chipid for cc1101

* Update commands.h

Fixes syntax, corrected chipid
#133

* ESP32 support (#134)

 * revised for ESP32 (#130)
platformio.ini
  * revised
  * remove comments & sort devices
  * remove @lastest comment from esp8266
compile_config.h
  * added PIN´s for ESP32
  * revised comments
signalesp.h
  * revised code for ESP32 (timings, WiFi.events)
  * fix code line event
signalduino.h
  * revised date
README.md
  * added doc

* Update .travis.yml - ESP32 compile (#137)

* Update .travis.yml
* option to compile ESP32 11d8ece

* Update .travis.yml
* option to compile ESP32 without cc1101 11d8ece

* Maple Mini (stm32f103cbt6) support (#136)

* Hardware stm32f103cbt6 integrated
* code and config adapted to compile with and without cc1101

* Update dev r3.4 with PlattformIO Updates incl STM Support (#138)

* signalesp.h

prevent crash if first char is a linebreak or #
fixed crash with ; as command
modified connection handling


* commands.h

added dumpEEPROM when doing factory reset
fix unsupported command output which caused a crash
add 0x17 chipid for cc1101

* Arduino IDE compatibility

Added sym links to project files to support arduino compatible layout

* Linked ArduinoJson per file

* platformio.ini

corrected exclude for arduino-ide compatible directory

* corrected CMakeLists.txt for testproject

added testproject to plattformio.ini (does not work)


* build.sh

updated build config and travis config for arduino-ide dir structure

* travis

changed arduino core version to 2.6.3

* cc1101.cpp
Added wait_miso call after select to repair factory reset


* SimpleFIFO.h

enqueue: ICACHE_RAM_ATTR added to support usage via interrupt


* send.h
fix unexpected serial print until null termination char is found
cleanup some code

* signalDecoder/src/signalDecoder.cpp
prevents crashes

* Update some compile errors

* ESP32 support (#134)

* Maple Mini (stm32f103cbt6) support (#136)

* Update platformio.ini (#141)

* added radinoCC1101 to compile
* revised comments
* testet again all PIN´s and compatibility
  (ICT radino is based on Arduino Leonardo & Micro)

* fix - strobe commands register (#140)

* Update cc1101.cpp

* fix strobe commands register

* Update / fix deploy travis config (#142)

* travis.yml

updated yml for successful deployment of release
fixed some yaml warnings on travis

* extension of xFSK mode (#145)

* xFSK extension

extra_script.py
  * creation file for easy file generation (firmware)
platformio.ini
  * extension of hardware and special debug versions

any files: bitstore.h, cc1101.cpp, cc1101.h, commands.h,
compile_config.h, functions.h, output.cpp, output.h,
send.h, signalDecoder.cpp, signalDecoder.h, signalSTM.h,
signalduino.h, signalesp.h
  * extension of xFSK mode (send & receive)
  * change notation of calls due to excessive memory consumption
    (smaller alternative is used)
  * memory comparison completed -> optimizations for the program sequence
    - processing on weak hardware runs faster, example: radino, nano
    - more memory space of the processors
  * revised debug texts

* create symblink

* Update signalDecoder.cpp

  * revised comment for a clear statement

* Update signalDecoder.h

  * added comments
  * added SIGNALduino project query added for linkage

* Update output.cpp

  * added SIGNALduino project query added for linkage

* rename variable and revised comments

* revised comments to better understanding

* optimized code / string class / xFSK send call

cc1101.cpp
  * revised string class in void sendFIFO
  * optimized void sendFIFO
cc1101.h
  * revised call void
send.h
  *  optimized call xFSK to send

* Update output.cpp

* revised size comments

* Update signalDecoder.h

* added comments
* macro SDC_PRINT, SDC_WRITE, SDC_PRINTLN inserted to test

* Update compile_config.h

* Update compile_config.h

* revised code

signalDecoder.cpp
  * MSG_PRINT | DBG_PRINT write back to SDC_PRINT
  * optimized some lines
output.cpp
  * revised comments

* back to big memory size functions

signalDecoder.cpp
  * back to big memory size sprintf to save ready compile
platformio.ini
  * revised some comments to view result

* Update signalDecoder.cpp

* back to big memory size sprintf to save ready compile

* Update signalDecoder.cpp

* back to big memory size sprintf to save ready compile

* Update platformio.ini

* revised comments size & version

* Update signalDecoder.cpp

* fix not compile with define DEBUGDECODE
  (wrong parameter, macro "SDC_WRITE" passed 2 arguments, but takes just 1)

* Update signalDecoder.cpp

* fix not compile with define DEBUGDECODE
(in POI | error:   initializing argument 1 of .... )

* Update platformio.ini

* sort hardware for better overview
* revised sketch size comments

* Update compile_config.h

* Update output.cpp

* for test

* delete output.cpp

* delete output.cpp
(UNITTEST have no link to compile_config.h)
* added functions in some files

* update code after REVIEW

send.h
  * #145 (comment)
 * remove omment
compile_config.h
  * #145 (comment)
  * revised PROGVERS variable
cc1101.cpp
  * corrected indentation
signalDecoder.h
  * #145 (comment)
  * comment changed

* create output.cpp for functions in project

cc1101.cpp
  * transfer function MSG_PRINTtoHEX
functions.h
  * transfer function DBG_PRINTtoHEX

* create symblink

* fix output ESP32 & ESP 8266 (#148)

* fix output ESP32 & ESP 8266
- fix, no calling of commands possible

* dev-r3.5_xFSK_tab_comments - revision indentation (#149)

* Update signalDecoder.cpp
  * revised indentations
  * revised comments

* Update signalDecoder.h
  * revised comments

* Update compile_config.h
  * revised version

* sketch optimized for hardware with little flash (#150)

* sketch optimized for hardware with little flash

* platformio.ini
  - revised sketch size comments
* signalesp.h
  -  increase writeBufferSize
* compile_config.h
  - revised PROGVERS
  - revised comments
* signalDecoder.h
  - added new function
* signalDecoder.cpp
  - added new functions myitoa (selfmade alternative to non standard itoa function c++)
  - remove some sprintf and revised to alternate better sketch size function SDC_PRINT
  - remove old comments
  - added function SDC_PRINT_intToHex / nibble_to_HEX
  - limit array

* fix writeBufferSize for ESP

* fix writeBufferSize for ESP (#151)

* CI Jobs auf Gihub actions übertragen (#152)

* .github\workflows\unittest.yml

Added unittest workflow
Made scrips executable and renamed travis ci yaml file
Use more recent (latest supported rapidassist) version
added all boards and combinations to workflow
excluded some combinations
Added github actions unittest workflow, which tests and uploads to a created relese

* Compile micro8 mhz (#155)

* .github\workflows\unittest.yml

- added radino board with incicuit board files
- Added dependency between unittest and deploy jobs to run in sequence
- renamed firmware to be compatible with flash command from module

* Update README.md
Updated badge in readme

* Codequality check via Github Actions (#154)

* Create codeql-analysis.yml

* Delete build.sh

* Delete deploy.s

* created .github\actions\arduino-cli\action.yml

move common steps to prepatr arduino-cli into a composite step and refenrence on it in the workflows:
- workflows/codeql-analysis.yml
- workflows/unittest.yml

* Upload compiled firmwares always as artifacs (#159)

 Artifacts are always placed at github actions to get the compiled firmware files

* fix-esp8266-firmware-debug (#158)

* ./github/unittest.yml

- Removed debug options for compiler (esp8266) #157
- Upload compiled firmwares always as artifacs (#159)
- generate a comment output with the flash and ram usage
- changed submodule checkout to checkout action

* unittest.yml

run comments only if this is a pullrequest

* Update action.yml

spell fix

* Update compile_config.h (#156)

* Update signalduino.h

Add all pins as input pullup

* Fix wait_Miso defines in cc1101.h (#213)

Static variables are only initialized once so the implementation only
worked for a total of 255 iterations.
After that, functions like cmdStrobe(), readReg() or
writeReg() return immediately if the MISO pin is high.

The variable miso_count is now out of while's scope and therefore no
longer needs to be static.

* Fix - GFSK & nano crash (#211)

* dev-r3.5_xFSK Bugfix GFSK
 - Allows other modulations than ASK / OOK and 2-FSK to be received.

* fix nano328 send crash
 - revised PROGVERS
 - pins excluded to avoid crash
 - revised comment & changed pins
 - revised code PullUp loop #211 (comment)

* Fixes a endless loop in mcdecoder  (#228)

* CMakeList.txt
- Added policy for new cmake versions

* win32arduino
- updated to newest version

* test.cpp
- Added test to find endlesslopp

* signalDecoder.cpp
- try to avoid var overflow
- modify if conditions checking

* signalDecoder.cpp
- Fix not stopping early enough

* signalDecoder.cpp
- fix to last exit for shorts

* signalDecoder.cpp
- revert mpi and mpiplusone checking

* install_rapidassists.sh
- Update to version 0.10.0 to be compatible with win32arduino

* Update codeql-analysis.yml , platformio.ini (#244)

* Update codeql-analysis.yml

* Update platformio.ini
 - remove old event
 - update information
 - comment out hardware bootloader_v2 due to errors in the core

* Update unittest.yml

* Update signalDecoder.cpp (#245)

* Update signalDecoder.cpp
  - fix, code cannot compile with debug option DEBUGDECODE

* Update codeql-analysis.yml
  - use actions checkout also for submodules

* LED confirms receipt of FSK (#251)

Pin reception works at FSK inverted to OOK.

* Update platformio.ini

- useful hints added

Co-authored-by: HomeAutoUser <[email protected]>
Co-authored-by: uwekaditz <[email protected]>
Co-authored-by: devzero84 <[email protected]>
Co-authored-by: Udo <[email protected]>
  • Loading branch information
5 people authored Jul 7, 2022
1 parent 68e6c02 commit b04cb21
Show file tree
Hide file tree
Showing 31 changed files with 2,916 additions and 2,048 deletions.
28 changes: 28 additions & 0 deletions .github/actions/arduino-cli/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'setup arduino-cli and plattform'
description: 'install plattform into arduino-cli to be ready to compile'
inputs:
boardurl:
description: 'URL of arduino compatible package.json'
required: false
default: ''
plattform:
description: 'plattform name(s), which shoud be installed'
required: true
default: 'arduino:avr'

runs:
using: "composite"
steps:
- name: Prepare plattform installation
run: arduino-cli core update-index ${{ inputs.boardurl }}
shell: bash
- name: Install plattform
run: arduino-cli core install ${{ inputs.plattform }} ${{ inputs.boardurl }}
shell: bash
- name: install pyserial
run: |
if [ ${{ inputs.plattform }} == "esp32:esp32" ]
then
pip install pyserial
fi;
shell: bash
117 changes: 117 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: "CodeQL"

on:
push:
branches: [ master, dev-r3.5_xFSK]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, dev-r3.5_xFSK]
schedule:
- cron: '19 17 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- BOARD: nano
RECEIVER: cc1101
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:nano:cpu=atmega328'
compilerflag: '\"-DOTHER_BOARD_WITH_CC1101=1\"'
- BOARD: nano328
RECEIVER: ""
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:nano:cpu=atmega328'
- BOARD: radino
RECEIVER: cc1101
arduino-platform: 'arduino:avr In-Circuit:avr'
fqbn: 'In-Circuit:avr:radinoCC1101'
boardurl: '--additional-urls=https://library.radino.cc/Arduino_1_8/package_radino_radino32_index.json'
compilerflag: \"-DARDUINO_RADINOCC1101=1\"
build_param1: "compiler.path={runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path}/bin/"
- BOARD: minicul
RECEIVER: cc1101
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:pro:cpu=8MHzatmega328'
compilerflag: \"-DARDUINO_ATMEGA328P_MINICUL=1\"
- BOARD: promini
RECEIVER: ""
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:pro:cpu=8MHzatmega328'
- BOARD: ESP32
RECEIVER: cc1101
arduino-platform: 'esp32:esp32'
fqbn: 'esp32:esp32:esp32:FlashMode=qio,FlashFreq=80'
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\"
boardurl: '--additional-urls=https://dl.espressif.com/dl/package_esp32_index.json'
- BOARD: ESP32
RECEIVER: ""
arduino-platform: 'esp32:esp32'
fqbn: 'esp32:esp32:esp32:FlashMode=qio,FlashFreq=80'
boardurl: '--additional-urls=https://dl.espressif.com/dl/package_esp32_index.json'
- BOARD: ESP8266
RECEIVER: cc1101
arduino-platform: 'esp8266:[email protected]'
fqbn: 'esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40,dbg=Serial,lvl=CORE'
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\"
boardurl: '--additional-urls=https://arduino.esp8266.com/stable/package_esp8266com_index.json'
- BOARD: ESP8266
RECEIVER: ""
arduino-platform: 'esp8266:[email protected]'
fqbn: 'esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40,dbg=Serial,lvl=CORE'
boardurl: '--additional-urls=https://arduino.esp8266.com/stable/package_esp8266com_index.json'
- BOARD: MAPLEMINI_F103CB
RECEIVER: cc1101
arduino-platform: 'STM32:stm32'
fqbn: 'STM32:stm32:GenF1:pnum=MAPLEMINI_F103CB'
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\"
boardurl: '--additional-urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json'
- BOARD: MAPLEMINI_F103CB
RECEIVER: ""
arduino-platform: 'STM32:stm32'
fqbn: 'STM32:stm32:GenF1:pnum=MAPLEMINI_F103CB'
boardurl: '--additional-urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json'
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: cpp
- name: Install Arduino CLI
uses: arduino/[email protected]

- name: Setup arduino-cli
uses: ./.github/actions/arduino-cli
with:
boardurl: ${{ matrix.boardurl }}
plattform: ${{ matrix.arduino-platform }}

- name: Static link
run:
|
# static link fix from https://github.com/github/securitylab/discussions/171
for file in ~/.arduino15/packages/*/tools/*-gcc/*/bin/*; do
if [ -x "$file" ]
then
mv "$file" "$file.real";
printf '#!/bin/bash\nexec "'"$file"'.real" ${1+"$@"}\n' > "$file";
chmod +x "$file";
fi;
done;

- name: Compile sketch
id: compile_sketch
run:
arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property="compiler.cpp.extra_flags=${{ matrix.compilerflag }}" ${{ matrix.boardurl }} --build-property="${{ matrix.build_param1 }}" --output-dir=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/src/arduino-ide/SIGNALDuino/SIGNALDuino.ino --warnings=all

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
140 changes: 80 additions & 60 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ on:
release:
types: [created, prereleased, published]
workflow_dispatch: null
pull_request: null
jobs:
unittest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
submodules: true
- name: prepare env
run: >
echo "TRAVIS_BUILD_DIR=$PWD" >> $GITHUB_ENV
Expand All @@ -16,8 +19,7 @@ jobs:
$GITHUB_ENV
echo "GTEST_ROOT=$CMAKE_PREFIX_PATH/googletest" >> $GITHUB_ENV
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
- name: Install tools
run: |
echo "::group::googletest"
Expand Down Expand Up @@ -46,78 +48,57 @@ jobs:
ls -l
./bin/TestProject
deploy:
needs: unittest
strategy:
fail-fast: false
matrix:
BOARD:
- nano328
- leonardo
#- radino
- minicul
- promini
- ESP32
RECEIVER:
- cc1101
- simple
exclude:
- BOARD: radino
RECEIVER: simple
- BOARD: promini
RECEIVER: cc1101
- BOARD: minicul
RECEIVER: simple
- BOARD: leonardo
RECEIVER: simple
include:
- BOARD: nano328
- BOARD: nano
RECEIVER: cc1101
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:nano:cpu=atmega328'
compilerflag: '\"-DOTHER_BOARD_WITH_CC1101=1\"'
- BOARD: nano328
RECEIVER: simple
RECEIVER: ""
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:nano:cpu=atmega328'
# - BOARD: radino
# arduino-platform: 'arduino:avr In-Circuit:avr'
# fqbn: 'In-Circuit:avr:radinoCC1101'
# boardurl: '--additional-urls=https://library.radino.cc/Arduino_1_8/package_radino_radino32_index.json'
# compilerflag: \"-DARDUINO_AVR_ICT_BOARDS_ICT_BOARDS_AVR_RADINOCC1101=1\" \"-DUSB_VID=0x2341\" \"-DUSB_PID=0x8036\"
- BOARD: leonardo
- BOARD: radino
RECEIVER: cc1101
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:leonardo'
compilerflag: \"-DARDUINO_AVR_ICT_BOARDS_ICT_BOARDS_AVR_RADINOCC1101=1\"
arduino-platform: 'arduino:avr In-Circuit:avr'
fqbn: 'In-Circuit:avr:radinoCC1101'
boardurl: '--additional-urls=https://library.radino.cc/Arduino_1_8/package_radino_radino32_index.json'
compilerflag: \"-DARDUINO_RADINOCC1101=1\"
build_param1: "compiler.path={runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path}/bin/"
- BOARD: minicul
RECEIVER: cc1101
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:pro:cpu=8MHzatmega328'
compilerflag: \"-DARDUINO_ATMEGA328P_MINICUL=1\"
- BOARD: promini
RECEIVER: simple
RECEIVER: ""
arduino-platform: 'arduino:avr'
fqbn: 'arduino:avr:pro:cpu=8MHzatmega328'
- BOARD: ESP32
RECEIVER: cc1101
arduino-platform: 'esp32:esp32'
fqbn: 'esp32:esp32:esp32:FlashMode=qio,FlashFreq=80'
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\"
boardurl: '--additional-urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json'
boardurl: '--additional-urls=https://dl.espressif.com/dl/package_esp32_index.json'
- BOARD: ESP32
RECEIVER: simple
RECEIVER: ""
arduino-platform: 'esp32:esp32'
fqbn: 'esp32:esp32:esp32:FlashMode=qio,FlashFreq=80'
boardurl: '--additional-urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json'
boardurl: '--additional-urls=https://dl.espressif.com/dl/package_esp32_index.json'
- BOARD: ESP8266
RECEIVER: cc1101
arduino-platform: 'esp8266:[email protected]'
fqbn: 'esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40,dbg=Serial,lvl=CORE'
fqbn: 'esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40'
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\"
boardurl: '--additional-urls=https://arduino.esp8266.com/stable/package_esp8266com_index.json'
- BOARD: ESP8266
RECEIVER: simple
RECEIVER: ""
arduino-platform: 'esp8266:[email protected]'
fqbn: 'esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40,dbg=Serial,lvl=CORE'
fqbn: 'esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40'
boardurl: '--additional-urls=https://arduino.esp8266.com/stable/package_esp8266com_index.json'
- BOARD: MAPLEMINI_F103CB
RECEIVER: cc1101
Expand All @@ -126,51 +107,90 @@ jobs:
compilerflag: \"-DOTHER_BOARD_WITH_CC1101=1\"
boardurl: '--additional-urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json'
- BOARD: MAPLEMINI_F103CB
RECEIVER: simple
RECEIVER: ""
arduino-platform: 'STM32:stm32'
fqbn: 'STM32:stm32:GenF1:pnum=MAPLEMINI_F103CB'
boardurl: '--additional-urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json'
runs-on: ubuntu-latest
steps:
# - name: info
# run: echo ${{ github.event_name }}
- name: Checkout
uses: actions/checkout@master
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
- name: Setup Arduino CLI
with:
submodules: true

- name: Install Arduino CLI
uses: arduino/[email protected]
- name: Prepare plattform installation
run: arduino-cli core update-index ${{ matrix.boardurl }}
- name: Install plattform
run: arduino-cli core install ${{ matrix.arduino-platform }} ${{ matrix.boardurl }}
- name: install pyserial
if: ${{ matrix.BOARD == 'ESP32' }}
run: |
pip install pyserial

- name: Setup arduino-cli
uses: ./.github/actions/arduino-cli
with:
boardurl: ${{ matrix.boardurl }}
plattform: ${{ matrix.arduino-platform }}

- name: Compile sketch
id: compile_sketch
run: |
arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property="compiler.cpp.extra_flags=${{ matrix.compilerflag }}" ${{ matrix.boardurl }} --output-dir=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/src/arduino-ide/SIGNALDuino/SIGNALDuino.ino
export COMPILE_OUTPUT=$(arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property="compiler.cpp.extra_flags=${{ matrix.compilerflag }}" ${{ matrix.boardurl }} --build-property="${{ matrix.build_param1 }}" --output-dir=$GITHUB_WORKSPACE $GITHUB_WORKSPACE/src/arduino-ide/SIGNALDuino/SIGNALDuino.ino)
echo "$COMPILE_OUTPUT"
echo "::set-output name=fileext::$(test -f $GITHUB_WORKSPACE/SIGNALDuino.ino.bin && echo "bin" || echo "hex")"
# - name: rename firmwarefile
# if: ${{ matrix.BOARD == 'ESP32' }}
# run: |
# mv .bin *.hex
echo "::set-output name=skechsize::$(echo "$COMPILE_OUTPUT" | grep -Po "(?<=^Sketch uses )\d+")"
echo "::set-output name=globalramusage::$(echo "$COMPILE_OUTPUT" | grep -Po "(?<=^Global variables use )\d+")"
- name: Get flash and ram usage
id: compile_sizes
run: |
echo Flash usage: ${{ steps.compile_sketch.outputs.skechsize }} bytes
echo Ram usage: ${{ steps.compile_sketch.outputs.globalramusage }} bytes
- name: Find Comment
if: ${{ github.event.pull_request.number > 0 }}
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: ${{ github.sha }}

- name: Create comment
if: ${{ github.event.pull_request.number > 0 && steps.fc.outputs.comment-id == 0 }}
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
### Size report for commit: ${{ github.sha }}
| Board | Flash | Ram |
|-------|-------|-----|
| ${{ matrix.BOARD }}${{ matrix.RECEIVER }} | ${{ steps.compile_sketch.outputs.skechsize }} bytes | ${{ steps.compile_sketch.outputs.globalramusage }} bytes |
- name: Update comment
if: ${{ github.event.pull_request.number > 0 && steps.fc.outputs.comment-id != 0 }}
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
| ${{ matrix.BOARD }}${{ matrix.RECEIVER }} | ${{ steps.compile_sketch.outputs.skechsize }} bytes | ${{ steps.compile_sketch.outputs.globalramusage }} bytes |
- name: Get release
id: get_release
if: ${{ github.event_name == 'release'}}
uses: bruceadams/[email protected].3
uses: bruceadams/[email protected].2
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload Release Asset
id: upload-release-asset
if: ${{ github.event_name == 'release' }}
uses: actions/upload-release-asset@v1.0.2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./SIGNALDuino.ino.${{ steps.compile_sketch.outputs.fileext }}
asset_name: SIGNALDuino_${{ matrix.BOARD }}${{ matrix.RECEIVER }}_${{ github.event.release.tag_name }}.hex
asset_content_type: application/octet-stream

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: SIGNALDuino_${{ matrix.BOARD }}${{ matrix.RECEIVER }}.hex
path: ./SIGNALDuino.ino.${{ steps.compile_sketch.outputs.fileext }}
if-no-files-found: warn
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,8 @@ FakesAssemblies/
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
__vm/
.vscode/
.pio/
tests/install/
*.sln
Loading

0 comments on commit b04cb21

Please sign in to comment.