Hello all,
I've seen a number of posts related to the ESP32, but none seem to address all the different issues I'm having. If otherwise, please point me in the right direction.
I'm trying to get an ESP32-Cam module working. I purchased it on Amazon recently along with the ESP32-Cam-MB module which is the serial-to-usb adapter. I've looked far and wide at YouTube videos, blogs and tutorials without success.
The primary issue is that when using the IDE on my Mac (version 2.3.2, MacOS 14.5 Sonoma), I get an error asking me to install XCode. Here's a simple example:
I open the IDE and select the board (DOIT ESP32 Dev Kit V1, since I saw that in one of the tutorials.) I also select the USB port.
I have the empty default sketch with only the "setup" and "loop" coding in it.
I hit the "verify" checkmark.
The following error appears after it compiles the sketch:
"xcode-select: note: No developer tools were found, requesting install.
If developer tools are located at a non-default location on disk, use
sudo xcode-select --switch path/to/Xcode.app
to specify the Xcode that you wish to use for command line developer tools, and cancel the installation dialog.
See
man xcode-select
for more details.
exit status 1
Compilation error: exit status 1"
It also triggers the Install Command Line Developer Tools app and tells me that "The 'xcrun' command requires the command line developer tools. Would you like to install the tools now?" Sometimes it's "xcrun" that it's looking for, sometimes "Python3".
Some posts have suggested ignoring the error. I can ignore it trying to load the tools, but not the error in the Arduino IDE. If the error is there, the code doesn't upload to the module.
I've just about had it. Everyone says ESP32 modules are interesting, including the camera module I'm trying to make work. But I'm close to going for my hammer and starting this project over. What am I doing wrong?
Thanks,
Markus
Here's what happened when I selected AI Thinker - the same error appears at the bottom. (I'm not trying to upload - this is what happens when I attempt to verify, with the ESP32-Cam plugged in...)
If it's doing this to an empty sketch, then it's not the sketch that's causing the issue. It's not calling for anything like Python3 or other stuff because there's nothing there. So if it gives the error with an empty sketch, then there are bigger fish to fry. Installing xcode, if there's nothing in the sketch that calls for xcode, is just wasting space and resources. I would feel differently if we could identify something in the code that required xcode, but there isn't. So there's got to be a way to make this behave. If there isn't, the best solution is to take a hammer to the ESP32 module and approach this a different way.
I just selected the AI Thinker esp31-cam board, then loaded the standard camera web server sketch. It compiled clean after I commented out the esp eye camera and uncommented the AI THINKER.
THEN when scrolling across my logical screens I noticed something. It took me a few seconds to close out all my windows that kept covering it, but here is what I saw
Remember, I renamed XCODE.app to XXCODE.app AND I had a clean compile. Your board is ok, your software needs some attention. I think the error log has the clues, try the man xcode-select before doing the sudo scode-select (NOT SURE IF THERE IS MORE THERE I CAN"T SEE)
I get this as well - either "xcrun" or "Python3". I feel like I can ignore this as long as I don't get the xCode error. The issue I have with Xcode is that it's heavy and keeps getting heavier. (Like lots of teachers, I have a Macbook Air that only has about 10 gig free, since it has a small drive to begin with.) The error in the original screenshot (red text) is the whole and complete error message. Man pages are a great idea - I'll have a look. Just not sure why something that should be pretty straight forward should be so difficult!
surrydesignlab:
Could it be pushing xcode-select and xcrun because it feels that xcode is needed
You can find the explanation for why xcode is required here:
https://github.com/arduino/arduino-ide/issues/1822#issuecomment-1750613104
sonofcy:
Try to create (touch) a dumy xcode.app file in the application dir and see what happens.
This is definitely a possible workaround. The executable that is being invoked is
xcrun
. It is not actually needed, so if you could create a dummy executable that just returns a 0 exit status then this would avoid the need to install the gigabytes of bloated xcode. I'm sure some people find xcode useful, but I personally don't and so I resent having to install this massive thing on my macOS machine, and keep it updated.
But in the end if you just want to get back to progressing with your Arduino project, the path of least resistance is going to be to just give in and install xcode.
I like your dummy executable idea. That makes a lot of sense - I just have to figure out how to do it.
The alternative is to depart from the Arduino IDE (not my first choice...) and do something like PlatformIO (
https://platformio.org/
).
NO, not likely. An IDE is just a shell over the real compiler.
To create the fake app there is a bunch of ways. Here is one. Create an empty text file with any text editor. Make sure it's empty. After you save it, rename it to xcode.app. Now move that file to the main Applications folder the one that looks like below.