MacOSXのArduino IDEにESP32開発環境を追加する方法
M5Stackを買ったので、下記を参考にESP32の開発環境をMacBookAirに入れた。
Arduino core for the ESP32 のインストール方法 | mgo-tec電子工作
MacでESP32のLチカ(Arduino IDE版) - Qiita
M5 Stackのライブラリは、ライブラリマネージャから入れた。
yosukenoMacBook-Air:tools yosukekirihata$ cd /Applications/Arduino.app/Contents/Java/hardware/espressif/esp32/tools/ yosukenoMacBook-Air:tools yosukekirihata$ python get.py System: Darwin, Info: Darwin-16.7.0-x86_64-i386-64bit Platform: x86_64-apple-darwin Downloading xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz Done Extracting xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz Downloading esptool-da31d9d-macos.tar.gz Done Extracting esptool-da31d9d-macos.tar.gz Downloading mkspiffs-0.2.2-arduino-esp32-osx.tar.gz Traceback (most recent call last): File "get.py", line 148, in <module> get_tool(tool) File "get.py", line 103, in get_tool urlretrieve(url, local_path, report_progress) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 98, in urlretrieve return opener.retrieve(url, filename, reporthook, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 245, in retrieve fp = self.open(url, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 213, in open return getattr(self, name)(url) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 443, in open_https h.endheaders(data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1049, in endheaders self._send_output(message_body) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 893, in _send_output self.send(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 855, in send self.connect() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1274, in connect server_hostname=server_hostname) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 352, in wrap_socket _context=self) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 579, in __init__ self.do_handshake() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 808, in do_handshake self._sslobj.do_handshake() IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) yosukenoMacBook-Air:tools yosukekirihata$
なんかSSLのエラー?が出たが、Arduino IDEを起動すると、ツール→ボード→ESP32 Dev Moduleを選択できるようになった。
M5Stackのサンプルコードをビルドして、書き込み・実行もできた。