0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ESP32をMac mini M4環境でArduino IDEを使って書き込む

Last updated at Posted at 2025-06-25

1. 経緯

ESP32 DevKitCを触る機会があり、Mac Mini M4でArduino IDEをインストールした内容を備忘録として残しておきます。

2. 問題

Arduino IDEで実行時に「bad CPU type in executable」とエラーがでる。

3. 環境

・Mac Mini M4 (MacOS Sequoia15.5)

・ESP32-DevKitC-VE ESP32-WROVER-E開発ボード 8MB
https://akizukidenshi.com/catalog/g/g115674/

・USBケーブル USB2.0 Aオス-マイクロBオス 0.5m A-microB
https://akizukidenshi.com/catalog/g/g109314/

・サンワサプライ USB Type-C コンボハブ(4ポート) ブラック USB-3TCH7BK
https://www.amazon.co.jp/dp/B07CXR5MY2?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1

4. インストール時、参考にしたURL

ESP32のArduino開発環境をつくりました(おおたfab 電子工作初心者勉強会)
https://kanpapa.com/2022/12/esp32-otafab-study-arduino.html

5. エラーについて

インストールはできたのですが、実行するとArduino IDEのコンソール画面で以下のようなエラーが

bad CPU type in executable

6. 解決方法

公式にも書いてありましたが、Macのどの環境で〜と詳細を書いていなかったため一抹の不安が
https://support.arduino.cc/hc/en-us/articles/7765785712156-Error-bad-CPU-type-in-executable-on-macOS

しかし、検証した方がいたので安心して?記述通りインストールしてみたところ通常通り実行できました🎉
https://intellectualcuriosity.hatenablog.com/?page=1741944392

megane@UserMac-mini ~ % softwareupdate --install-rosetta
I have read and agree to the terms of the software license agreement. A list of Apple SLAs may be found here: https://www.apple.com/legal/sla/
Type A and press return to agree: a
2025-06-25 16:10:44.679 softwareupdate[1386:19458] Package Authoring Error: 082-44576: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute
Install of Rosetta 2 finished successfully

7. 補足

・Package Authoring Error:でてるけど、とりあえず動きました(笑)。要調査ではあります。
・M1?M2あたりだとPythonを入れないとエラーがでる。といったものも見受けられましが、M4環境では--install-rosettaだけで書き込みできました。

8. 最後に

いいね👌いただけると励みになります!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?