-
Notifications
You must be signed in to change notification settings - Fork 470
Building
The following are the steps required to compile this project:
-
Download and setup the ESP-IDF (currently V5.5.x).
-
Select you target ESP32 chip.
idf.py set-target <YOUR_ESP_TYPE>
- Build the project and flash it to the ESP32.
idf.py build
idf.py flash monitorA detailed instruction on how to build, configure and flash a ESP-IDF project can also be found the official ESP-IDF guide.
The firmware supports the WT32-ETH01 board, which uses a wired Ethernet (LAN8720) uplink instead of WiFi STA. In this mode the ESP32 receives its upstream connection via the RJ45 Ethernet port and provides a WiFi AP for clients.
To build the Ethernet variant, pass the additional sdkconfig defaults file:
idf.py -B build_eth -D 'SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.wt32_eth01' buildTo flash:
idf.py -B build_eth -p /dev/ttyUSB0 flash monitorDifferences from the standard WiFi build:
- Upstream connection is wired Ethernet (DHCP or static IP) instead of WiFi STA
- The
set_sta,set_mac, andscanCLI commands are not available - The web interface omits the "Getting Started" and "WiFi Scan" pages
The firmware supports the Olimex ESP32-POE-ISO board with wired Ethernet uplink and PoE. The build is identical in structure to the WT32-ETH01 variant but uses different GPIO assignments and requires the ESP32 to generate the RMII 50 MHz clock on GPIO 17.
To build:
idf.py -B build_poe_iso -D SDKCONFIG="sdkconfig.poe_iso" -D 'SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.esp32_poe_iso' buildTo flash and monitor:
idf.py -B build_poe_iso -p /dev/ttyUSB0 flash monitorDifferences from the WT32-ETH01 build:
| Parameter | WT32-ETH01 | ESP32-POE-ISO |
|---|---|---|
| PHY address | 1 | 0 |
| PHY power GPIO | 16 | 12 |
| RMII clock | Input from PHY | Output on GPIO 17 |
All Ethernet GPIO assignments — including the RMII clock output pin — can also be configured interactively via idf.py menuconfig under NAT Router Uplink, or by editing sdkconfig.defaults.esp32_poe_iso directly:
CONFIG_ETH_MDC_GPIO=23
CONFIG_ETH_MDIO_GPIO=18
CONFIG_ETH_PHY_ADDR=0
CONFIG_ETH_PHY_POWER_GPIO=12
CONFIG_ETH_RMII_CLK_OUTPUT_GPIO=17 # -1 = input from PHY (WT32-ETH01 style)
For automated building across multiple ESP32 targets with esp-idf, use the provided build scripts:
./build_all_targets.sh