summaryrefslogtreecommitdiff
path: root/bin/espdev
diff options
context:
space:
mode:
authorpants <niklasjo2004@gmail.com>2026-09-21 14:17:03 -0700
committerpants <niklasjo2004@gmail.com>2026-09-21 14:17:03 -0700
commit7b21727285e50b0b050c4ddd70d07542229c5366 (patch)
tree5d369153c5df5b41f3750d25479a68f20169c8ff /bin/espdev
init
Diffstat (limited to 'bin/espdev')
-rwxr-xr-xbin/espdev27
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/espdev b/bin/espdev
new file mode 100755
index 0000000..b19b72b
--- /dev/null
+++ b/bin/espdev
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+if [ $1 = "source" ]; then
+ echo "sourcing and exiting..."
+. $HOME/esp/esp-idf/export.sh
+ exit
+fi
+
+. $HOME/esp/esp-idf/export.sh
+echo "cleaning up..."
+idf.py fullclean
+echo "done cleaning."
+echo "building..."
+idf.py build
+echo "done building."
+echo "flashing..."
+idf.py -p /dev/ttyACM0 flash
+echo "done flashing."
+read -n 1 input -p "monitor serial output? [y/n]"
+if [ $input = y ]; then
+ echo "monitoring..."
+ idf.py -p /dev/ttyACM0 monitor
+else if [ $input = n ]; then
+ exit
+else
+ echo "yes or no dude..."
+fi