Compiling - qtoggle/espqtoggle GitHub Wiki
Using espQToggle Builder
espQToggle Builder is a specially crafted Docker image that contains everything needed to build espQToggle.
Requirements
- a Linux or Unix-like machine (Windows may work but commands may need to be adjusted)
- Docker engine
- git
Steps
-
Clone the source code:
git clone https://github.com/qtoggle/espqtoggle.git /path/to/espqtoggle
-
Run the
espqtoggle-builder
Docker container:docker run -it --rm -v /path/to/espqtoggle:/src qtoggle/espqtoggle-builder
Always specify full path to your espqtoggle folder, when supplying arguments to
-v
. -
It should generate the following files:
/path/to/espqtoggle/build/user{1,2}.bin /path/to/espqtoggle/build/firmware-${flash_mode}-${flash_freq}.bin
Being built by Docker, your compiled files will be owned by
root
. If you don't like that, reown them:sudo chown -R youruser /path/to/espqtoggle/build
Manual Compiling
Use manual compiling if you plan to develop (on) espQToggle and will thus probably need to build the project many times.
Requirements
- a Linux or Unix-like machine (Windows may work but commands may need to be adjusted)
- git
- GNU makefile
- Xtensa Toolchain
- ESP8266 non-OS SDK (branch 2.2.x)
Steps
-
Clone the source code:
git clone https://github.com/qtoggle/espqtoggle.git /path/to/espqtoggle
-
Ensure your
PATH
environment variable points to the Xtensa toolchain bin directory; you should be able to execute thextensa-lx106-elf-gcc
command. -
Set the environment variable
SDK_BASE
to point to the folder where your ESP8266 non-OS SDK lives.export SDK_BASE=/path/to/esp8266-nonos-sdk
-
Run the
espqtoggle/builder/fix-sdk.sh
script to make necessary adjustments to your ESP8266 non-OS SDK:/path/to/espqtoggle/builder/fix-sdk.sh ${SDK_BASE}
-
Run
make
inside the project's folder:cd /path/to/espqtoggle && make -j4
-
It should generate the following files:
/path/to/espqtoggle/build/user{1,2}.bin /path/to/espqtoggle/build/firmware.bin