Files
Forairaaaaa ecefab563c init
2023-10-13 11:35:21 +08:00

26 lines
492 B
Bash
Executable File

#!/bin/bash
### This is for lazzy shit like me to build -> flash - > monitor project
### Use < usbipd wsl attach -a -b [BUSID] > on PowerShell to auto attach the board
# Configs
IDF_PATH=$HOME/esp/esp-idf-v4.4.6
SERIAL_PORT=/dev/ttyACM0
# Help shit
help() {
sed -rn 's/^### ?//;T;p' "$0"
}
if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then
help
exit 1
fi
# Get idf
. ${IDF_PATH}/export.sh
# Build and flash and monitor
idf.py -p ${SERIAL_PORT} flash -b 1500000 monitor