|
3 months ago | |
---|---|---|
Dependencies | 4 months ago | |
app | 3 months ago | |
.clang-format | 4 months ago | |
.gitignore | 4 months ago | |
.gitmodules | 4 months ago | |
COPYING | 4 months ago | |
LICENSE | 4 months ago | |
ReadMe.org | 3 months ago |
esp32-timer
A timing app designed to run on my Odroid-GO.
# 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
Next, build the toolchain:
cd Dependencies/esp-idf/ ./install.sh
I'm not sure this is necessary. The readme recommends doing it.
Comment out line 981 of esp-idf/components/driver/sdspi_host.c
to enable the shared SPI bus:
// Initialize SPI bus esp_err_t ret = spi_bus_initialize((spi_host_device_t)slot, &buscfg, slot_config->dma_channel); if (ret != ESP_OK) { ESP_LOGD(TAG, "spi_bus_initialize failed with rc=0x%x", ret); //return ret; }
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.
TODO: This doesn't work yet.
# 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
Build and flash the application to the Odroid, which should be connected via USB and powered on:
cd Dependencies/esp-idf/ . ./export.sh cd ../../app idf.py build && idf.py -p /dev/ttyUSB0 flash
Note that the idf.py
commands will only work in the terminal where you executed export.sh
.
Monitor, if it doesn't work:
idf.py -p /dev/ttyUSB0 monitor
Thanks to Austin Morlan for his Odroid Go code (MIT license), some of which I have modified. It is kept in Dependencies/embedded-game-programming for reference, but that copy is not used in the app.
I found it much easier to get working than Odroid-Go-Firmware (note: different version of that firmware here). I do use modified subsets of Odroid-Go-Firmware (I'm not sure of the license, so it may actually need to be extracted).