Hi All,
First off, thank you all for the excellent resource this forum provides. I think it speaks volumes that in a decade of playing with Arduino, this is the first problem that I haven't been able to solve with the information in this forum.
I've recently been forced to use a new computer, and this new setup repeatedly fails to upload any sketch that I've tried to the Arduino board. Some background info:
- Windows 10 64bit
- Arduino IDE 2.1.1 installed using the 'Win 10 and newer, 64 bits' install download
- Adafruit METRO 328 board (Arduino UNO R3 compatible)
- loopback test is successful - board is communicating on port COM5
Below is the verbose compiler and upload output, when using the example sketch Blink.ino built into the IDE:
FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\matri\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\matri\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
"C:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035\\sketch\\Blink.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035\\sketch\\Blink.ino.cpp" -o "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035\\sketch\\Blink.ino.cpp" -o "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\matri\AppData\Local\Temp\arduino\cores\arduino_avr_uno_16b3a71eb4c9ead8de197cd666125757\core.a
Linking everything together...
"C:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035/Blink.ino.elf" "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035\\sketch\\Blink.ino.cpp.o" "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035/..\\..\\cores\\arduino_avr_uno_16b3a71eb4c9ead8de197cd666125757\\core.a" "-LC:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035" -lm
"C:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035/Blink.ino.elf" "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035/Blink.ino.eep"
"C:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035/Blink.ino.elf" "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035/Blink.ino.hex"
"C:\\Users\\matri\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\matri\\AppData\\Local\\Temp\\arduino\\sketches\\A920CEAA20100D2C2AD8D68596030035/Blink.ino.elf"
Sketch uses 924 bytes (2%) 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.
"C:\Users\matri\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\matri\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -carduino "-PCOM5" -b115200 -D "-Uflash:w:C:\Users\matri\AppData\Local\Temp\arduino\sketches\A920CEAA20100D2C2AD8D68596030035/Blink.ino.hex:i"
Failed uploading: uploading error: exit status 0xc0000135
One time while experimenting I received 'exit status 0xc000007b' but I have never been able to recreate this error.
Using the guidance from this post: https://forum.arduino.cc/t/failure-with-ide-2-0-and-megacorex/
I was able to identify cfgmgr32.dll as a potential culprit related to avrdude.exe
The problem is this file exists in the correct folder:
Things I have tried:
- Uninstalling Arduino IDE, restarting computer, reinstalling Arduino IDE
- Loosening access permissions to the System32 folder
- Placing cfgmgr32.dll in the Arduino IDE installation root folder
- Replacing cfgmgr32.dll in System32 folder with a newly downloaded version (suspecting it may have been corrupted)
- Grasping at straws, I've tried both 32-bit and 64-bit versions of cfgmgr32.dll in the System32 folder
Are there any other suggestions on what to try? I don't have easy access to another computer, so I'm very hopefully on getting this setup working.
Thanks in advance!