From f065c39bffc7865ffcd20c2190c1c388c7173324 Mon Sep 17 00:00:00 2001 From: amandel Date: Sat, 31 Dec 2022 13:46:21 +0100 Subject: [PATCH 1/8] Update dependencies - Testing https://github.com/fhessel/esp32_https_server/pull/169 - Update espressif32 update to 5.3 (https://github.com/platformio/platform-espressif32/releases/tag/v5.3.0) --- platformio.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index af951e6d..469bad52 100644 --- a/platformio.ini +++ b/platformio.ini @@ -38,7 +38,7 @@ src_dir = src extra_configs = custom_config.ini [env:esp32dev] -platform = espressif32 @ ^5.2 +platform = espressif32 @ ^5.3 board = esp32dev framework = arduino monitor_speed = 115200 @@ -55,7 +55,8 @@ lib_deps = adafruit/Adafruit BMP280 Library@^2.6.5 pololu/VL53L0X@^1.3.1 ; https://github.com/fhessel/esp32_https_server - https://github.com/amandel/esp32_https_server.git#hotfix/openbikesensor + ; https://github.com/amandel/esp32_https_server.git#hotfix/openbikesensor + https://github.com/jasenk2/esp32_https_server.git#esp_tls ; esp32_https_server@ build_flags = -DCORE_DEBUG_LEVEL=3 From dc1023fc66cac906e5c2e5fdced8f9a1b0ec02ad Mon Sep 17 00:00:00 2001 From: amandel Date: Sat, 31 Dec 2022 15:58:09 +0100 Subject: [PATCH 2/8] Search more generic for the bootloader. --- .github/workflows/ci.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8da1499e..8448c01a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,13 +101,15 @@ jobs: - name: Package firmware run: | - if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.bin" ]; then - cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.bin 0x01000.bin + set -euxo pipefail + if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf" ]; then + cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf 0x01000.elf elif [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin" ]; then cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin 0x01000.bin else echo could not find bootloader_dio_40m.bin, new location? - find /github/home/.platformio/ -name "bootloader_dio_40m.bin" + find /github/home/.platformio/ -name "bootloader*.bin" + find /github/home/.platformio/ -name "bootloader*.elf" exit 1 fi cp bin/.pio/build/esp32dev/partitions.bin 0x08000.bin @@ -123,11 +125,15 @@ jobs: # 0x08000 0x08000.bin \ # 0x0e000 0x0e000.bin \ # 0x10000 0x10000.bin - echo Original bootloader params - ${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info for original bootloader failed + ${ESPTOOL} --trace --chip esp32 elf2image \ + --dont-append-digest \ + --flash_freq 40m --flash_mode dio \ + 0x01000.elf + echo Original bootloader params after elf2image + ${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info for converted bootloader failed mv 0x01000.bin 0x01000.bin.org - ${ESPTOOL} --trace --chip esp32 merge_bin --output 0x01000.bin \ - --flash_freq keep --flash_mode dio --flash_size 4MB \ + ${ESPTOOL} --trace --chip esp32 merge_bin --output 0x01000.bin \ + --flash_freq 40m --flash_mode dio --flash_size 4MB \ --target-offset 0x01000 \ 0x01000 0x01000.bin.org echo OpenBikeSensor bootloader params From be42cc97ea062abf524b23ebc319d19cfec520ed Mon Sep 17 00:00:00 2001 From: amandel Date: Mon, 2 Jan 2023 17:36:48 +0100 Subject: [PATCH 3/8] Search more generic for the bootloader. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8448c01a..d872da60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: - name: Package firmware run: | - set -euxo pipefail + set -eux if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf" ]; then cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf 0x01000.elf elif [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin" ]; then From 010efb3469d75479dcb89986d242b1893e5b1e88 Mon Sep 17 00:00:00 2001 From: amandel Date: Sat, 7 Jan 2023 08:45:34 +0100 Subject: [PATCH 4/8] espressif32 update only for now --- platformio.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 639a6f83..5f0399a1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -55,8 +55,8 @@ lib_deps = adafruit/Adafruit BMP280 Library@^2.6.5 pololu/VL53L0X@^1.3.1 ; https://github.com/fhessel/esp32_https_server - ; https://github.com/amandel/esp32_https_server.git#hotfix/openbikesensor - https://github.com/jasenk2/esp32_https_server.git#esp_tls + https://github.com/amandel/esp32_https_server.git#hotfix/openbikesensor + ; TODO: https://github.com/jasenk2/esp32_https_server.git#esp_tls ; esp32_https_server@ build_flags = -DCORE_DEBUG_LEVEL=3 From c50411e74c95e2b73ce974fc278af0db0736c1d2 Mon Sep 17 00:00:00 2001 From: amandel Date: Sat, 7 Jan 2023 08:59:39 +0100 Subject: [PATCH 5/8] Collect some debug output to learn what is going on --- .github/fake-cc | 2 ++ .github/workflows/ci.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/fake-cc b/.github/fake-cc index 4e9b9c05..3c8f2700 100755 --- a/.github/fake-cc +++ b/.github/fake-cc @@ -1,5 +1,7 @@ #!/bin/bash +echo fake-cc running with args "$@" >> fake-cc.log + /github/home/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++ \ "$@" 2>&1 \ | sed 's|: xtensa-esp32-elf|: le32-unknown-nacl|g' \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d872da60..eae0faa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -202,6 +202,8 @@ jobs: LICENSE-ARDUINO-ESP32.md LICENSE-OpenSans.txt LICENSE + fake-cc.log + sonarqube-out/build-wrapper-dump.json if-no-files-found: error - name: Generate changelog From db96afdcf9cd6a582a1a42769c8e5655744b43e6 Mon Sep 17 00:00:00 2001 From: amandel Date: Sat, 7 Jan 2023 09:09:56 +0100 Subject: [PATCH 6/8] Collect some debug output to learn what is going on --- .github/fake-cc | 2 +- .github/workflows/ci.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/fake-cc b/.github/fake-cc index 3c8f2700..559038e1 100755 --- a/.github/fake-cc +++ b/.github/fake-cc @@ -2,7 +2,7 @@ echo fake-cc running with args "$@" >> fake-cc.log -/github/home/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++ \ +/github/home/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++ \ "$@" 2>&1 \ | sed 's|: xtensa-esp32-elf|: le32-unknown-nacl|g' \ | sed 's|=xtensa-esp32-elf|=le32-unknown-nacl|g' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eae0faa6..5362e950 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,6 +159,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + set -euxo pipefail # Hack - point sonarqube to the real sources not the copy of it # See also https://community.sonarsource.com/t/scanning-platformio-c-embeded-projects/35141/2 sed -i 's|OpenBikeSensorFirmware/bin|OpenBikeSensorFirmware|g' \ @@ -166,7 +167,7 @@ jobs: sed -i 's|\.pio/|bin/.pio/|g' \ sonarqube-out/build-wrapper-dump.json # replace gcc with our script that reports the fake arch "le32-unknown-nacl" - sed -i "s|/github/home/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g..|`pwd`/.github/fake-cc|g" \ + sed -i "s|/github/home/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g..|`pwd`/.github/fake-cc|g" \ sonarqube-out/build-wrapper-dump.json ./sonarqube/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin/sonar-scanner \ -Dsonar.host.url=https://sonarcloud.io \ From 662c2828990368c07a05dd6e57cdd2f503c69b84 Mon Sep 17 00:00:00 2001 From: amandel Date: Sat, 7 Jan 2023 09:13:55 +0100 Subject: [PATCH 7/8] Collect some debug output to learn what is going on --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5362e950..73e6f52e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,7 +159,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - set -euxo pipefail + set -eux # Hack - point sonarqube to the real sources not the copy of it # See also https://community.sonarsource.com/t/scanning-platformio-c-embeded-projects/35141/2 sed -i 's|OpenBikeSensorFirmware/bin|OpenBikeSensorFirmware|g' \ From a3382c6f005d2ebd6209d97109b54330585749f0 Mon Sep 17 00:00:00 2001 From: amandel Date: Sat, 7 Jan 2023 09:59:15 +0100 Subject: [PATCH 8/8] Remove some debug output. --- .github/fake-cc | 2 -- .github/workflows/ci.yml | 1 - 2 files changed, 3 deletions(-) diff --git a/.github/fake-cc b/.github/fake-cc index 559038e1..c780b46e 100755 --- a/.github/fake-cc +++ b/.github/fake-cc @@ -1,7 +1,5 @@ #!/bin/bash -echo fake-cc running with args "$@" >> fake-cc.log - /github/home/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++ \ "$@" 2>&1 \ | sed 's|: xtensa-esp32-elf|: le32-unknown-nacl|g' \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73e6f52e..23e44494 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -203,7 +203,6 @@ jobs: LICENSE-ARDUINO-ESP32.md LICENSE-OpenSans.txt LICENSE - fake-cc.log sonarqube-out/build-wrapper-dump.json if-no-files-found: error