Skip to content

Commit 704a76b

Browse files
authored
chore: Update espressif32 to 5.3.0 (#330)
- Update espressif32 update to 5.3 (https://github.com/platformio/platform-espressif32/releases/tag/v5.3.0) - Bootloader creation adjusted - SQ wrapper adjusted
1 parent 02787fc commit 704a76b

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

.github/fake-cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
/github/home/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++ \
3+
/github/home/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++ \
44
"$@" 2>&1 \
55
| sed 's|: xtensa-esp32-elf|: le32-unknown-nacl|g' \
66
| sed 's|=xtensa-esp32-elf|=le32-unknown-nacl|g'

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ jobs:
101101
102102
- name: Package firmware
103103
run: |
104-
if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.bin" ]; then
105-
cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.bin 0x01000.bin
104+
set -eux
105+
if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf" ]; then
106+
cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf 0x01000.elf
106107
elif [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin" ]; then
107108
cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin 0x01000.bin
108109
else
109110
echo could not find bootloader_dio_40m.bin, new location?
110-
find /github/home/.platformio/ -name "bootloader_dio_40m.bin"
111+
find /github/home/.platformio/ -name "bootloader*.bin"
112+
find /github/home/.platformio/ -name "bootloader*.elf"
111113
exit 1
112114
fi
113115
cp bin/.pio/build/esp32dev/partitions.bin 0x08000.bin
@@ -123,11 +125,15 @@ jobs:
123125
# 0x08000 0x08000.bin \
124126
# 0x0e000 0x0e000.bin \
125127
# 0x10000 0x10000.bin
126-
echo Original bootloader params
127-
${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info for original bootloader failed
128+
${ESPTOOL} --trace --chip esp32 elf2image \
129+
--dont-append-digest \
130+
--flash_freq 40m --flash_mode dio \
131+
0x01000.elf
132+
echo Original bootloader params after elf2image
133+
${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info for converted bootloader failed
128134
mv 0x01000.bin 0x01000.bin.org
129-
${ESPTOOL} --trace --chip esp32 merge_bin --output 0x01000.bin \
130-
--flash_freq keep --flash_mode dio --flash_size 4MB \
135+
${ESPTOOL} --trace --chip esp32 merge_bin --output 0x01000.bin \
136+
--flash_freq 40m --flash_mode dio --flash_size 4MB \
131137
--target-offset 0x01000 \
132138
0x01000 0x01000.bin.org
133139
echo OpenBikeSensor bootloader params
@@ -153,14 +159,15 @@ jobs:
153159
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
154160
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
155161
run: |
162+
set -eux
156163
# Hack - point sonarqube to the real sources not the copy of it
157164
# See also https://community.sonarsource.com/t/scanning-platformio-c-embeded-projects/35141/2
158165
sed -i 's|OpenBikeSensorFirmware/bin|OpenBikeSensorFirmware|g' \
159166
sonarqube-out/build-wrapper-dump.json
160167
sed -i 's|\.pio/|bin/.pio/|g' \
161168
sonarqube-out/build-wrapper-dump.json
162169
# replace gcc with our script that reports the fake arch "le32-unknown-nacl"
163-
sed -i "s|/github/home/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g..|`pwd`/.github/fake-cc|g" \
170+
sed -i "s|/github/home/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g..|`pwd`/.github/fake-cc|g" \
164171
sonarqube-out/build-wrapper-dump.json
165172
./sonarqube/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin/sonar-scanner \
166173
-Dsonar.host.url=https://sonarcloud.io \
@@ -196,6 +203,7 @@ jobs:
196203
LICENSE-ARDUINO-ESP32.md
197204
LICENSE-OpenSans.txt
198205
LICENSE
206+
sonarqube-out/build-wrapper-dump.json
199207
if-no-files-found: error
200208

201209
- name: Generate changelog

platformio.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ src_dir = src
3838
extra_configs = custom_config.ini
3939

4040
[env:esp32dev]
41-
platform = espressif32 @ 5.2.0
41+
platform = espressif32 @ 5.3.0
4242
board = esp32dev
4343
framework = arduino
4444
monitor_speed = 115200
@@ -56,6 +56,7 @@ lib_deps =
5656
pololu/VL53L0X@^1.3.1
5757
; https://github.com/fhessel/esp32_https_server
5858
https://github.com/amandel/esp32_https_server.git#hotfix/openbikesensor
59+
; TODO: https://github.com/jasenk2/esp32_https_server.git#esp_tls
5960
; esp32_https_server@
6061
build_flags =
6162
-DCORE_DEBUG_LEVEL=3

0 commit comments

Comments
 (0)