-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adrian Kennard
committed
Mar 14, 2022
1 parent
d033175
commit 29fe2c6
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/csh -f | ||
|
||
setenv SDKCONFIG "sdkconfig" | ||
if("$1" != "") setenv SDKCONFIG "$1" | ||
|
||
if(! -e "$SDKCONFIG") then | ||
echo "Missing $SDKCONFIG" | ||
exit 0 | ||
endif | ||
|
||
# Match the code in revk.c for OTA suffix defaults | ||
|
||
# suffix1 | ||
grep -q CONFIG_IDF_TARGET_ESP32=y "$SDKCONFIG" | ||
if(! $status) echo -n "-S1" | ||
grep -q CONFIG_IDF_TARGET_ESP32S2=y "$SDKCONFIG" | ||
if(! $status) echo -n "-S2" | ||
grep -q CONFIG_IDF_TARGET_ESP32S3=y "$SDKCONFIG" | ||
if(! $status) echo -n "-S3" | ||
grep -q CONFIG_IDF_TARGET_ESPC3=y "$SDKCONFIG" | ||
if(! $status) echo -n "-C3" | ||
grep -q CONFIG_IDF_TARGET_ESPH2=y "$SDKCONFIG" | ||
if(! $status) echo -n "-H2" | ||
|
||
# suffix2 | ||
grep -q CONFIG_FREERTOS_UNICORE=y "$SDKCONFIG" | ||
if(! $status) echo -n "-SOLO" | ||
|
||
# suffix3 | ||
grep -q CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y "$SDKCONFIG" | ||
if(! $status) then | ||
grep -q CONFIG_ESP32_SPIRAM_SUPPORT=y "$SDKCONFIG" | ||
if(! $status) echo -n "-PICO" | ||
endif | ||
|
||
# suffix4 | ||
grep -q CONFIG_ESP32_REV_MIN_3=y "$SDKCONFIG" | ||
if(! $status) echo -n "-V3" | ||
grep -q CONFIG_ESP32_REV_MIN_2=y "$SDKCONFIG" | ||
if(! $status) echo -n "-V2" | ||
grep -q CONFIG_ESP32_REV_MIN_1=y "$SDKCONFIG" | ||
if(! $status) echo -n "-V1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/csh -f | ||
if("$1" == "") then | ||
echo "Specify suffix" | ||
exit 1 | ||
endif | ||
setenv BUILDSUFFIX "$1" | ||
shift | ||
setenv SDKCONFIG "sdkconfig" | ||
if("$1" != "") setenv SDKCONFIG "$1" | ||
|
||
if(! -e "$SDKCONFIG") then | ||
echo "Missing $SDKCONFIG" | ||
exit 0 | ||
endif | ||
|
||
rm -f "$SDKCONFIG".new | ||
|
||
if("$BUILDSUFFIX" =~ *-PICO*) then | ||
sed -e 's/# CONFIG_ESP32_SPIRAM_SUPPORT is not set/CONFIG_ESP32_SPIRAM_SUPPORT=y/' -e 's/# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set/CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y/' -e 's/CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y/# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set/' -e 's/CONFIG_FREERTOS_UNICORE=y/# CONFIG_FREERTOS_UNICORE is not set/' "$SDKCONFIG" > "$SDKCONFIG".new | ||
else if("$BUILDSUFFIX" =~ *-SOLO*) then | ||
sed -e 's/CONFIG_ESP32_SPIRAM_SUPPORT=y/# CONFIG_ESP32_SPIRAM_SUPPORT is not set/' -e 's/# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set/CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y/' -e 's/CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y/# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set/' -e 's/# CONFIG_FREERTOS_UNICORE is not set/CONFIG_FREERTOS_UNICORE=y/' "$SDKCONFIG" > "$SDKCONFIG".new | ||
else | ||
sed -e 's/CONFIG_ESP32_SPIRAM_SUPPORT=y/# CONFIG_ESP32_SPIRAM_SUPPORT is not set/' -e 's/# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set/CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y/' -e 's/CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y/# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set/' -e 's/CONFIG_FREERTOS_UNICORE=y/# CONFIG_FREERTOS_UNICORE is not set/' "$SDKCONFIG" > "$SDKCONFIG".new | ||
endif | ||
|
||
mv -f "$SDKCONFIG".new "$SDKCONFIG" | ||
|
||
|