Skip to content

Commit e6b8805

Browse files
authored
Update GH to write slave firmware info in mcu sdkconfig
1 parent 413cc9c commit e6b8805

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/parallel_build.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,31 @@ jobs:
8282
echo "IDF_BRANCH=$IDF_BRANCH"
8383
echo "IDF_COMMIT=$IDF_COMMIT"
8484
idf_version_string="${IDF_BRANCH//\//_}-$IDF_COMMIT"
85+
86+
# Update sdkconfig files with slave firmware version
87+
if [ -f "framework-arduinoespressif32/tools/slave_firmware/coprocessor_fw_version.txt" ]; then
88+
FIRMWARE_VERSION=$(cat framework-arduinoespressif32/tools/slave_firmware/coprocessor_fw_version.txt)
89+
echo "Found firmware version: $FIRMWARE_VERSION"
90+
91+
# Array of MCU targets that need sdkconfig updates
92+
mcu_targets=("esp32" "esp32s2" "esp32s3" "esp32c2" "esp32c3" "esp32c5" "esp32c6" "esp32h2" "esp32p4")
93+
94+
for mcu in "${mcu_targets[@]}"; do
95+
sdkconfig_path="framework-arduinoespressif32/tools/esp32-arduino-libs/$mcu/sdkconfig"
96+
if [ -f "$sdkconfig_path" ]; then
97+
echo "Updating $sdkconfig_path with firmware version: $FIRMWARE_VERSION"
98+
# Remove existing CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET line if it exists
99+
sed -i '/^CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET/d' "$sdkconfig_path"
100+
# Add new CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET line
101+
echo "CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET=$FIRMWARE_VERSION" >> "$sdkconfig_path"
102+
else
103+
echo "Warning: sdkconfig file not found at $sdkconfig_path"
104+
fi
105+
done
106+
else
107+
echo "Warning: coprocessor_fw_version.txt not found"
108+
fi
109+
85110
7z a -mx=9 -tzip -xr'!.*' framework-arduinoespressif32-${idf_version_string}.zip framework-arduinoespressif32/
86111
87112
- name: Set tag name

0 commit comments

Comments
 (0)