diff --git a/- b/- new file mode 100644 index 0000000..4c78d4a --- /dev/null +++ b/- @@ -0,0 +1,8 @@ +esp32 +esp32s2 +esp32c3 +esp32s3 +esp32c2 +esp32c6 +esp32h2 +esp32p4 diff --git a/CHANGELOG.txt b/CHANGELOG.txt new file mode 100644 index 0000000..8bcc501 --- /dev/null +++ b/CHANGELOG.txt @@ -0,0 +1,4 @@ +9-rc-11 + created CHANGELOG.txt + fixed erase-flash + changeesp and add-to-export.txt now dynamically pull targets from idf.py --list-targets \ No newline at end of file diff --git a/add-to-export-sh.txt b/add-to-export-sh.txt index e58c565..8078af8 100644 --- a/add-to-export-sh.txt +++ b/add-to-export-sh.txt @@ -5,6 +5,13 @@ # begin esp-idf stuffss I made ################ ############################################### +function getTargets() { + tmpFile='/tmp/targets.tmp' + idf.py --list-targets > "$tmpFile" + tr '\n' ' ' < "$tmpFile" + rm "$tmpFile" +} + echo -e "\n=======CUSTOM=======\n" versionData=versionDataTAG @@ -32,7 +39,7 @@ echo -e "\nEnter TTY Number You'd Like:" read tty ttyselect=$devarr[(($tty+1))] -echo -e "Set esp target:\n\tOne of: esp32, esp32s2, esp32c3, esp32s3, esp32c2, esp32c6, esp32h2, esp32p4, esp32c5, esp32c61, or linux" +echo -e "Set esp target:\n\tOne of: $(getTargets)" read esp # echo -e "\nSetting environment variables\n" diff --git a/custom_bin/changeesp.sh b/custom_bin/changeesp.sh index 2d8120d..b0f03fd 100644 --- a/custom_bin/changeesp.sh +++ b/custom_bin/changeesp.sh @@ -1,6 +1,13 @@ +function getTargets() { + tmpFile='/tmp/targets.tmp' + idf.py --list-targets > "$tmpFile" + tr '\n' ' ' < "$tmpFile" + rm "$tmpFile" +} + function subprocess() { echo -e "\nChanging ESPTARGET\n" - echo -e "Set esp target (one of esp32, esp32s2, esp32c3, esp32s3, esp32c2, esp32c6, esp32h2, esp32p4, esp32c5, esp32c61, or linux)" + echo -e "Set esp target (one of $(getTargets))" read esp eval "$1=$esp" return 0 diff --git a/custom_bin/erase-flash b/custom_bin/erase-flash old mode 100644 new mode 100755 index 4130354..0b879fb --- a/custom_bin/erase-flash +++ b/custom_bin/erase-flash @@ -1,4 +1,4 @@ #!/bin/bash echo -e "\nErasing flash on $ESPPORT\n" -idf.py erase-flash -echo -e "\nAll done :3\n" \ No newline at end of file +esptool.py --port $ESPPORT --baud $ESPBAUD --chip $ESPTARGET erase_flash +echo -e "\nAll done :3\n" diff --git a/sed b/sed new file mode 100644 index 0000000..4c78d4a --- /dev/null +++ b/sed @@ -0,0 +1,8 @@ +esp32 +esp32s2 +esp32c3 +esp32s3 +esp32c2 +esp32c6 +esp32h2 +esp32p4 diff --git a/test-scratch.sh b/test-scratch.sh index 98aac16..a4a15f9 100755 --- a/test-scratch.sh +++ b/test-scratch.sh @@ -1,28 +1,28 @@ #!/bin/bash -function subprocess() { - echo -e "\nChanging ESPBAUD\n\t1: 9600\n\t2: 115200\n\t3: 230400\n\t4: 460800\n\t5: 1152000\n\t6: 1500000\n\nEnter Selection: " - read baudRate - echo -e "\n" - case $baudRate in - 1) selection=9600;; - 2) selection=115200;; - 3) selection=230400;; - 4) selection=460800;; - 5) selection=1152000;; - 6) selection=1500000;; - esac +# function subprocess() { +# targets=$(idf.py --list-targets) +# out='' +# +# for target in $targets; do +# out="$out $target" +# done +# +# eval "$1=$out" +# +# return 0 +# } - eval "$1=$selection" - return 0 +function getTargets() { + tmpFile='/tmp/targets.tmp' + idf.py --list-targets > "$tmpFile" + tr '\n' ' ' < "$tmpFile" + rm "$tmpFile" } -if [ ! -z "$1" ]; then - ret="$1" -else - ret='' - subprocess ret -fi +targs=$(getTargets) -export ESPBAUD=$ret -echo -e "\nBaudrate set to $ESPBAUD\n" -echo -e "\nAll done :3\n" \ No newline at end of file +echo $targs +# ret='' +# subprocess ret + +# echo "$ret" \ No newline at end of file diff --git a/version.txt b/version.txt index 596ddef..c67470b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -9-rc-10 \ No newline at end of file +9-rc-11 \ No newline at end of file