Skip to content

Commit 97325c9

Browse files
committed
fix: use var MEM_VARIANT_FREQ
1 parent c5447b3 commit 97325c9

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,15 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
236236
# Build Memory Variants
237237
for mem_conf in `echo "$target_json" | jq -c '.mem_variants[]'`; do
238238
mem_configs="$main_configs"
239+
240+
# Extract frequency from mem_variant (element [1])
241+
export MEM_VARIANT_FREQ=$(echo "$mem_conf" | jq -r '.[1]')
242+
239243
for defconf in `echo "$mem_conf" | jq -c '.[]' | tr -d '"'`; do
240244
mem_configs="$mem_configs;configs/defconfig.$defconf";
241245
done
242246

243-
echo "* Build Memory Variant: $mem_configs"
247+
echo "* Build Memory Variant: $mem_configs (freq: $MEM_VARIANT_FREQ)"
244248
rm -rf build sdkconfig
245249
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$mem_configs" mem-variant
246250
if [ $? -ne 0 ]; then exit 1; fi

tools/copy-libs.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
IDF_TARGET=$1
55
IS_XTENSA=$4
66
OCT_FLASH="$2"
7-
MEM_FREQ="$5"
87
OCT_PSRAM=
98

109
if [ "$3" = "y" ]; then
@@ -13,8 +12,10 @@ else
1312
OCT_PSRAM="qspi"
1413
fi
1514
MEMCONF=$OCT_FLASH"_$OCT_PSRAM"
16-
if [ "$IDF_TARGET" = "esp32s3" ] && [ -n "$MEM_FREQ" ]; then
17-
MEMCONF=$MEMCONF"_$MEM_FREQ"
15+
16+
# For esp32s3, add frequency from environment variable set by build.sh
17+
if [ "$IDF_TARGET" = "esp32s3" ] && [ -n "$MEM_VARIANT_FREQ" ]; then
18+
MEMCONF=$MEMCONF"_$MEM_VARIANT_FREQ"
1819
fi
1920

2021
source ./tools/config.sh

tools/copy-mem-variant.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
IDF_TARGET=$1
33
OCT_FLASH="$2"
4-
MEM_FREQ="$4"
54
OCT_PSRAM=
65

76
if [ "$3" = "y" ]; then
@@ -11,8 +10,10 @@ else
1110
fi
1211

1312
MEMCONF=$OCT_FLASH"_$OCT_PSRAM"
14-
if [ "$IDF_TARGET" = "esp32s3" ] && [ -n "$MEM_FREQ" ]; then
15-
MEMCONF=$MEMCONF"_$MEM_FREQ"
13+
14+
# For esp32s3, add frequency from environment variable set by build.sh
15+
if [ "$IDF_TARGET" = "esp32s3" ] && [ -n "$MEM_VARIANT_FREQ" ]; then
16+
MEMCONF=$MEMCONF"_$MEM_VARIANT_FREQ"
1617
fi
1718

1819
source ./tools/config.sh

0 commit comments

Comments
 (0)