Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update espressif32 to 5.3.0 #330

Merged
merged 10 commits into from
Jan 7, 2023
2 changes: 1 addition & 1 deletion .github/fake-cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

/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'
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -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
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
Expand All @@ -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
Expand All @@ -153,14 +159,15 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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' \
sonarqube-out/build-wrapper-dump.json
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 \
Expand Down Expand Up @@ -196,6 +203,7 @@ jobs:
LICENSE-ARDUINO-ESP32.md
LICENSE-OpenSans.txt
LICENSE
sonarqube-out/build-wrapper-dump.json
if-no-files-found: error

- name: Generate changelog
Expand Down
3 changes: 2 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ src_dir = src
extra_configs = custom_config.ini

[env:esp32dev]
platform = espressif32 @ 5.2.0
platform = espressif32 @ 5.3.0
board = esp32dev
framework = arduino
monitor_speed = 115200
Expand All @@ -56,6 +56,7 @@ lib_deps =
pololu/VL53L0X@^1.3.1
; https://github.com/fhessel/esp32_https_server
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
Expand Down