Skip to content

Commit 85dd218

Browse files
authored
Enhance esp32s3 memory configuration handling
Updated memory configuration for esp32s3 to include frequency from environment variable.
1 parent 46f3d15 commit 85dd218

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/copy-libs.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ else
1313
fi
1414
MEMCONF=$OCT_FLASH"_$OCT_PSRAM"
1515

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"
19+
fi
20+
1621
source ./tools/config.sh
1722

1823
echo "IDF_TARGET: $IDF_TARGET, MEMCONF: $MEMCONF, PWD: $PWD, OUT: $AR_SDK"
@@ -463,7 +468,7 @@ for item; do
463468
fi
464469
fi
465470
done
466-
echo " join($PIO_SDK, board_config.get(\"build.arduino.memory_type\", (board_config.get(\"build.flash_mode\", \"dio\") + \"_qspi\")), \"include\")," >> "$AR_PLATFORMIO_PY"
471+
echo " join($PIO_SDK, (board_config.get(\"build.arduino.memory_type\", (board_config.get(\"build.flash_mode\", \"dio\") + \"_qspi\")) + (\"_\" + board_config.get(\"build.f_boot\", board_config.get(\"build.f_flash\", \"80000000L\")).replace(\"000000L\", \"m\") if board_config.get(\"build.mcu\") == \"esp32s3\" else \"\")), \"include\")," >> "$AR_PLATFORMIO_PY"
467472
echo " join(FRAMEWORK_DIR, \"cores\", board_config.get(\"build.core\"))" >> "$AR_PLATFORMIO_PY"
468473
echo " ]," >> "$AR_PLATFORMIO_PY"
469474
echo "" >> "$AR_PLATFORMIO_PY"
@@ -488,7 +493,7 @@ done
488493
echo " LIBPATH=[" >> "$AR_PLATFORMIO_PY"
489494
echo " join($PIO_SDK, \"lib\")," >> "$AR_PLATFORMIO_PY"
490495
echo " join($PIO_SDK, \"ld\")," >> "$AR_PLATFORMIO_PY"
491-
echo " join($PIO_SDK, board_config.get(\"build.arduino.memory_type\", (board_config.get(\"build.flash_mode\", \"dio\") + \"_qspi\")))" >> "$AR_PLATFORMIO_PY"
496+
echo " join($PIO_SDK, (board_config.get(\"build.arduino.memory_type\", (board_config.get(\"build.flash_mode\", \"dio\") + \"_qspi\")) + (\"_\" + board_config.get(\"build.f_boot\", board_config.get(\"build.f_flash\", \"80000000L\")).replace(\"000000L\", \"m\") if board_config.get(\"build.mcu\") == \"esp32s3\" else \"\")))" >> "$AR_PLATFORMIO_PY"
492497
echo " ]," >> "$AR_PLATFORMIO_PY"
493498
echo "" >> "$AR_PLATFORMIO_PY"
494499

0 commit comments

Comments
 (0)