1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 17:43:51 +01:00

cpu/esp8266: option to use a custom esptool.py removed

This commit is contained in:
Gunar Schorcht 2025-07-23 10:48:42 +02:00
parent c551744b76
commit 4918b970d0
2 changed files with 9 additions and 24 deletions

View File

@ -357,29 +357,12 @@ package at build-time and there is no need to install it separately.
### Installation of esptool.py (ESP flash programmer tool) {#esp8266_installation_of_esptool}
The RIOT port does not work with the `esptool.py` ESP flasher program
available on [GitHub](https://github.com/espressif/esptool) or
as package for your OS.
Instead, a modified version from the ESP8266 RTOS SDK is required.
To avoid the installation of the complete ESP8266 RTOS SDK, for example
because RIOT Docker `riotdocker` is used for compilation, `esptool.py`
has been extracted from the ESP8266 RTOS SDK and placed in RIOT's
directory `dist/tools/esptool`.
For convenience, the build system uses always the version from this directory.
The RIOT port uses the ESP flasher program `esptool.py` as a package directly
from [GitHub](https://github.com/espressif/esptool) within a virtual Python
environment.
Therefore, it is **not necessary to install** `esptool.py` explicitly. However
`esptool.py` depends on `pySerial` which can be installed either
using `pip`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sudo pip install pyserial
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
or the package manager of your OS, for example on Debian/Ubuntu systems:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
apt install python-pyserial
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For more information on `esptool.py`, please refer the
For more information on `esptool.py`, please refer to the
[git repository](https://github.com/espressif/esptool).
[Back to table of contents](#esp8266_toc)

View File

@ -8,6 +8,7 @@ MODULE := esp_bootloader
NO_AUTO_SRC = 1
include $(RIOTBASE)/Makefile.base
include $(RIOTMAKE)/tools/esptool.inc.mk
# List of bootloader sources.
include $(CURDIR)/bootloader.inc.mk
@ -96,7 +97,7 @@ $(ESP_SDK_BOOTLOADER_ELF): $(ESP_SDK_BOOTLOADER_OBJS) \
$(Q)$(CC) -o $@ $(LINKFLAGS) -Wl,-Map=$(@:%.elf=%.map)
FLASH_CHIP = esp8266
ESPTOOL ?= $(RIOTTOOLS)/esptools/esptool.py
# TODO: These should be exported/configurable from the app side. That would
# require to export these values.
FLASH_MODE ?= dout
@ -107,7 +108,8 @@ FLASH_SIZE ?= 4
# like the regular objdump binary file but it contains a 16 byte header which
# specifies the flash size, mode and speed that the ROM bootloader uses to load
# this second-stage bootloader image.
$(ESP_SDK_BOOTLOADER_BIN): $(ESP_SDK_BOOTLOADER_ELF)
$(ESP_SDK_BOOTLOADER_BIN): esptool $(ESP_SDK_BOOTLOADER_ELF)
$(Q)echo "Generating bootloader image $(ESP_SDK_BOOTLOADER_BIN)"
$(Q)$(ESPTOOL) --chip $(FLASH_CHIP) elf2image --flash_mode $(FLASH_MODE) \
--flash_size $(FLASH_SIZE)MB --flash_freq $(FLASH_FREQ) --version 1 -o $@ $<
--flash_size $(FLASH_SIZE)MB --flash_freq $(FLASH_FREQ) -o $@ $(ESP_SDK_BOOTLOADER_ELF)
$(Q)mv $(@)0x00000.bin $@