Problems Uploading, java.io.IOException

Adafruit Metro M0 Express

I have been messing with a Metro M0 Express for a couple weeks now and have been able to upload code while doing the basic circuits in the online guides. However I have been unable to upload code for a few weeks now and haven’t had any success with the solutions that worked for others with the same error code below:

Arduino: 1.8.7 (Windows 10), Board: "Adafruit Metro M0 Express"

Sketch uses 10432 bytes (3%) of program storage space. Maximum is 262144 bytes.
Forcing reset using 1200bps open/close on port COM3
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
Uploading using selected port: COM3
{runtime.tools.bossac-1.7.0.path}/bossac -i -d --port=COM3 -U true -i -e -w -v C:\Users\Derek\AppData\Local\Temp\arduino_build_742298/sketch_oct19a.ino.bin -R 
java.io.IOException: Cannot run program "{runtime.tools.bossac-1.7.0.path}/bossac": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:207)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:82)
at processing.app.SketchController.upload(SketchController.java:736)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2028)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 8 more
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This seems to have started happening after I downloaded Eclipse and the newest version of JDK for a separate project, which could be coincidence but I wouldn’t rule it out. I had to go into my computers environment variables and input the bin path for the JDK but when I revert the changes it doesn’t fix my issue so I believe that portion at the least is unrelated.

So far I have tried reinstalling my IDE, including different versions, reinstalling different java versions both JDK and JRE, deleting the AppData Arduino15 folder and the folder in Temp, checked my COM port in task manager and made sure I had selected the correct one and that Windows was reading it, disabling my antivirus temporarily, and restarting my computer. I have the correct board selected after downloading it in the board manager.

When I use the reset button during upload it has no effect, and it seems to have no effect when watching it in the device manager either. The only LED that lights up on the board is the one marked ON, and I seem to remember one of the others blinking when I hit reset or plugged it in before this issue started so it’s possible it just quit out on me and it requires solutions that are beyond my scope, I just figured I’d ask before giving up.

My loopback test was successful.

It seems like it's failing to resolve {runtime.tools.bossac-1.7.0.path}/bossac

That should be getting replaced with the path to bossac - but clearly it's not.

Not sure why that happens to be the case though....

Update in case anyone else comes looking. Upload was successful on my Metro 328 when I set the Arduino IDE board settings to "Arduino/Genuino Uno". Tried the Metro M0 Express with it and received a new error code at the bottom of this post. In summary it is a board based issue and because I do not have another M0 Express or a programmer in order to flash the bootloader and attempt to reset my board entirely to find out if it is a programming error or a physical failure I will have to set it aside until I have a reason to obtain another one.

The new error for my M0 Express:

Arduino: 1.8.7 (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
B:\Installs\Arduino\hardware\tools\avr/bin/avrdude -CB:\Installs\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\Derek\AppData\Local\Temp\arduino_build_794371/sketch_oct22a.ino.hex:i 

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "B:\Installs\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
An error occurred while uploading the sketch
avrdude: ser_open(): can't open device "\\.\COM4": The system cannot find the file specified.



avrdude done.  Thank you.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.