Go Down

Topic: Can't upload sketches to Arduino Mini (Read 151 times) previous topic - next topic

iCach0

Hi, I'm having problems programming a genuine Arduino Mini rev. 05 with a genuine Arduino USB2Serial (USB mini revision). Any help would be deeply appreciated.

The sketch I'm using is the included Blink example with no modifications.

The light on the Arduino mini is solid ON.

In the IDE I have the following settings:

Board: Arduino Mini
Processor: ATmega328P
Port: COM 3

In the Windows Device Manager it's listed as Arduino USB Serial Light Adapter (COM3)

Using latest version 1.8.9 of the IDE and a fully updated Windows 10. Pasting error log in next reply.

iCach0

Error log part 1

Arduino: 1.8.9 (Windows 10), Board: "Arduino Mini, ATmega328P"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dario\Documents\Arduino\libraries -fqbn=arduino:avr:mini:cpu=atmega328 -vid-pid=2341_003B -ide-version=10809 -build-path C:\Users\Dario\AppData\Local\Temp\arduino_build_308612 -warnings=none -build-cache C:\Users\Dario\AppData\Local\Temp\arduino_cache_415472 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dario\Documents\Arduino\libraries -fqbn=arduino:avr:mini:cpu=atmega328 -vid-pid=2341_003B -ide-version=10809 -build-path C:\Users\Dario\AppData\Local\Temp\arduino_build_308612 -warnings=none -build-cache C:\Users\Dario\AppData\Local\Temp\arduino_cache_415472 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
Using board 'mini' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/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=10809 -DARDUINO_AVR_MINI -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612\\sketch\\Blink.ino.cpp" -o nul
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/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=10809 -DARDUINO_AVR_MINI -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/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=10809 -DARDUINO_AVR_MINI -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612\\sketch\\Blink.ino.cpp.o"

iCach0

Error log part 2

Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Dario\AppData\Local\Temp\arduino_cache_415472\core\core_arduino_avr_mini_cpu_atmega328_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612/Blink.ino.elf" "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612\\sketch\\Blink.ino.cpp.o" "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612/..\\arduino_cache_415472\\core\\core_arduino_avr_mini_cpu_atmega328_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612" -lm
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612/Blink.ino.elf" "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612/Blink.ino.eep"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612/Blink.ino.elf" "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612/Blink.ino.hex"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Dario\\AppData\\Local\\Temp\\arduino_build_308612/Blink.ino.elf"
Sketch uses 930 bytes (3%) of program storage space. Maximum is 28672 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\Dario\AppData\Local\Temp\arduino_build_308612/Blink.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 "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

      Using Port                    : COM3
      Using Programmer              : arduino
      Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x5c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x5c

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

pert

Please do this:
  • Disconnect the wire from the "EXT RESET" pin on the USB2Serial.
  • Sketch > Upload
  • Watch the black console window at the bottom of the Arduino IDE window. When you see "avrdude: Version 6.3-20171130", quickly press and release the reset button on your Mini.


The reset is necessary just as the upload starts (after the compilation finishes) to activate the bootloader on your Mini, which handles the upload. It is possible to make an auto-reset circuit that will automatically reset the Mini at just the right time. To do this, you need to connect the "EXT RESET" pin of the USB2Serial to an R pin on your Pro Mini via a 0.1 uF capacitor. You can see how to do this here:
https://www.arduino.cc/en/Guide/ArduinoMini#toc11

iCach0

Solved, thanks a lot pert!

I had tried pushing the reset button but I wasn't sure about the timing. Now it works like a charm. Thanks again!

pert

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

Go Up