Firmware for Espressif Wi-Fi modules on Duet boards. Based on DuetWiFiSocketServer, but ported to the newer ESP8266 RTOS SDK and ESP-IDF.
Building the project generates DuetWiFiServer.bin
used for M997 S1
. ESP8266, ESP32, ESP32-S3 and ESP32-C3 are supported.
-
Install the pre-requisites for your platform: Linux, macOS. Note that you might need additional/different packages depending on your system. For example, on systems which transitioned to Python 3, you might need
python3-pip python-is-python3 python3-serial
(or the equivalent for your package manager) instead. -
Clone ESP8266 RTOS SDK
dwss_support
branch. Make sure the path to the SDK has no spaces.
user@pc:/path/to$ git clone --branch dwss_support --recursive https://github.com/Duet3D/ESP8266_RTOS_SDK.git
- Navigate to the ESP8266 RTOS SDK directory and execute the install script.
user@pc:/path/to/ESP8266_RTOS_SDK$ ./install.sh
- Export environment variables for the current terminal session.
user@pc:/path/to/ESP8266_RTOS_SDK$ . ./export.sh
- Navigate to this directory and execute the
make
command. Exit and save the configuration when prompted. Once the build finishes,DuetWiFiServer.bin
will be in thebuild
directory.
user@pc:/path/to/WiFiSocketServerRTOS$ make
-
Download the pre-packaged MSYS environment and toolchain. Extract both to a directory on your system (recommend
C:\
for the pre-packaged MSYS environment, andC:\msys32\opt
for the toolchain). -
Clone ESP8266 RTOS SDK
dwss_support
branch. Make sure the path to the SDK has no spaces.
user@pc /path/to
$ git clone --branch dwss_support --recursive https://github.com/Duet3D/ESP8266_RTOS_SDK.git
-
Open a MINGW32 terminal (located at
C:\msys32\mingw32.exe
if the pre-packaged MSYS environment was extracted toC:\
as recommended). -
Using the MINGW32 terminal,
- Set
IDF_PATH
to where the ESP8266 RTOS SDK was extracted and add the toolchain binary directory (/opt/xtensa-lx106-elf/bin
if the toolchain was extracted toC:\msys32\opt
as recommended) toPATH
.
user@pc MINGW32 ~ $ export IDF_PATH="/path/to/ESP8266_RTOS_SDK" user@pc MINGW32 ~ $ export PATH="/opt/xtensa-lx106-elf/bin":$PATH
- Install the Python pre-requisites.
user@pc MINGW32 ~ python -m pip install --user -r $IDF_PATH/requirements.txt
- Set
-
Navigate to this directory and execute the
make
command. Exit and save the configuration when prompted. Once the build finishes,DuetWiFiServer.bin
will be in thebuild
directory.
user@pc MINGW32 /path/to/WiFiSocketServerRTOS
$ make
Follow the instructions for setting up the build environment with Eclipse on Linux/macOS or Windows. Make sure to use ESP8266 RTOS SDK dwss_support
branch.
Afterwards, import this project in the Import New Project
step.
-
Setup ESP-IDF according to your platform: Linux/macOS, Windows. Use the Duet3D esp-idf,
dwss_support
branch:git clone --branch dwss_support --recursive https://github.com/Duet3D/esp-idf.git
On Windows, choose "
Use an existing ESP-IDF repository
" in the installation wizard, and point it to the resulting clone directory. -
Navigate to the WiFiSocketServerRTOS directory and execute the following command. Once the build finishes,
DuetWiFiServer.bin
will be in thebuild
directory.user@pc:/path/to/WiFiSocketServerRTOS$ idf.py set-target esp32 build
Note: Replace
esp32
with the actual target chip
Eclipse and VSCode are supported through plugins. Read more about the plugin setup and build process on the docs page.