From cc3b4417d9fa80f90f544bd4346ee01a164ce27b Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Tue, 12 Nov 2024 04:31:08 -0700 Subject: [PATCH] updatansts --- .gitignore | 4 +++- add-to-export-sh.txt | 10 +++++----- cron-reinstall-esp-idf.sh | 2 +- custom_bin/build | 5 +++-- custom_bin/changebaud | 31 ------------------------------- custom_bin/changeesp | 8 -------- custom_bin/changeesp.sh | 2 +- custom_bin/changeport | 16 ---------------- custom_bin/changeport.sh | 2 +- custom_bin/clean | 5 +++-- custom_bin/erase-flash | 4 ++++ custom_bin/flash | 4 ++++ custom_bin/flashmonitor | 1 - custom_bin/fullclean | 15 +++++++++++++-- custom_bin/menuconfig | 2 -- custom_bin/rebuildfull | 11 +++++++++++ custom_bin/save-defconfig | 16 ++++++++++++++++ custom_bin/setup | 3 ++- version.txt | 1 + 19 files changed, 68 insertions(+), 74 deletions(-) delete mode 100644 custom_bin/changebaud delete mode 100644 custom_bin/changeesp delete mode 100644 custom_bin/changeport create mode 100644 custom_bin/erase-flash create mode 100644 custom_bin/flash delete mode 100644 custom_bin/flashmonitor delete mode 100644 custom_bin/menuconfig create mode 100644 custom_bin/save-defconfig create mode 100644 version.txt diff --git a/.gitignore b/.gitignore index 98b5f5d..bfc8aef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ test-scratch.sh notes.txt *.bak -next-* \ No newline at end of file +next-* +old +.vscode \ No newline at end of file diff --git a/add-to-export-sh.txt b/add-to-export-sh.txt index 73a3513..4e01233 100644 --- a/add-to-export-sh.txt +++ b/add-to-export-sh.txt @@ -24,8 +24,6 @@ ttyselect=$devarr[(($tty+1))] echo "Set esp target (esp32, esp32s3, esp32c6, esp8266, etc)" read esp -# ESPPORT="${ttyselect}" - echo "Setting environment variables" echo "Adding Custom bins to PATH" export PATH="${HOME}/esp/.custom_bin:${PATH}" @@ -42,10 +40,12 @@ echo "Setting alias" alias changeport="source ${binDir}/changeport.sh" alias changebaud="source ${binDir}/changebaud.sh" alias changeesp="source ${binDir}/changeesp.sh" -alias flash="idf.py flash" alias monitor="idf.py monitor" -alias erase-flash="idf.py erase-flash" -alias save-defconfig="cp sdkconfig.defaults sdkconfig.defaults.bak; idf.py save-defconfig" +alias flashmonitor="idf.py flash monitor" +alias menuconfig="idf.py menuconfig" +alias step-flash-monitor="idf.py flash; idf.py monitor" +alias clean-build="idf.py clean; idf.py build" +alias fullclean-build="idf.py fullclean; idf.py build" echo "Changing dir to ${HOME}/esp" cd "${HOME}/esp" diff --git a/cron-reinstall-esp-idf.sh b/cron-reinstall-esp-idf.sh index f3fd932..cecab1b 100644 --- a/cron-reinstall-esp-idf.sh +++ b/cron-reinstall-esp-idf.sh @@ -13,7 +13,7 @@ startTime=$(date '+%s') # crontab -e # 0 8 * * * bash $HOME/esp/esp-install-custom/cron-reinstall-esp-idf.sh -cronVers=55-dev.1 # version of this script +cronVers=55-dev.2 # version of this script myUser=princesspi test=$1 diff --git a/custom_bin/build b/custom_bin/build index 5190789..36ae812 100644 --- a/custom_bin/build +++ b/custom_bin/build @@ -1,3 +1,4 @@ -echo "\nBuilding\n" +#!/bin/bash +echo -e "\nBuilding\n" idf.py build -echo "\nAll done :3\n" +echo -e "\nAll done :3\n" diff --git a/custom_bin/changebaud b/custom_bin/changebaud deleted file mode 100644 index cbc8eec..0000000 --- a/custom_bin/changebaud +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -echo -e "\nChanging ESPBAUD\n" -read -p "Select New Baudrate:\n\t1: 9600\n\t2: 115200\n\t3: 230400\n\t4: 460800\n\t5: 1152000\n\t6: 1500000\nDefault: ${ESPBAUD}" baud - -baud=${baud:-$ESPBAUD} - -echo "Select New Baudrate:\n\t1: 9600\n\t2: 115200\n\t3: 230400\n\t4: 460800\n\t5: 1152000\n\t6: 1500000" -read baud -if [ "${baud}" == 1 ]; then - selection=9600 -elif [ "${baud}" == 2 ]; then - selection=115200 -elif [ "${baud}" == 3 ]; then - selection=230400 -elif [ "${baud}" == 4 ]; then - selection=460800 -elif [ "${baud}" == 5 ]; then - selection=1152000 -elif [ "${baud}" == 5 ]; then - selection=1152000 -elif [ "${baud}" == 6 ]; then - selection=1500000 -else - echo "\nBad Selection\n" - return -fi - -export ESPBAUD=$selection - -echo "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/changeesp b/custom_bin/changeesp deleted file mode 100644 index ae5364d..0000000 --- a/custom_bin/changeesp +++ /dev/null @@ -1,8 +0,0 @@ -echo "\nChanging ESPTARGET\n" -echo "Set esp target (esp32, esp32s3, esp32c6, esp8266, etc)" -read esp - -export ESPTARGET="${esp}" - -echo "\nESPTARGET set to ${ESPTARGET}\n" -echo "\nall done :3\n" \ No newline at end of file diff --git a/custom_bin/changeesp.sh b/custom_bin/changeesp.sh index 175f2c8..993fc36 100644 --- a/custom_bin/changeesp.sh +++ b/custom_bin/changeesp.sh @@ -12,4 +12,4 @@ subprocess ret export ESPTARGET="${ret}" echo "\nESPTARGET set to ${ESPTARGET}\n" -echo "\nall done :3\n" \ No newline at end of file +echo "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/changeport b/custom_bin/changeport deleted file mode 100644 index a53d32a..0000000 --- a/custom_bin/changeport +++ /dev/null @@ -1,16 +0,0 @@ -echo "\nChanging ESPPORT\n" -echo "TTY devices found in dmesg:" -COUNTER=0 -devarr=() -for line in $(dmesg | tail -50 | grep -o -E "tty[A-Z]{3}[0-9]{0,2}" | sort -u); do - echo "$COUNTER /dev/$line" - devarr+=("/dev/$line") - COUNTER=$((COUNTER+1)) -done - -echo "\nEnter TTY Number You'd Like:" -read tty -ttyselect=$devarr[(($tty+1))] -export ESPPORT="${ttyselect}" -echo "\nESPPORT set to ${ESPPORT}\n" -echo "\nall done :3\n" \ No newline at end of file diff --git a/custom_bin/changeport.sh b/custom_bin/changeport.sh index 58518ba..df58aea 100644 --- a/custom_bin/changeport.sh +++ b/custom_bin/changeport.sh @@ -24,4 +24,4 @@ subprocess ret export ESPPORT=$ret echo "\nESPPORT set to ${ESPPORT}\n" -echo "\nall done :3\n" \ No newline at end of file +echo "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/clean b/custom_bin/clean index eef65b7..8ad755c 100644 --- a/custom_bin/clean +++ b/custom_bin/clean @@ -1,3 +1,4 @@ -echo "\nCleaning...\n" +#!/bin/bash +echo -e "\nCleaning...\n" idf.py clean -echo "\nAll done :3\n" \ No newline at end of file +echo -e "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/erase-flash b/custom_bin/erase-flash new file mode 100644 index 0000000..c27c0cf --- /dev/null +++ b/custom_bin/erase-flash @@ -0,0 +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 diff --git a/custom_bin/flash b/custom_bin/flash new file mode 100644 index 0000000..f513dae --- /dev/null +++ b/custom_bin/flash @@ -0,0 +1,4 @@ +#!/bin/bash +echo -e "\nFlashing an ${ESPTARGET} on ${ESPPORT}\n" +idf.py flash +echo -e "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/flashmonitor b/custom_bin/flashmonitor deleted file mode 100644 index 0054388..0000000 --- a/custom_bin/flashmonitor +++ /dev/null @@ -1 +0,0 @@ -idf.py flash monitor diff --git a/custom_bin/fullclean b/custom_bin/fullclean index 1c15498..7bc2e5d 100644 --- a/custom_bin/fullclean +++ b/custom_bin/fullclean @@ -1,18 +1,29 @@ +#!/bin/bash +echo -e "\nCleaning up Fully\n" + +echo -e "\nRunning fullclean\n" + idf.py fullclean if [ -d build ]; then - echo "\nDeleting build dir\n" + echo -e "\nDeleting build dir\n" rm -rf build +else + echo -e "\nNo build dir, skipping delete\n" fi if [ -f sdkconfig ]; then - echo "\nDeleting sdkconfig\n" + echo -e "\nDeleting sdkconfig\n" rm sdkconfig +else + echo -e "\nNo sdkconfig, skipping delete\n" fi if [ -f sdkconfig.old ]; then echo "\nDeleting sdkconfig.old\n" rm sdkconfig.old +else + echo -e "\nNo sdkconfig.old, skipping delete\n" fi echo "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/menuconfig b/custom_bin/menuconfig deleted file mode 100644 index ef1b88e..0000000 --- a/custom_bin/menuconfig +++ /dev/null @@ -1,2 +0,0 @@ -idf.py menuconfig -echo "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/rebuildfull b/custom_bin/rebuildfull index 28e0d69..4fb9049 100644 --- a/custom_bin/rebuildfull +++ b/custom_bin/rebuildfull @@ -1,20 +1,31 @@ #!/bin/bash +echo -e "\nFully Rebuildan~\n" + +echo -e "\nRunning fullclean\n" idf.py fullclean +echo -e "\nRunning manual delete tasks\n" + if [ -f build ]; then echo -e "\nDeleting build dir\n" rm -rf build +else + echo -e "\nNo build dir, skipping delete\n" fi if [ -f sdkconfig ]; then echo -e "\nDeleting sdkconfig\n" rm sdkconfig +else + echo -e "\nNo sdkconfig, skipping delete\n" fi if [ -f sdkconfig.old ]; then echo -e "\nDeleting sdkconfig.old\n" rm sdkconfig.old +else + echo -e "\nNo sdkconfig.old, skipping delete\n" fi echo -e "\nSetting up project for $ESPTARGET\n" diff --git a/custom_bin/save-defconfig b/custom_bin/save-defconfig new file mode 100644 index 0000000..353727a --- /dev/null +++ b/custom_bin/save-defconfig @@ -0,0 +1,16 @@ +#!/bin/bash +echo -e "\nSaving default config\n" + +if [-f ./sdkconfig.defaults ]; then + echo -e "backing up sdkconfig.defaults to sdkconfig.defaults.bak" + cp sdkconfig.defaults sdkconfig.defaults.bak +else + echo -e "\nNo sdkconfig.defaults found, skipping backup\n" +fi + +echo -e "\nRunning save-defconfig\n" + +idf.py save-defconfig + +echo -e "\nDefaults saved to sdkconfig.defaults\n" +echo -e "\nAll done :3\n" \ No newline at end of file diff --git a/custom_bin/setup b/custom_bin/setup index eac2977..224958a 100644 --- a/custom_bin/setup +++ b/custom_bin/setup @@ -1,4 +1,5 @@ -echo "\nSetting up for $ESPTARGET\n" +#!/bin/bash +echo -e "\nSetting up for $ESPTARGET\n" idf.py set-target $ESPTARGET idf.py menuconfig echo -e "\nAll done :3\n" \ No newline at end of file diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..0fb440e --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +55-dev.2 \ No newline at end of file