esp8266/Arduino

xtensa-lx106-elf-g++: bad CPU type in executable on a M2 Mac without rosetta emulation installed

Open

#8,725 opened on 2022年11月23日

GitHub で見る
 (4 comments) (0 reactions) (0 assignees)C++ (15,728 stars) (13,342 forks)batch import
help wantedtype: enhancement

説明

I'm trying to compile and upload a sketch to a NodeMCU Lolin V3 board using arduino-cli_0.29.0_macOS_ARM64 but I get the following error whenever I try to compile:

alessio@AleMacBookPro Tools % ./arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 example



Used platform   Version Path                                                                    
esp8266:esp8266 3.0.2   /Users/alessio/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2

Error during build: fork/exec /Users/alessio/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++: bad CPU type in executable

Looks clear that the executable file xtensa-lx106-elf-g++ has been built for x86-64 Mac instead of AMR64... How can I download the correct files for my architecture?

I have been following this procedure, the problem is that arduino-cli core install esp8266:esp8266 downloads the wrong architecture executables, it should download executables built for ARM64 instead of those for x86-64.

コントリビューターガイド