This was successful so I then tried to install it on a Windows XP PC running IDE 1.8.9. It failed with the message: "esptool.exe is not a Win32 application".
I suspect that I need to find a Win32 version of this package but don't know what it is or where I could find it. Can anyone enlighten me?
It is a Python script, but they produce a .exe file for Windows so that there isn't a dependency on having Python installed in order to run it.
So you might try installing Python on your XP machine and modifying the esptool command patterns in the ESP32 boards platform's platform.txt configuration file to run the script with Python. They already do this for Linux because it is pretty standard to have Python installed on a Linux system.
I don't know Python so I doubt I could use this solution. I was really looking for a URL I could just plug into the preferences page and be up and running. Probably a forlorn hope.
I tried them all; 2.0.6 and 2.0.5 resulted in the message: "Not a Win32 application". The others did not have that message but none would compile. The error messages were rather extensive; The shortest was for 2.0.4, (below).
xtensa-esp32-elf-g++: warning: '-x c++' after last input file has no effect
xtensa-esp32-elf-g++: fatal error: no input files
compilation terminated.
exit status 1
Error compiling for board ESP32 Dev Module.
This error is likely completely unrelated to the old Windows version. It usually is caused by insufficient quoting in a compilation command pattern defined by the platform, or else by some very problematic characters in a path used in the command.
I'm going to ask you to provide some additional information that might allow us to determine the cause of 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.
After the compilation fails you'll see a button on the right side of the orange bar in Arduino IDE: Copy error messages. Click that button.
This copies the full output to the clipboard.
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:
Open a forum reply here by clicking the Reply button.
Click the "Upload" icon () on the post composer toolbar:
Select the .txt file you saved.
Click the Open button.
Click the Reply button to publish the post.
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.
Honestly you would be better trashing the OS and running Linux which will install and riun just fine on that old hardware. Or buy a PC I've just replaced, thats been running W10.
The cause of the error is this part at the end of the command: "sketch\\SimpleTime.ino.cpp". This is meant to point to the file under the sketch build folder:
But unfortunately the whole first part went missing somehow. This looks like the problem is inside Arduino IDE itself, rather than the toolchain or platform configuration. So the only thing that might help is to try older versions of Arduino IDE. They are available for download here:
There was a big change at Arduino IDE 1.6.6 and that release and some of those following closely after it had problems. 1.6.5 was very stable and definitely from the era where XP usage was still a thing. I would 1.6.6-1.6.8. I believe things were pretty stable again at 1.6.9.
You might run into problems using old versions of Arduino IDE with newer versions of the ESP32 platform. Their installation instructions mention "Arduino IDE at the 1.8 level or later" but I don't know whether there is a specific reason for that specification, or whether they just don't want to support older IDE versions.
johnerrington's suggestion of trying Linux on your machine is definitely worth considering. I have been amazed at how installing Linux on old PCs can bring them back to a quite usable state compared to the painfully slow experience when using Windows on them. I had a very old laptop kicking around that had become almost unusable even with Windows XP, apparently due to that OS becoming more resource hungry over the years through updates. I put a Linux distro on it that is specifically targeted to low spec machines and it is quite usable now:
I haven't tried using Arduino IDE on that machine, and of course your machine is sure to be different hardware anyway, so I can't promise any specific outcomes from such an endeavor, but perhaps worth a try.
I appreciate your help and suggestions; I installed this version of the EXP32 1.06. I also used a simpler sketch, Blink.ino. The output file is attached.
The error message was this:
c:\documents and settings\administrator\local settings\application data\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\utility:68:28: fatal error: bits/c++config.h: No such file or directory
I searched for this file and found it here:
c:\documents and settings\administrator\local settings\application data\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\extensa-esp32-elf
esp32-psram\bits
I don't understand why it says there is no such file. ????
It looks like ESP32 on Windows XP is not doable so I decided to try LXLE Linux. Installation was not easy but eventually was successful. I then installed Arduino IDE 1.8.18. and ESP32 2.06. At this point I had to shutdown for the day. When I resumed next day I could not find the ESP32 on the board list. No clue as to what happened. I repeated the ESP32 installation process but it wouldn't install. I received the following message in the Arduino output window:
Skipping contributed index file /home/tad/.arduino15/package_esp32_index.json, parsing error occured:
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: (FileInputStream); line: 1, column: 2]
Can anyone explain what this means and why the ESP32 disappeared from the board list?
This error occurs when the URL set in the Arduino "Additional Boards Manager URLs" preferences field can't be accessed and some HTML is received (the < mentioned in the error message is the start of an HTML tag) instead of the expected JSON file.
So open File > Preferences and then double check the URL in the "Additional Boards Manager URLs" field. It should match the one provided in Espressif's installation instructions you will see if you open this link:
Are you using Arduino IDE 1.8.18? If so, the reason might be that Arduino IDE 1.x has a quirk where if you open Boards Manager and the download of the package index file from the "Additional Boards Manager URL" fails, the IDE no longer recognizes the installed boards platforms associated with that package index. Arduino IDE 2.x is more resilient in that it still recognizes the installed platforms even if their package index files are missing.
I finally got ESP32 2.06 installed. Apparently, the install took longer than I thought. (After the OK was pressed the window closes and there is no indication of what is happening). Anyway, it appeared in board manager and now it can be selected. I tried to compile the Blink sketch but it failed, (no surprise). The error message was:
Traceback (most recent call last):
File "/home/tad/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool.py", line 31, in
import esptool
File "/home/tad/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool/init.py", line 42, in
from esptool.cmds import (
File "/home/tad/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool/cmds.py", line 14, in
from .bin_image import ELFFile, ImageSegment, LoadFirmwareImage
File "/home/tad/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool/bin_image.py", line 14, in
from .loader import ESPLoader
File "/home/tad/.arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool/loader.py", line 21, in
import serial
ModuleNotFoundError: No module named 'serial'
exit status 1
Error compiling for board ESP32 Dev Module.
This is similar to what I saw when I tried to compile with Windows XP, (Post 10). I don't understand this either. (I'm struggling with Linux; it doesn't look or work like any OS I'm used to).
A related question: The port selections are /dev/TTYS0 and /dev/TTYUSB0. I assume that /dev/TTYUSB0 is the right choice but the terminology is confusing. Which one?
A unique thing about the Linux version of the ESP32 boards platform is that it uses a Python script named esptool (the tool is a standalone executable in the Windows and macOS versions of the ESP32 platform). That esptool script has a dependency on the pyserial Python package. The error occurs because that package dependency is not installed on your computer.
We are accustomed to all the dependencies of Arduino boards platforms being automatically installed along with the platform via Boards Manage, but the ESP32 platform developers didn't make their project that way. You are expected to manually install this pyserial Python package if you don't have it installed already. So the solution to the error is to use pip to install the pyserial package.
If we are lucky, terminal output will now show the pyserial package being installed successfully.
If that python3 command is successful, try compiling the Blink sketch again. The "No module named 'serial'" error should no longer occur.
If that python3 command is not successful, please post the error message shown in the terminal:
Use the mouse to select all the text in the terminal window. Make sure to scroll all the way up to the top.
Press Ctrl+Shift+C.
This will copy the selected text to the clipboard.
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 output into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
Click the Reply button to post the output.
Please let me know if you have any questions or problems while following those instructions.
I installed the pyserial package, (after first installing the PIP app). The Blink sketch then compiled. The only other thing necessary was to set serial port permission and the sketch was uploaded to the ESP32. I also was able to upload the SimpleTime sketch to test WiFi connectivity.