diff --git a/.gitmodules b/.gitmodules index 5a80a7b..967aca4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "Dependencies/esp-idf"] path = Dependencies/esp-idf url = https://github.com/espressif/esp-idf +[submodule "Dependencies/crosstool-NG"] + path = Dependencies/crosstool-NG + url = https://github.com/espressif/crosstool-NG.git diff --git a/Dependencies/crosstool-NG b/Dependencies/crosstool-NG new file mode 160000 index 0000000..7c5693d --- /dev/null +++ b/Dependencies/crosstool-NG @@ -0,0 +1 @@ +Subproject commit 7c5693db97c8d87b4792958e6cffb16489ba7f26 diff --git a/ReadMe.org b/ReadMe.org index 484ade5..dce1656 100644 --- a/ReadMe.org +++ b/ReadMe.org @@ -1,3 +1,31 @@ #+TITLE: esp32-timer A timing app designed to run on my Odroid-GO. + +* Setting up ESP-IDF +[[https://docs.espressif.com/projects/esp-idf/en/latest/][See docs]]. + +The following is to set up the toolchain by building as much of it from source as the docs have specified. While I could download a binary, I like the idea of compiling from source in case their website goes down. I'm doing this on Ubuntu 18.04. +#+BEGIN_SRC sh +# Dependencies +sudo apt-get install git wget libncurses-dev flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache libffi-dev libssl-dev gawk gperf grep gettext python python-dev automake bison flex texinfo help2man libtool libtool-bin make + +# Submodules +cd Dependencies/esp-idf/ +git submodule update --init + +# Crosstool - this builds GCC for ESP32. This will take a while (27 minutes in my case) +cd ../crosstool-NG/ +git submodule update --init +./bootstrap && ./configure --enable-local && make +./ct-ng xtensa-esp32-elf +./ct-ng build +chmod -R u+w builds/xtensa-esp32-elf + +cd ../../ +mkdir -p tools +IDF_TOOLS_PATH=$PWD/tools +cd Dependencies/esp-idf/ +# TODO: This doesn't actually use the GCC I built, nor the tools path... +./install.sh +#+END_SRC