diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml new file mode 100644 index 000000000..25eb5bcb6 --- /dev/null +++ b/.github/workflows/build_documentation.yml @@ -0,0 +1,53 @@ +name: Build Documentation + +# Allows you to run this workflow manually from the Actions tab +# on: +# workflow_dispatch: +# branches: ["main"] + +# Run workflow on every commit +on: + push: + branches: + - main + +# Sets permissions of the GITHUB_TOKEN to allow files to be committed to gh-pages branch +permissions: + contents: write + + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Instal pgnquant for optimize plugin + run: sudo apt-get install pngquant + + - name: Set up Python runtime + uses: actions/setup-python@v5 + with: + python-version: 3.x + + - name: Install Python dependencies + run: pip install mkdocs-monorepo-plugin mkdocs-redirects mkdocs-git-authors-plugin mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 Pillow 'mkdocs-material[imaging]' + + - name: Set up build cache + run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + + - name: Install Insiders build + env: + MKDOCS_TOKEN: ${{ secrets.MKDOCS_SECRET }} + run: pip install git+https://${MKDOCS_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git + - run: mkdocs gh-deploy --clean diff --git a/.github/workflows/compile-rtk-everywhere.yml b/.github/workflows/compile-rtk-everywhere.yml index 8aabc794e..6abbfafff 100644 --- a/.github/workflows/compile-rtk-everywhere.yml +++ b/.github/workflows/compile-rtk-everywhere.yml @@ -1,19 +1,21 @@ name: Build RTK Everywhere -on: +on: workflow_dispatch: - branches: + branches: env: FILENAME_PREFIX: RTK_Everywhere_Firmware - FIRMWARE_VERSION_MAJOR: 1 - FIRMWARE_VERSION_MINOR: 1 + FIRMWARE_VERSION_MAJOR: 2 + FIRMWARE_VERSION_MINOR: 2 POINTPERFECT_LBAND_TOKEN: ${{ secrets.POINTPERFECT_LBAND_TOKEN }} POINTPERFECT_IP_TOKEN: ${{ secrets.POINTPERFECT_IP_TOKEN }} POINTPERFECT_LBAND_IP_TOKEN: ${{ secrets.POINTPERFECT_LBAND_IP_TOKEN }} + POINTPERFECT_RTCM_TOKEN: ${{ secrets.POINTPERFECT_RTCM_TOKEN }} + CORE_VERSION: 3.0.7 jobs: build: - + name: Build runs-on: ubuntu-latest @@ -49,14 +51,14 @@ jobs: echo "JSON_ENDING=-${{ steps.dateNoScores.outputs.dateNoScores }}" >> "$GITHUB_ENV" echo "JSON_FILE_NAME=RTK-Everywhere-RC-Firmware.json" >> "$GITHUB_ENV" echo "ENABLE_DEVELOPER=true" >> "$GITHUB_ENV" - echo "DEBUG_LEVEL=debug" >> "$GITHUB_ENV" + echo "DEBUG_LEVEL=error" >> "$GITHUB_ENV" fi - name: Setup Arduino CLI 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 @@ -65,39 +67,50 @@ 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_BleSerial@2.0.1 "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 u-blox GNSS v3"@3.1.8 "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.2 "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 + "SparkFun LG290P Quadband RTK GNSS Arduino Library"@1.0.8 + "SparkFun I2C Expander Arduino Library"@1.0.1 + + - 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: Enable external libs - run: arduino-cli config set library.enable_unsafe_install true + - name: Patch NetworkEvents + run: | + cd Firmware/RTK_Everywhere/Patch/ + cp NetworkEvents.* /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/libraries/Network/src/ - - 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: @@ -128,13 +141,17 @@ 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 + # Compile the source using the 16MB partition file. Other platforms (ie, the 8MB Postcard) use + # the same binary but use a different partition binary during the upload phase. + # View the different RTK partition files used during upload here: + # https://github.com/sparkfun/SparkFun_RTK_Firmware_Uploader/tree/main/RTK_Firmware_Uploader/resource + 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 upload.maximum_size=4055040 + --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\" \"-DPOINTPERFECT_RTCM_TOKEN=$POINTPERFECT_RTCM_TOKEN\" \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\" \"-DENABLE_DEVELOPER=${{ env.ENABLE_DEVELOPER }}\"" --export-binaries - name: Rename binary @@ -143,12 +160,12 @@ jobs: mv RTK_Everywhere.ino.bin ${{ env.FILENAME_PREFIX }}${{ env.FILE_ENDING_UNDERSCORE }}.bin - name: Upload binary to action - uses: actions/upload-artifact@v3 - with: + uses: actions/upload-artifact@v4 + with: name: ${{ env.FILENAME_PREFIX }}${{ env.FILE_ENDING_UNDERSCORE }} path: ./Firmware/RTK_Everywhere/build/esp32.esp32.esp32/${{ env.FILENAME_PREFIX }}${{ env.FILE_ENDING_UNDERSCORE }}.bin - + - name: Push binary to Binaries Repo # uses: dmnemec/copy_file_to_another_repo_action #Workaround for Issue: https://github.com/orgs/community/discussions/55820#discussioncomment-5946136 uses: Jason2866/copy_file_to_another_repo_action@http408_fix @@ -181,4 +198,4 @@ jobs: destination_folder: '' user_email: 'nathan@sparkfun.com' user_name: 'nseidle' - commit_message: 'Github Action - Updating JSON ${{ steps.dateNoScores.outputs.dateNoScores }}' \ No newline at end of file + commit_message: 'Github Action - Updating JSON ${{ steps.dateNoScores.outputs.dateNoScores }}' diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml deleted file mode 100644 index 2eb741aed..000000000 --- a/.github/workflows/mkdocs.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Run mkdocs -on: - push: - branches: - - main -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.12.0 - - run: pip install mkdocs-material mkdocs-monorepo-plugin setuptools - - run: pip install mkdocs-with-pdf - - run: mkdocs gh-deploy --force diff --git a/.github/workflows/non-release-build.yml b/.github/workflows/non-release-build.yml index 29c489ad7..7756986d8 100644 --- a/.github/workflows/non-release-build.yml +++ b/.github/workflows/non-release-build.yml @@ -1,18 +1,20 @@ name: Non-Release Build -on: +on: workflow_dispatch: - branches: + branches: env: FILENAME_PREFIX: RTK_Everywhere_Firmware - FIRMWARE_VERSION_MAJOR: 0 - FIRMWARE_VERSION_MINOR: 9 + FIRMWARE_VERSION_MAJOR: 99 + 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.7 jobs: build: - + name: Build runs-on: ubuntu-latest @@ -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 @@ -64,45 +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_BleSerial@2.0.1 "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.8 "SparkFun Qwiic OLED Arduino Library"@1.0.13 SSLClientESP32@2.0.0 - SSLClientESP32@2.0.0 - "SparkFun Extensible Message Parser"@1.0.0 + "SparkFun Extensible Message Parser"@1.0.2 "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 + "SparkFun LG290P Quadband RTK GNSS Arduino Library"@1.0.7 + "SparkFun I2C Expander Arduino Library"@1.0.1 - - 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 + - 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: Patch NetworkEvents + run: | + cd Firmware/RTK_Everywhere/Patch/ + cp NetworkEvents.* /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/libraries/Network/src/ - name: Setup Python uses: actions/setup-python@v4 @@ -134,13 +140,14 @@ 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 + # Use the 16MB partitions by default. 8MB (Postcard) partitions must be compiled separately + 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 upload.maximum_size=4055040 + --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 @@ -155,7 +162,7 @@ jobs: - name: Upload artifact directory to action - avoid double-zip uses: actions/upload-artifact@v3 - with: + with: name: ${{ env.ARTIFACT }} path: Firmware/RTK_Everywhere/build/esp32.esp32.esp32/${{ env.ARTIFACT }} retention-days: 7 diff --git a/Firmware/RTKEverywhere_8MB.csv b/Firmware/RTKEverywhere_8MB.csv new file mode 100644 index 000000000..73baf4938 --- /dev/null +++ b/Firmware/RTKEverywhere_8MB.csv @@ -0,0 +1,8 @@ +# See SparkFun ESP32 partition generator: https://docs.google.com/spreadsheets/d/1Ar1LjCRq_RqoRP3OwOwx527hfGKR-4FlMUr6ygIosA8/edit?usp=sharing,,,,, +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x5000 +otadata, data, ota, 0xE000, 0x2000 +app0, app, ota_0, 0x10000, 0x3DE000 +app1, app, ota_1, 0x3F0000, 0x3DE000 +spiffs, data, spiffs, 0x7CE000, 0x19000 +coredump, data, coredump, 0x7E7000, 0x10000 \ No newline at end of file diff --git a/Firmware/RTK_Everywhere/AP-Config/index.html b/Firmware/RTK_Everywhere/AP-Config/index.html index 567dfbed2..4a024b7d9 100644 --- a/Firmware/RTK_Everywhere/AP-Config/index.html +++ b/Firmware/RTK_Everywhere/AP-Config/index.html @@ -84,8 +84,8 @@