Hey all, I was trying to figure out how to get arduino working on arm linux. I have an M1 mac and am running Ubuntu arm64. I'm trying to actually load something into an ESP32 and when I try to compile I get the following error
xtensa-esp32-elf-g++: exec format error
Is this the right place to ask or is this ESP32 specific? Just kind of wondering if this is a toolchain issue?
I'm not stuck at this point cause I can just use the mac native ide but I'd like to work through getting it up on this VM if possible.
Seems like arm64 support was originally added by #4117, but broke due to the introduction of the riscv32 core support.
So it seems that there was support, but then that support was lost in the latest release. If so, you should be able to fix the problem by rolling back to the version from before the support was lost.
I'll provide instructions for doing that:
Select Tools > Board > Boards Manager from the Arduino IDE's menus.
Wait for the updates to finish.
Scroll down through the list of boards platforms until you see "esp32 by Espressif Systems". Click on it.
From the "Select Version" menu, select "1.0.6".
Click the Install button.
Wait for the installation to finish.
Click the Close button.
Now you can try compiling again to see if that was an effective workaround.
Hey guys, thank you all for the help, sent me down some paths. Turns out that it is an esp issue for sure and I'd have build the toolchain from scratch which isn't a problem except that the locations where the toolchain dependencies are hosted seem to all be down. Looks like the people in that project have been chasing the issues for a long time and it's a moving target. I don't have the time to deal with, already wasted more time than I wanted to, so I will just run this on the mac directly and hope it works. Worst case I'll find some windows machine.
I do my Arduino developments with Eclipse/Sloeber on Linux Mint (arm64) since years, also for ESP 32. There are versions for Windows, Linux and MAC available. There is also an issue handling at GitHub.
I don't think switching to Sloeber would help in this particular case. The reason is this isn't a problem with the Arduino IDE. This is a problem with the toolchain for compiling and uploading to the ESP32. Arduino IDE and Sloeber both are using the same toolchain. They just pass the appropriate commands to it. So you'll have the same problem no matter which IDE you use so long as they depend on the same toolchain.
For this reason, you would find that the M1 can be used no problem with some other boards.