python > ESP32 настройка для Arduino IDE
30.03.2018 12:22:33
Наиболее часто встречающиеся слова в статье:
[pyserial] [version] [platform] [esptool] [Arduino] [Windows] [installation] [windows] [library] [project_name]
Статья:
Там же есть ESP32 CORE для Arduino IDE я пакет скачал c
https://github.com/espressif/arduino-esp32
Установка под Windows очень проста:
— Устанавливаем Arduino IDE (если еще не установлена)
— Скачиваем архив с последней версий Core ESP32
— Распаковываем архив в папку:
C:/Users/[YOUR_USER_NAME]/Documents/Arduino/hardware/espressif/esp32
у меня C:\Users\iocsha\Documents\Arduino\hardware\espressif\esp32
Многие пользователи жалуются, что у них ничего не работает и не появляется
поддержка ESP32 в Arduino IDE.
Тут дело вот в чём: поскольку драйвера ESP32 только разрабатываются, то
несколько изменён порядок расположения
системных директорий. В качестве папки для расположения скетчей в настройках
Arduino IDE должна быть указана папка
C:\Users\User\Documents\Arduino
(с теми же поправками на диск и имя пользователя), а файлы дистрибутива должны
располагаться внутри этой папки так,
как рекомендует производитель. Если не будет учтён этот момент, то поддержка
ESP32 в
Arduino IDE не появится и ничего работать не будет.
После распаковки выполнить:
C:\Users\iocsha\Documents\Arduino\hardware\espressif\esp32\tools там запускаем
get.exe (а то ошибка нет xtensa-esp32-elf/bin/xtensa-esp32-elf-g++)
Для win XP настройка сложнее(pyserial новый н еподдерживается системой XP
, воощем требование - python <=3.4, pyserial 2.7)
ESP32 framework installation on Windows XP
On Windows XP the installation of arduino-esp32 fails with an error thrown by
get.exe.
User JamesGKent found an explanation and partly solution.
Explanation:
The issue with esp32 on windows xp is get.exe, esptool.exe are basically a
compiled version of the python scripts, they’ve been built with a new version of
pyserial library that does not work on windows XP.
Solution:
Modify the platform.txt file so that it uses python like the Linux version does.
Note that you’ll need to have a version of python and the pyserial library
installed that support XP (python <=3.4, pyserial 2.7). Changes in platform.txt:
ESP32 framework installation on Windows XP
On Windows XP the installation of arduino-esp32 fails with an error thrown by
get.exe.
User JamesGKent found an explanation and partly solution.
Explanation:
The issue with esp32 on windows xp is get.exe, esptool.exe are basically a
compiled version of the python scripts, they’ve been built with a new version of
pyserial library that does not work on windows XP.
Solution:
Modify the platform.txt file so that it uses python like the Linux version does.
Note that you’ll need to have a version of python and the pyserial library
installed that support XP (python <=3.4, pyserial 2.7). Changes in platform.txt:
Найдём файл platform.txt например
D:\Users\Администратор\Documents\Arduino\hardware\espressif\esp32
и заменим
line 9: tools.esptool.cmd.windows=esptool.py line 81: recipe.objcopy.hex.pattern=py "{tools.esptool.path}/{tools.esptool.cmd}" --chip esp32 elf2image --flash_mode "{build.flash_mode}" --flash_freq "{build.flash_freq}" --flash_size "{build.flash_size}" -o "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.elf" line 98: tools.esptool.upload.pattern=py "{path}/{cmd}" --chip esp32 --port "{serial.port}" --baud {upload.speed} --before default_reset --after hard_reset write_flash -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size detect 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x1000 "{runtime.platform.path}/tools/sdk/bin/{build.boot}.bin" 0x10000 "{build.path}/{build.project_name}.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin"
ставим python-3.4.0 потом ставим pyserial-2.7.win32_py3k скачать pyserial-2.7.win32_py3k