以下の内容はhttps://relativelayout.hatenablog.com/entry/2021/01/22/213917より取得しました。


macOS Big SurにESP8266開発環境を構築する(Arduino IDE)

今回もハマったお。

ポキオ ESP8266 Arduino macOS Big Sur

Big Sur環境に構築

Big Surをクリーンインストールしたのはいいのですが。

relativelayout.hatenablog.com

Arduino開発環境などが綺麗サッパリなくなってしまったので、いちから構築してみました。特に、よくプロトタイピングで使うESP8266が動くようにしてみました。

  • メディア: おもちゃ&ホビー

まずはArduino IDEをインストール

なにはともあれ。

ポキオ ESP8266 Arduino macOS Big Sur

www.arduino.cc

公式HPからmacOS向けのバイナリをダウンロード。そのままApplicationフォルダにどーん。

ポキオ ESP8266 Arduino macOS Big Sur

とりあえず起動はOKそうです。

ESP8266が開発できるようにする

Arduino core for ESP8266 WiFi chipを導入します。

github.com

設定画面のAdditional Boards Manager URLshttps://arduino.esp8266.com/stable/package_esp8266com_index.jsonを追加します。

ポキオ ESP8266 Arduino macOS Big Sur

するとBoard ManagerにESP8266が現れるので、インストールしちゃいます。

ポキオ ESP8266 Arduino macOS Big Sur

ESP8266をmacにつなぐと、認識もされるようです。

ポキオ ESP8266 Arduino macOS Big Sur

ビルドができない・・・?

と、ここまでは良かったんですが。いざコンパイルをしようとすると失敗してしまいます。

pyserial or esptool directories not found next to this upload.py tool.

An error occurred while uploading the sketch

どうやら、ライブラリをロードする部分で失敗しているようです。

mag.switch-science.com

forum.arduino.cc

~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/pyserial/serial/tools/list_ports_osx.pyの一部を書き換えます。

ポキオ ESP8266 Arduino macOS Big Sur

29行目・30行目を下記のように書き換えます。

iokit = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/IOKit.framework/IOKit')
cf = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation')

これで書き込めるようになりました!

ポキオ ESP8266 Arduino macOS Big Sur




以上の内容はhttps://relativelayout.hatenablog.com/entry/2021/01/22/213917より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14