Last active
September 4, 2018 16:06
-
-
Save doskoi/d73baeb69276284b94c968bfeb1347c6 to your computer and use it in GitHub Desktop.
Raven build environment setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# author @doskoi | |
# Raven build environment setup | |
RAVENDIR="$HOME/raven" | |
ESPDIR="$RAVENDIR/esp" | |
mkdir -p $RAVENDIR | |
mkdir -p $ESPDIR | |
sudo apt update | |
sudo apt install build-essential git wget make libncurses-dev flex bison gperf python python-serial python-pip -y | |
cd $ESPDIR | |
git clone https://github.com/espressif/esp-idf.git | |
cd esp-idf | |
git checkout v3.0 | |
git submodule init | |
git submodule update -r | |
git submodule update | |
export IDF_PATH=$ESPDIR/esp-idf | |
echo "export IDF_PATH=$ESPDIR/esp-idf" >> ~/.bash_profile | |
cd $ESPDIR | |
wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz | |
tar -xzf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz | |
export PATH=$PATH:$ESPDIR/xtensa-esp32-elf/bin | |
echo "export PATH=$PATH:$ESPDIR/xtensa-esp32-elf/bin" >> ~/.bash_profile | |
cd $RAVENDIR | |
git clone --recursive https://github.com/RavenLRS/raven.git | |
cd raven | |
# Update shell | |
source ~/.bash_profile | |
echo "Ready to make..." |
Grant permission to access /dev/ttyUSB by command:
sudo usermod -a -G dialout $USER
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Convert elf to binary
python $IDF_PATH/components/esptool_py/esptool/esptool.py --chip esp32 elf2image <PATH OF YOUR raven.elf>