mirror of
https://github.com/micropython/micropython.git
synced 2025-09-05 01:10:36 +02:00
This commit fixes compilation for the ESP8266 port when using a local toolchain on relatively recent Linux systems. The documentation asks the user to delete the esptool instance that comes with the toolchain, in favour of using the one provided by the system. On Linux systems that are at least two years old (looking at the CI Ubuntu image as an example), the version of esptool installed with the package manager isn't called `esptool.py` but just `esptool`. The Makefile didn't take that into account and used `esptool.py` without checking if such a command exists, making builds fail. Now preference is given to the `esptool` command, falling back to `esptool.py` only if the former command does not exist or it is not available to the current user, to maintain compatibility with old setups. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>