A timing app designed to run on my Odroid-GO
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Macoy Madson de1bf7d26b Fixed sleep mode issues 3 years ago
Dependencies Used Austin Morlan's code to get a good base 3 years ago
app Fixed sleep mode issues 3 years ago
.clang-format Added timer, sleep mode, and input functions 3 years ago
.gitignore Used Austin Morlan's code to get a good base 3 years ago
.gitmodules Used Austin Morlan's code to get a good base 3 years ago
COPYING Add copying and changed readme 3 years ago
LICENSE Initial commit 3 years ago
ReadMe.org Added battery percentage and low battery indicate 3 years ago

ReadMe.org

esp32-timer

A timing app designed to run on my Odroid-GO.

Setting up ESP-IDF

See docs.

# 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

Possibly necessary step

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;
}

Building compiler from source

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

Building the app

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

Source

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).