diff --git a/scripts/build/builders/esp32.py b/scripts/build/builders/esp32.py index b51e23d6955df3..468a92072c9fd9 100644 --- a/scripts/build/builders/esp32.py +++ b/scripts/build/builders/esp32.py @@ -139,7 +139,7 @@ def DefaultsFileName(board: Esp32Board, app: Esp32App, enable_rpcs: bool): else: return 'sdkconfig{}.defaults'.format(rpc) elif board == Esp32Board.C3DevKit: - return 'sdkconfig_c3devkit{}.defaults'.format(rpc) + return 'sdkconfig{}.defaults.esp32c3'.format(rpc) else: raise Exception('Unknown board type') diff --git a/scripts/examples/esp_example.sh b/scripts/examples/esp_example.sh index 6ecdfa850b611a..d7799964e77643 100755 --- a/scripts/examples/esp_example.sh +++ b/scripts/examples/esp_example.sh @@ -49,4 +49,7 @@ rm -f "$root"/sdkconfig echo "build $sdkconfig_name failed" exit 1 } -cp "$root"/build/chip-"$app".elf "$root"/build/"${sdkconfig_name%".defaults"}"-chip-"$app".elf + +project_name=$(grep -o 'project([^)]*)' "$root"/CMakeLists.txt | sed 's/project(\(.*\))/\1/') + +cp "$root"/build/"$project_name".elf "$root"/build/"${sdkconfig_name%".defaults"}"-"$project_name".elf