New error- just started happening

Everything was working , I took a break for dinner, and upon return... nothing compiles.

I get this strange error, even on sketches that previously compiled without any problem. Even on the example sketch "Blink".

Any ideas?

The error:

Traceback (most recent call last):

  File "C:\Users\steve\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/elf2bin.py", line 211, in <module>

    sys.exit(main())

  File "C:\Users\steve\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/elf2bin.py", line 192, in main

    to_addr=4096

  File "C:\Users\steve\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/elf2bin.py", line 187, in wrapper

    write_bin(out=out, args=args, **kwargs)

  File "C:\Users\steve\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/elf2bin.py", line 75, in write_bin

    [size, addr] = get_segment_size_addr(elf, segment, args.path)

  File "C:\Users\steve\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/elf2bin.py", line 47, in get_segment_size_addr

    p = subprocess.Popen([path + '/xtensa-lx106-elf-objdump', '-h', '-j', segment,  elf], stdout=subprocess.PIPE, universal_newlines=True )

  File "D:\obj\Windows-Release\37win32_Release\msi_python\zip_win32\subprocess.py", line 775, in __init__

  File "D:\obj\Windows-Release\37win32_Release\msi_python\zip_win32\subprocess.py", line 1178, in _execute_child

FileNotFoundError: [WinError 2] The system cannot find the file specified

exit status 1

Error compiling for board LOLIN(WEMOS) D1 R2 & mini.

Does the problem go away after you close all Arduino IDE windows and then start it again? It might have been caused by Windows doing a tidy up of the temporary folders while you were away.

Hi,
What version IDE.
What OS?

Have you got an earlier version of your software to try, you are updating and saving older code as you develop you project?

Have you tried compiling another code you know works?

Thanks Tom... :grinning: :+1: :coffee: :australia:

No. I even rebooted the PC.

Version 1.8.15 on Windows 10.

Even the example sketches, like "blink" make the same error.

I have a second PC with the same version IDE and OS and it compiles my project files with no problems.

The error says "FileNotFoundError: [WinError 2] The system cannot find the file specified", but I don't know which file it can't find.

The only thing I could find in a Google search was to reinstall the IDE. But doesn't that wipe out all of the libraries that I've added?

Any advise at this point would be appreciated.

Hi,
Reload the IDE?
No, your libraries are in a separate folder to the IDE.
(OR they should be.)

Tom... :grinning: :+1: :coffee::australia:

I am finding two library folders. One in the sketchbook path (C:\Users\steve\Documents\Arduino), and the other in the folder 'arduino-1.8.15'.

I am not sure which library is the correct one because I have libraries from both that get used.

Are you suggesting that if I reinstall the IDE, the libraries and sketchbook will not be affected? Is there anything that I need to back up?

Hi,
Where is your sketch book folder.
I have in the IDE preferences C:\Arduino Projects as the sketch book folder.
The Library folder is in that folder and that is where I put all my libraries, they don't get moved or deleted when you do an IDE upgrade.

Check your sketchbook folder.

Tom... :grinning: :+1: :coffee: :australia:

Try temporarily disabling your antivirus, or check to see if the antivirus has recently deleted any files. It could have received an update and suddenly decided one of your files looks suspicious.

Also try reloading the boards package for the ESP8266, or go back to a previous version.

That's where most of my libraries are located. But there are libraries only in arduino-1.8.15'\libraries that the compiler finds. That is why I am confused because I don't know why the compiler knows to look there.

At any rate, I am going to reinstall the IDE now.

The libraries under the arduino-1.8.15 folder are part of the installation files, they wil be reinstalled along with the IDE.

I think you are on to something because reinstalling (and upgrading) the IDE to Version 1.8.16 changed nothing. I still get the linking error. Even the basic blink.ino in the example sketches.

But- when I select the Uno in tools, no problem. Switch back to the Wemos D1 Mini and the problem reappears.

I went to the boards manager and reinstalled a prior version (3.0.2 to 3.0.1), and the problem went away.

And, it came back.

I went to the boards manager and reinstalled ESP boards Version 3.0.2 (the most recent) and the problem went away. For about an hour. I installed Version 3.0.0 and the problem went away for a few compiles. And it's back. I reinstalled V3.0.2 and again, my project compiles fine.

I can't just keep reinstalling the ESP boards. What could possibly be happening?

What folder are the boards files installed in? When I reinstall the IDE, is there something else that I should have deleted first?

Do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Check the box next to "Show verbose output during: compilation.
  3. Click the OK button.
  4. Select the board you are interested in from the Arduino IDE's Tools > Board menu.
  5. Compile any sketch.
  6. Wait for the compilation to finish.
    (it should be OK even if it fails)
  7. Scroll up the black console pane at the bottom of the Arduino IDE window all the way to the top.

You should see a line that looks something like this in the output:

Using board 'generic' from platform in folder: C:\Users\<user name>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2

That is the location.

Curiouser and curiouser.

Or should I say Weirder and weirder?

The reason I wanted to know where the packages are stored is because, the problem came back and I wanted to see what changed in the packages folder.

In folder:
E:\Arduino\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\bin

The file: xtensa-lx106-elf-objdump.exe is missing???

I copied that file from a backup copy of Arduino15, and the compile/link of my sketch works again.

WHAT could be making that file disappear?

It does sound like a computer security program is deleting the file.
No idea what you have in that regards but most also have an EXCLUSIONS or WHITELIST where you can add a path or filename.

That would be my starting point.

Also be very wary if you are using CLOUD based storage such as ONEDRIVE etc. as they can cause thier own issues with the IDE.

Very interesting. This just started happening when I upgraded CCCleaner a few days ago.

I just whitelisted the Arduin015 folder in CCCleaner and the Windows Security virus scanner, so we will see if it presents again tomorrow.

What's curious is that there must be thousands of Arduino users who also have CCCleaner and no reports of similar problems.

I have CCleaner here and no issues.
Doubt it is that or windows security.

Which Version? I just started seeing this shortly after upgrading CCCleaner to Version 5.86.9258

Oh fluff I am on an older version 5.84... :face_with_hand_over_mouth: