From 5301eaf0d82585c451ad6f274d970d8c7c0e6022 Mon Sep 17 00:00:00 2001 From: Darian Leung <32921628+Dazza0@users.noreply.github.com> Date: Wed, 19 Feb 2025 18:39:18 +0800 Subject: [PATCH] fix(examples): Fix idf_as_lib for esp32p4 The build-esp32p4.sh and run-esp32p4.sh scripts are not symbolic links to the base scripts, leading to a "permission denied" error. This commit changes their types to symbolic links, in line with the other targets. --- .../cmake/idf_as_lib/build-esp32p4.sh | 18 +----------------- .../cmake/idf_as_lib/run-esp32p4.sh | 5 +---- 2 files changed, 2 insertions(+), 21 deletions(-) mode change 100644 => 120000 examples/build_system/cmake/idf_as_lib/build-esp32p4.sh mode change 100644 => 120000 examples/build_system/cmake/idf_as_lib/run-esp32p4.sh diff --git a/examples/build_system/cmake/idf_as_lib/build-esp32p4.sh b/examples/build_system/cmake/idf_as_lib/build-esp32p4.sh deleted file mode 100644 index 9a18dc76db..0000000000 --- a/examples/build_system/cmake/idf_as_lib/build-esp32p4.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail -PARAM="" - -# Retrive the target from the current filename, if no target specified, -# the variable will be empty -TARGET=$(echo $0 | cut -s -f2 -d- | cut -s -f1 -d.) -if [[ -n $TARGET ]] -then - # Target is not null, specify the build parameters - PARAM="-DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-${TARGET}.cmake -DTARGET=${TARGET} -GNinja" -fi - -rm -rf build && mkdir build && cd build -cmake .. $PARAM -cmake --build . diff --git a/examples/build_system/cmake/idf_as_lib/build-esp32p4.sh b/examples/build_system/cmake/idf_as_lib/build-esp32p4.sh new file mode 120000 index 0000000000..c07a74de4f --- /dev/null +++ b/examples/build_system/cmake/idf_as_lib/build-esp32p4.sh @@ -0,0 +1 @@ +build.sh \ No newline at end of file diff --git a/examples/build_system/cmake/idf_as_lib/run-esp32p4.sh b/examples/build_system/cmake/idf_as_lib/run-esp32p4.sh deleted file mode 100644 index 3d9e0bfba5..0000000000 --- a/examples/build_system/cmake/idf_as_lib/run-esp32p4.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -cd build -python $IDF_PATH/components/esptool_py/esptool/esptool.py -p $1 write_flash @flash_project_args -python -m esp_idf_monitor -p $1 idf_as_lib.elf diff --git a/examples/build_system/cmake/idf_as_lib/run-esp32p4.sh b/examples/build_system/cmake/idf_as_lib/run-esp32p4.sh new file mode 120000 index 0000000000..cde8585ed4 --- /dev/null +++ b/examples/build_system/cmake/idf_as_lib/run-esp32p4.sh @@ -0,0 +1 @@ +run-esp32.sh \ No newline at end of file