I have just installed esp-idf and can't compile the example ESP Blink sketchfrom DroneBot Workshop 2020 (or any other sample sketches for ESP32)
All sample sketches for the ESP32 dev module give a compilation error: unrecognized arguments: /Users/geoff/Library/Arduino15/packages/esp32/hardware/esp32/2.0.5/tools/sdk/esp32/bin/bootloader_qio_80m.elf
I am using a MacBook M1running Ventura 13.2
I have just installed Arduino IDE v 2.03 and ESP-idf v2.05
Sketches for Arduino boards compile fine.
The IDE recognises my ESP32 Dev module.
All sample sketches for the ESP32 dev module give a compilation error: error: unrecognized arguments: /Users/geoff/Library/Arduino15/packages/esp32/hardware/esp32/2.0.5/tools/sdk/esp32/bin/bootloader_qio_80m.elf
There is no folder /Users/Geoff/Library folder on my Mac drive, and I can't find the file bootloader_qio_80m.elf anywhere else on my HDD.
Hi @geoffline. I'm going to ask you to post some additional information that might help us to identify the problem.
NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.
Please do this:
Select File > Preferences from the Arduino IDE menus.
Check the box next to "Show verbose output during: ☐ compilation".
Click the OK button.
Select Sketch > Verify/Compile from the Arduino IDE menus.
Wait for the compilation to fail.
You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the COPY ERROR MESSAGES button on that notification.
Open a forum reply here by clicking the Reply button.
Click the </> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press Ctrl+V.
This will paste the compilation output into the code block.
Move the cursor outside of the code tags before you add any additional text to your reply.
Click the Reply button to post the output.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.
There is a /Users/geoff/Library/ folder, but macOS hides it from you by default. You can make it visible in Finder by pressing the Command+Shift+. keyboard shortcut.
Hi @geoffline. The problem is the ESP32 boards platform developers provided insufficient quoting in the template for the command that errored. This is the part where the command goes wrong:
Note that the ESP32 Blink.ino.bootloader.bin filename has a space in it, but was not quoted. This causes what was intended to be a single path to instead be treated as two arguments to the esptool command:
The reason why the ESP32 developers have gotten away with not quoting this filename, and the reason why the bug has not affected many users is that this filename is based on the sketch name and Arduino sketch names are not allowed to contain spaces. Arduino IDE 1.x enforces that restriction, but the Arduino IDE 2.x developers hadn't gotten around to doing the same by the time of the Arduino IDE 2.0.3 release you are using. So the IDE allows you to create sketches with invalid names.
This means the solution is to simply select File > Save As... from the Arduino IDE menus and save your sketch to a name that does not contain any spaces. After that, it should compile even with the latest version of the ESP32 boards platform. You will find that updating ESP32 platform back to 2.0.6 via the Arduino IDE Boards Manager is fairly fast because Arduino IDE caches the previously downloaded files so you won't need to wait for the downloads this time.
This lack of sketch name validation has since been fixed by the Arduino IDE developers so when the next Arduino IDE release comes out it will nag you about any non-compliant sketch names.