initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
idf.py build
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
idf.py flash monitor
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
idf.py fullclean && rmdir build && rm sdkconfig sdkconfig.old
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
idf.py fullclean
|
||||||
|
|
||||||
|
if [ -f build ]; then
|
||||||
|
rm -rf build
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f sdkconfig ]; then
|
||||||
|
rm sdkconfig
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f sdkconfig.old ]; then
|
||||||
|
rm sdkconfig.old
|
||||||
|
fi
|
||||||
|
|
||||||
|
idf.py set-target $ESPTARGET
|
||||||
|
idf.py menuconfig
|
||||||
|
idf.py build
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
idf.py set-target $ESPTARGET
|
||||||
|
idf.py menuconfig
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# esp-idf custom installer/reinstaller
|
||||||
|
installs/reinstalls full esp-idf with my own additions on linux.
|
||||||
|
pulls from master so its the very latest
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
###############################################
|
||||||
|
# begin esp-idf stuffss I made ################
|
||||||
|
###############################################
|
||||||
|
|
||||||
|
|
||||||
|
echo "\n=======CUSTOM=======\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))]
|
||||||
|
|
||||||
|
ESPPORT="$ttyselect"
|
||||||
|
echo "Changing dir to ~/esp"
|
||||||
|
cd ~/esp
|
||||||
|
|
||||||
|
echo "Setting environment variables"
|
||||||
|
echo "ESPPORT = $ESPPORT"
|
||||||
|
export ESPPORT
|
||||||
|
export ESPBAUD=921600
|
||||||
|
echo "ESPBAUD = $ESPBAUD"
|
||||||
|
|
||||||
|
echo "Adding Custom bins to PATH:"
|
||||||
|
export PATH=~/esp/.custom_bin:$PATH
|
||||||
|
|
||||||
|
echo "Set esp target (esp32, esp32s3, esp32c6, esp8266, etc)"
|
||||||
|
read $esp
|
||||||
|
|
||||||
|
export ESPTARGET=$esp
|
||||||
|
echo "ESPTARGET = $ESPTARGET"
|
||||||
|
|
||||||
|
echo "All done :3 Enjoy your esp-idf environment"
|
||||||
|
|
||||||
|
###############################################
|
||||||
|
# end esp-idf stuffss I made ##################
|
||||||
|
###############################################
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
echo "===== LFGGGGGGGG ======"
|
||||||
|
|
||||||
|
echo "Setting up environment"
|
||||||
|
current_dir=$PWD
|
||||||
|
|
||||||
|
echo "cleaning up environment"
|
||||||
|
if ! [ -d ~/esp ]; then
|
||||||
|
echo "~/esp not found, creating\n"
|
||||||
|
mkdir ~/esp
|
||||||
|
else
|
||||||
|
echo "~/esp found, skipping\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ~/esp/esp-idf ]; then
|
||||||
|
echo "~/esp/esp-idf found, deleting\n"
|
||||||
|
rm -rf ~/esp/esp-idf
|
||||||
|
else
|
||||||
|
echo "~/esp/esp-idf not found, skipping\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ~/.espressif ]; then
|
||||||
|
echo "~/.espressif found, deleting\n"
|
||||||
|
rm -rf ~/.espressif
|
||||||
|
else
|
||||||
|
echo "~/.espressif not found, skipping\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ~/esp/.custom_bin ]; then
|
||||||
|
echo "~/esp/.custom_bin found, deleting\n"
|
||||||
|
rm -rf ~/esp/.custom_bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "\n\nPlacing and enablig custom bins\n\n"
|
||||||
|
cp -r .custom_bin ~/esp
|
||||||
|
chmod +x ~/esp/.custom_bin/*
|
||||||
|
|
||||||
|
echo "\n\nPulling latest esp-idf code from github\n\n"
|
||||||
|
git clone --recursive --jobs 5 https://github.com/espressif/esp-idf.git ~/esp/esp-idf
|
||||||
|
|
||||||
|
echo "\n\nRunning install script\n\n"
|
||||||
|
~/esp/esp-idf/install.sh all --enable-*
|
||||||
|
|
||||||
|
echo "\n\nInstalling optional tools\n\n"
|
||||||
|
python ~/esp/esp-idf/tools/idf_tools.py install all
|
||||||
|
|
||||||
|
if ! [ -z $(alias | grep get_idf) ]; then
|
||||||
|
echo "get_idf alias not found, appending to ~/.zshrc\n"
|
||||||
|
echo "alias get_idf='. ~/esp/esp-idf/export.sh'" >> ~/.zshrc
|
||||||
|
else
|
||||||
|
echo "get_idf alias already installed, skipping\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Making copy of ~/esp/esp-idf/export.sh to ~/esp/esp-idf/export.sh.bak\n"
|
||||||
|
cp ~/esp/esp-idf/export.sh ~/esp/esp-idf/export.sh.bak
|
||||||
|
|
||||||
|
echo "editing ~/esp/esp-idf/export.sh\n"
|
||||||
|
sed -i 's/return 0/# return 0/g' ~/esp/esp-idf/export.sh
|
||||||
|
|
||||||
|
echo "appending custom additions to ~/esp/esp-idf/export.sh\n"
|
||||||
|
cat $current_dir/add-to-export-sh.txt >> ~/esp/esp-idf/export.sh
|
||||||
|
|
||||||
|
echo 'Restart shell with `source ~/.zshrc` and run `get_idf` to use\n'
|
||||||
|
echo "All done :3 Enjoy your new esp-idf install and environment"
|
||||||
Reference in New Issue
Block a user