Skip to content

Commit

Permalink
Merge pull request #420 from sparkfun/release_candidate
Browse files Browse the repository at this point in the history
Add support for SparkFun RTK EVK
  • Loading branch information
nseidle authored Jul 8, 2024
2 parents 39be7ca + 50fcb2a commit a674fd6
Show file tree
Hide file tree
Showing 78 changed files with 13,271 additions and 11,709 deletions.
43 changes: 27 additions & 16 deletions .github/workflows/compile-rtk-everywhere.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ on:
env:
FILENAME_PREFIX: RTK_Everywhere_Firmware
FIRMWARE_VERSION_MAJOR: 1
FIRMWARE_VERSION_MINOR: 2
FIRMWARE_VERSION_MINOR: 3
POINTPERFECT_LBAND_TOKEN: ${{ secrets.POINTPERFECT_LBAND_TOKEN }}
POINTPERFECT_IP_TOKEN: ${{ secrets.POINTPERFECT_IP_TOKEN }}
POINTPERFECT_LBAND_IP_TOKEN: ${{ secrets.POINTPERFECT_LBAND_IP_TOKEN }}
CORE_VERSION: 3.0.1

jobs:
build:
Expand Down Expand Up @@ -56,7 +57,7 @@ jobs:
uses: arduino/setup-arduino-cli@v1

- name: Start config file
run: arduino-cli config init --additional-urls "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
run: arduino-cli config init --additional-urls "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json,https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json"

- name: Update core index
run: arduino-cli core update-index
Expand All @@ -65,39 +66,49 @@ jobs:
run: arduino-cli lib update-index

- name: Install platform
run: arduino-cli core install esp32:esp32@2.0.11
run: arduino-cli core install esp32:esp32@${{ env.CORE_VERSION }}

- name: Get IDF version
run: |
cd /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs
IDF_VERSION=$(ls | grep idf-release)
echo "ESP_IDF=${IDF_VERSION}" >> "$GITHUB_ENV"
- name: Get Known Libraries
run: arduino-cli lib install
ArduinoJson@6.19.4
ArduinoJson@7.0.4
ESP32Time@2.0.0
ESP32_BleSerial@1.0.4
"ESP32-OTA-Pull"@1.0.0
Ethernet@2.0.2
JC_Button@2.1.2
PubSubClient@2.8.0
"SdFat"@2.1.1
"SparkFun LIS2DH12 Arduino Library"@1.0.3
"SparkFun MAX1704x Fuel Gauge Arduino Library"@1.0.4
"SparkFun u-blox GNSS v3"@3.1.5
SparkFun_WebServer_ESP32_W5500@1.5.5
"SparkFun Qwiic OLED Arduino Library"@1.0.13
SSLClientESP32@2.0.0
"SparkFun Extensible Message Parser"@1.0.0
"SparkFun Extensible Message Parser"@1.0.1
"SparkFun BQ40Z50 Battery Manager Arduino Library"@1.0.0
"ArduinoMqttClient"@0.1.8
"SparkFun u-blox PointPerfect Library"@1.11.4
"SparkFun IM19 IMU Arduino Library"@1.0.1
"SparkFun UM980 Triband RTK GNSS Arduino Library"@1.0.4

- name: Enable external libs
run: arduino-cli config set library.enable_unsafe_install true
# https://github.com/avinabmalla/ESP32_BleSerial/issues/15
- name: Patch ESP32_BleSerial BLECharacteristic
run: |
cd Firmware/RTK_Everywhere/Patch/
cp BleSerial.cpp /home/runner/Arduino/libraries/ESP32_BleSerial/src/BleSerial.cpp
- name: Patch libmbedtls
run: |
cd Firmware/RTK_Everywhere/Patch/
cp libmbedtls.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libmbedtls.a
cp libmbedtls_2.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libmbedtls_2.a
cp libmbedcrypto.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libmbedcrypto.a
cp libmbedx509.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libmbedx509.a
- name: Get Libraries
run: arduino-cli lib install --git-url
https://github.com/me-no-dev/ESPAsyncWebServer.git
https://github.com/me-no-dev/AsyncTCP.git

- name: Setup Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -128,13 +139,13 @@ jobs:

- name: Copy custom RTKEverywhere.csv
run:
cp Firmware/RTKEverywhere.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.11/tools/partitions/RTKEverywhere.csv
cp Firmware/RTKEverywhere.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/tools/partitions/RTKEverywhere.csv

- name: Compile Sketch
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }},PSRAM=enabled ./Firmware/RTK_Everywhere/RTK_Everywhere.ino
--build-property build.partitions=RTKEverywhere
--build-property upload.maximum_size=3145728
--build-property "compiler.cpp.extra_flags=\"-DPOINTPERFECT_LBAND_TOKEN=$POINTPERFECT_LBAND_TOKEN\" \"-DPOINTPERFECT_IP_TOKEN=$POINTPERFECT_IP_TOKEN\" \"-DPOINTPERFECT_LBAND_IP_TOKEN=$POINTPERFECT_LBAND_IP_TOKEN\" \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\" \"-DENABLE_DEVELOPER=${{ env.ENABLE_DEVELOPER }}\""
--build-property "compiler.cpp.extra_flags=-MMD -c \"-DPOINTPERFECT_LBAND_TOKEN=$POINTPERFECT_LBAND_TOKEN\" \"-DPOINTPERFECT_IP_TOKEN=$POINTPERFECT_IP_TOKEN\" \"-DPOINTPERFECT_LBAND_IP_TOKEN=$POINTPERFECT_LBAND_IP_TOKEN\" \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\" \"-DENABLE_DEVELOPER=${{ env.ENABLE_DEVELOPER }}\""
--export-binaries

- name: Rename binary
Expand Down
54 changes: 30 additions & 24 deletions .github/workflows/non-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ env:
FIRMWARE_VERSION_MINOR: 99
POINTPERFECT_LBAND_TOKEN: ${{ secrets.POINTPERFECT_LBAND_TOKEN }}
POINTPERFECT_IP_TOKEN: ${{ secrets.POINTPERFECT_IP_TOKEN }}
POINTPERFECT_LBAND_IP_TOKEN: ${{ secrets.POINTPERFECT_LBAND_IP_TOKEN }}
CORE_VERSION: 3.0.1

jobs:
build:
Expand Down Expand Up @@ -55,7 +57,7 @@ jobs:
uses: arduino/setup-arduino-cli@v1

- name: Start config file
run: arduino-cli config init --additional-urls "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
run: arduino-cli config init --additional-urls "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json,https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json"

- name: Update core index
run: arduino-cli core update-index
Expand All @@ -64,44 +66,48 @@ jobs:
run: arduino-cli lib update-index

- name: Install platform
run: arduino-cli core install esp32:esp32@2.0.11
run: arduino-cli core install esp32:esp32@${{ env.CORE_VERSION }}

- name: Get IDF version
run: |
cd /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs
IDF_VERSION=$(ls | grep idf-release)
echo "ESP_IDF=${IDF_VERSION}" >> "$GITHUB_ENV"
- name: Get Known Libraries
run: arduino-cli lib install
ArduinoJson@6.19.4
ArduinoJson@7.0.4
ESP32Time@2.0.0
ESP32_BleSerial@1.0.4
"ESP32-OTA-Pull"@1.0.0
Ethernet@2.0.2
JC_Button@2.1.2
PubSubClient@2.8.0
"SdFat"@2.1.1
"SparkFun LIS2DH12 Arduino Library"@1.0.3
"SparkFun MAX1704x Fuel Gauge Arduino Library"@1.0.4
"SparkFun u-blox GNSS v3"@3.1.4
SparkFun_WebServer_ESP32_W5500@1.5.5
"SparkFun u-blox GNSS v3"@3.1.5
"SparkFun Qwiic OLED Arduino Library"@1.0.13
SSLClientESP32@2.0.0
"SparkFun Extensible Message Parser"@1.0.0
"SparkFun BQ40Z50 Battery Manager Arduino Library"@1.0.0
"ArduinoMqttClient"@0.1.8
"SparkFun u-blox PointPerfect Library"@1.11.4
"SparkFun IM19 IMU Arduino Library"@1.0.1
"SparkFun UM980 Triband RTK GNSS Arduino Library"@1.0.4

- name: Enable external libs
run: arduino-cli config set library.enable_unsafe_install true

- name: Get Libraries
run: arduino-cli lib install --git-url
https://${{ secrets.GET_PRIVATE_PPL_LIBRARY }}@github.com/sparkfun/SparkFun_u-blox_PointPerfect_Library.git
https://${{ secrets.GET_PRIVATE_IM19_LIBRARY }}@github.com/sparkfun/SparkFun_IM19_IMU_Arduino_Library.git
https://github.com/sparkfun/SparkFun_Unicore_GNSS_Arduino_Library.git
https://github.com/me-no-dev/ESPAsyncWebServer.git
https://github.com/me-no-dev/AsyncTCP.git

#Incorporate ESP-Now patch into core: https://github.com/espressif/arduino-esp32/pull/7044/files
#- name: Patch ESP32 Core
# run: |
# cd Firmware/RTK_Everywhere/Patch/
# cp WiFiGeneric.cpp /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi/src/WiFiGeneric.cpp
# https://github.com/avinabmalla/ESP32_BleSerial/issues/15
- name: Patch ESP32_BleSerial BLECharacteristic
run: |
cd Firmware/RTK_Everywhere/Patch/
cp BleSerial.cpp /home/runner/Arduino/libraries/ESP32_BleSerial/src/BleSerial.cpp
- name: Patch libmbedtls
run: |
cd Firmware/RTK_Everywhere/Patch/
cp libmbedtls.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libmbedtls.a
cp libmbedtls_2.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libmbedtls_2.a
cp libmbedcrypto.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libmbedcrypto.a
cp libmbedx509.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libmbedx509.a
- name: Setup Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -133,13 +139,13 @@ jobs:

- name: Copy custom RTKEverywhere.csv
run:
cp Firmware/RTKEverywhere.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.11/tools/partitions/RTKEverywhere.csv
cp Firmware/RTKEverywhere.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/tools/partitions/RTKEverywhere.csv

- name: Compile Sketch
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }},PSRAM=enabled ./Firmware/RTK_Everywhere/RTK_Everywhere.ino
--build-property build.partitions=RTKEverywhere
--build-property upload.maximum_size=3145728
--build-property "compiler.cpp.extra_flags=\"-DPOINTPERFECT_LBAND_TOKEN=$POINTPERFECT_LBAND_TOKEN\" \"-DPOINTPERFECT_IP_TOKEN=$POINTPERFECT_IP_TOKEN\" \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\" \"-DENABLE_DEVELOPER=${{ env.ENABLE_DEVELOPER }}\""
--build-property "compiler.cpp.extra_flags=-MMD -c \"-DPOINTPERFECT_LBAND_TOKEN=$POINTPERFECT_LBAND_TOKEN\" \"-DPOINTPERFECT_IP_TOKEN=$POINTPERFECT_IP_TOKEN\" \"-DPOINTPERFECT_LBAND_IP_TOKEN=$POINTPERFECT_LBAND_IP_TOKEN\" \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\" \"-DENABLE_DEVELOPER=${{ env.ENABLE_DEVELOPER }}\""
--export-binaries

- name: Create artifact name
Expand Down
Loading

0 comments on commit a674fd6

Please sign in to comment.