Skip to content

Instantly share code, notes, and snippets.

@doskoi
Last active September 4, 2018 16:06
Show Gist options
  • Save doskoi/d73baeb69276284b94c968bfeb1347c6 to your computer and use it in GitHub Desktop.
Save doskoi/d73baeb69276284b94c968bfeb1347c6 to your computer and use it in GitHub Desktop.
Raven build environment setup
#!/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..."
@doskoi
Copy link
Author

doskoi commented Sep 2, 2018

To flash to chip, you have to use root to access USB device

@doskoi
Copy link
Author

doskoi commented Sep 2, 2018

Just simply run this in bash wget https://bit.ly/RavenLRS -O raven.sh && . ./raven.sh

@doskoi
Copy link
Author

doskoi commented Sep 3, 2018

Convert elf to binary
python $IDF_PATH/components/esptool_py/esptool/esptool.py --chip esp32 elf2image <PATH OF YOUR raven.elf>

@doskoi
Copy link
Author

doskoi commented Sep 4, 2018

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