Skip to content

Commit d96a860

Browse files
authored
Merge pull request #3 from sparkfun/develop
Catch up main to development
2 parents ac4f8aa + 47c0f41 commit d96a860

9 files changed

+32989
-37
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: IoT Node - LoRaWAN - Firmware build Action
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
7+
workflow_dispatch:
8+
branches:
9+
10+
env:
11+
ARDUINO_RP2040_DIR: .arduino15/packages/rp2040/hardware/rp2040/4.3.1
12+
# DATALOGGER_IOT_APP_KEY: ${{ secrets.DATALOGGER_IOT_APP_KEY }}
13+
# DATALOGGER_IOT_ID_KEY: ${{ secrets.DATALOGGER_IOT_ID_KEY }}
14+
15+
jobs:
16+
build:
17+
name: Build IoT Node - LoRaWAN Firmware
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout Repo and submodules
22+
uses: actions/checkout@v3
23+
with:
24+
ref: develop
25+
26+
# checkout flux-sdk
27+
- name: Checkout the flux-sdk
28+
run: |
29+
git clone --branch feature/rp2350-port https://github.com/sparkfun/flux-sdk.git
30+
echo "FLUX_SDK_PATH=`pwd`/flux-sdk" >> $GITHUB_ENV
31+
32+
# Run cmake - this will build a custom SparkFun_Flux library we can use with
33+
# the Arduino CLI
34+
- name: Run CMake
35+
run: |
36+
echo $FLUX_SDK_PATH
37+
mkdir -p build
38+
cd build
39+
cmake ..
40+
cd ..
41+
42+
# Setup Arduino command line - install esp32 and all the libs flux needs
43+
- name: Arduino - Install and setup the Arduino CLI
44+
uses: arduino/setup-arduino-cli@v1
45+
46+
- name: Arduino - Start config file
47+
run: arduino-cli config init --additional-urls "https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json"
48+
49+
- name: Arduino - Update index
50+
run: arduino-cli core update-index
51+
52+
# Install RP2040 - 4.0.3 (Nov, 2024)
53+
- name: Arduino - Install rp2040 platform
54+
run: arduino-cli core install rp2040:[email protected]
55+
56+
- name: Patch in our IOT Node boards
57+
run: |
58+
cd patch
59+
cp boards.txt $HOME/$ARDUINO_RP2040_DIR/boards.txt
60+
cp -R sparkfun_iotnode_lorawan $HOME/$ARDUINO_RP2040_DIR/variants/
61+
cp sparkfun_iotnode_lorawan_rp2350.h $HOME/$ARDUINO_RP2040_DIR//pico-sdk/src/boards/include/boards/
62+
cd ..
63+
64+
# install the libraries Flux uses
65+
- name: Install Flux dependant libraries
66+
run: ./flux-sdk/install-libs.sh
67+
68+
# currently using a local copy of the library that removed some warning messages - source is here:
69+
# arduino-cli lib install --git-url "https://github.com/felixgalindo/XBeeArduino.git"
70+
- name: Install The XBee LoRaWAN library
71+
run: |
72+
arduino-cli config set library.enable_unsafe_install true
73+
arduino-cli lib install --git-url "https://github.com/gigapod/XBeeArduino.git"
74+
arduino-cli lib install FastLED
75+
76+
# Compile time - build the Firmware for the data logger.
77+
# Note:
78+
# - The use of a full path to flux - this is needed or the build fails (relative paths get merged).
79+
# - ** Nov 25 - for build testing, using the pro micro board definition until new board added
80+
81+
- name: Compile DataLogger firmware binary
82+
run:
83+
arduino-cli compile --fqbn rp2040:rp2040:sparkfun_iotnode_lorawan ./sfeIoTNodeLoRaWAN/sfeIoTNodeLoRaWAN.ino
84+
--export-binaries --clean --library `pwd`/SparkFun_IoTNodeLoRaWAN
85+
86+
# Upload the build files - bootloader, paritions, firmware
87+
- uses: actions/upload-artifact@v3
88+
with:
89+
name: Upload Build
90+
path: sfeIoTNodeLoRaWAN/build/rp2040.rp2040.sparkfun_iotnode_lorawan/sfeIoTNodeLoRaWAN.ino.uf2
91+
92+

.github/workflows/build-iotnode-lorawan.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
workflow_dispatch:
88
branches:
99

10-
# env:
10+
env:
11+
ARDUINO_RP2040_DIR: .arduino15/packages/rp2040/hardware/rp2040/4.3.1
1112
# DATALOGGER_IOT_APP_KEY: ${{ secrets.DATALOGGER_IOT_APP_KEY }}
1213
# DATALOGGER_IOT_ID_KEY: ${{ secrets.DATALOGGER_IOT_ID_KEY }}
1314

@@ -50,16 +51,26 @@ jobs:
5051

5152
# Install RP2040 - 4.0.3 (Nov, 2024)
5253
- name: Arduino - Install rp2040 platform
53-
run: arduino-cli core install rp2040:[email protected]
54+
run: arduino-cli core install rp2040:[email protected]
55+
56+
- name: Patch in our IOT Node boards
57+
run: |
58+
cd patch
59+
cp boards.txt $HOME/$ARDUINO_RP2040_DIR/boards.txt
60+
cp -R sparkfun_iotnode_lorawan $HOME/$ARDUINO_RP2040_DIR/variants/
61+
cp sparkfun_iotnode_lorawan_rp2350.h $HOME/$ARDUINO_RP2040_DIR//pico-sdk/src/boards/include/boards/
62+
cd ..
5463
5564
# install the libraries Flux uses
5665
- name: Install Flux dependant libraries
5766
run: ./flux-sdk/install-libs.sh
5867

68+
# currently using a local copy of the library that removed some warning messages - source is here:
69+
# arduino-cli lib install --git-url "https://github.com/felixgalindo/XBeeArduino.git"
5970
- name: Install The XBee LoRaWAN library
6071
run: |
6172
arduino-cli config set library.enable_unsafe_install true
62-
arduino-cli lib install --git-url "https://github.com/felixgalindo/XBeeArduino.git"
73+
arduino-cli lib install --git-url "https://github.com/gigapod/XBeeArduino.git"
6374
arduino-cli lib install FastLED
6475
6576
# Compile time - build the Firmware for the data logger.
@@ -69,13 +80,13 @@ jobs:
6980

7081
- name: Compile DataLogger firmware binary
7182
run:
72-
arduino-cli compile --fqbn rp2040:rp2040:sparkfun_promicrorp2350 ./sfeIoTNodeLoRaWAN/sfeIoTNodeLoRaWAN.ino
83+
arduino-cli compile --fqbn rp2040:rp2040:sparkfun_iotnode_lorawan ./sfeIoTNodeLoRaWAN/sfeIoTNodeLoRaWAN.ino
7384
--export-binaries --clean --library `pwd`/SparkFun_IoTNodeLoRaWAN
7485

7586
# Upload the build files - bootloader, paritions, firmware
7687
- uses: actions/upload-artifact@v3
7788
with:
7889
name: Upload Build
79-
path: sfeIoTNodeLoRaWAN/build/rp2040.rp2040.sparkfun_promicrorp2350/sfeIoTNodeLoRaWAN.ino.uf2
90+
path: sfeIoTNodeLoRaWAN/build/rp2040.rp2040.sparkfun_iotnode_lorawan/sfeIoTNodeLoRaWAN.ino.uf2
8091

8192

0 commit comments

Comments
 (0)