1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00
esp8266/doc/eclipse/makefile.init
Earle F. Philhower, III 0a031ce957
Move all scripts and documentation to Python3 (#6378)
* Move all scripts and documentation to Python3

Python 2 EOL is Jan 1, 2020.  Migrate scripts to run under Python 3.

Under Windows, we're already running Python 3.7, by dumb luck.  The
oddness is that the Windows standalone executable for Python 3 is called
"python" whereas under UNIX-like OSes it's called "python3" with
"python" always referring to the Python 2 executable.  The ZIP needs to
be updated to include a Python3.exe (copy of Python.exe) so that we can
use the same command lines under Linux and Windows, and to preserve my
sanity.

Fixes #6376

* Add new Windows ZIP with python3.exe file

* Sort options in boards.txt generation for repeatability

The order of the board opts dict changes depending on the Python version
and machine, so sort the options before printing them to get a stable
ordering.

* Re-add Python2 compatibility tweaks

Most scripts can run as Python 2 or Python 3 with minimal changes, so
re-add (and fix, as necessary) compatibility tweaks to the scripts.
2019-08-28 12:42:48 -07:00

40 lines
1.3 KiB
Plaintext

vecho := @echo
Q := @
PROJECT_NAME=project_name
OTA_IP=192.168.254.100
OTA_PORT=8266
SERIAL_PORT=COM3
SERIAL_BAUD=230400
ARDUINO_BASE = D:/Coding/avr/Programme/arduino-nightly
ESP8266_BASE = $(ARDUINO_BASE)/hardware/esp8266com/esp8266
ESP8266_TOOLS = $(ESP8266_BASE)/tools
XTENSA_TOOLS_ROOT = $(ESP8266_TOOLS)/xtensa-lx106-elf/bin
PYTHON_BIN = python3
ESPTOOL_PY_BIN = $(ESP8266_TOOLS)/esptool.py
ESPOTA_PY_BIN = $(ESP8266_TOOLS)/espota.py
ESPTOOL_BIN = $(ESP8266_TOOLS)/esptool/esptool.exe
ota:
$(vecho) ota...
$(PYTHON_BIN) $(ESPOTA_PY_BIN) -i $(OTA_IP) -p $(OTA_PORT) --auth= -f ./$(PROJECT_NAME).bin
ota_spiffs:
$(vecho) ota spiffs...
$(PYTHON_BIN) $(ESPOTA_PY_BIN) -i $(OTA_IP) -p $(OTA_PORT) --auth= -s -f ./$(PROJECT_NAME)_spiffs.bin
erase_flash:
$(vecho) "Erase Flash"
$(PYTHON_BIN) $(ESPTOOL_PY_BIN) -p $(SERIAL_PORT) -b $(SERIAL_BAUD) erase_flash
dumpmem:
$(vecho) "Read Flash need some time..."
$(PYTHON_BIN) $(ESPTOOL_PY_BIN) -p $(SERIAL_PORT) -b $(SERIAL_BAUD) read_flash 0 4194304 dump.bin
objdump:
"$(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objdump" -S $(PROJECT_NAME).elf > $(PROJECT_NAME).dobj