Hello Supporters,
I have a customized Arduino Uno and it is used for multiplexing application. And I plan to use Python with pyfirmata for scripting. I knew this is not a new topic and so far, I could not find any solutions that is applicable to my case. My system is Arduino IDE version 2.3.2 and windows 10.
I can use Flip to program Atmega16U2 ok. Device manager recognized COM port.
I am able to do bootloader ok using programmer as Arduino as ISP.
Loopback test also ok.
However, when I tried upload "Blink test" in the examples and it failed with error message "Failed uploading: uploading error: exit status 1"
I checked all setup carefully, i.e. COM port, Device Manager recognized COM port correctly, It was Aduino UNO, Changed USB cable, and it did it many countless times. But it still failed upload process.
Upload is using normal way (i.e. not using programmer as arduino as ISP)
I run simple python script to test hardware same as Blink test and it did not work at all. (i.e. LED pin 13 not blinking)
The customized arduino uno board is using Atmega16u2 and Atmega328P and Atmega328P was not in the socket (i.e. cannot remove it out of board)
I really do not understand if bootloader was ok, loopback was ok, device manager detected COM port ok, Com port selected correctly, then what could possible the causes for upload failed? Can you please help and provide instructions (hardware and/or software) to debug this issue? Thanks in advance.
I'm going to ask you to provide the full verbose output from an upload attempt.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to Show verbose output during: ☑ compile in the "Preferences" dialog.
Check the box next to Show verbose output during: ☐ upload.
Click the "OK" button.
The "Preferences" dialog will close.
Attempt an upload, as you did before.
Wait for the upload to fail.
You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
Open a forum reply here by clicking the "Reply" button.
Click the <CODE/> 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 the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the error output from the upload into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
Thanks for your reply. Here is the observations after press reset button.
I forget to mention one thing, for our customized board, I just uploaded standardfirmata through option 'programmer arduino as ISP' and it went through without error.
After press Reset button, I can see 3 flashing light on L led and it stayed ORANGE all times (no more activities) after that.
For good Arduino UNO (no customized), after press Reset button, I can see also 3 flashing light and might be 6 or 7 more flashing light and Tx light one time. This is a piece of information different from our customized arduino uno board.
I still cannot upload file using a normal way (not going through programmer Arduino as ISP.
From my opinion, I suspected Atmega16U2 not communicate with Atmega328P, but I still cannot narrow down the issue.
Please help.
Please use the standard term "upload using programmer" when referring to this type of operation in communications. The "through option 'programmer arduino as ISP'" description you used here is very ambiguous. This sort of ambiguity can lead to a lot of confusion and wasted time in technical discussions.
When you perform an "Upload Using Programmer" operation, it erases the bootloader. When the bootloader is missing attempting to perform a normal "Upload" operation will result in a failure with the "avrdude: stk500_recv(): programmer is not responding" errors you encountered.
For this reason, if you have performed an "Upload Using Programmer" operation and later want to go back to uploading via the normal "Upload" operation, it is necessary to first perform a "Burn Bootloader" operation in order to restore the bootloader on the target board.
I redo burn bootloader via "Upload using Programmer" and it was no error.
Disconnected USP and restarted the customized Arduino Uno
Device Manager recognized the COM port correctly (COM13)
Used file "Blink" in examples and uploaded it through normal "UPLOAD" operation.
It was a failed. Attached here is the error message.
I then disconnected the USB, connected USB again and press "RESET" button. Here is the observations:
a. L led flashing multiple times (maybe 3 or 4 times)
b. And it stayed ON always
5/30/2024
Blink Uploaded Failed Post Uploaded BootLoader Successfully
FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
C:\Users\Ngu57001\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\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\Ngu57001\AppData\Local\Temp\arduino\sketches\8AC448DB847450ACF775A67F6E64CF34\sketch\Blink.ino.cpp -o nul
Generating function prototypes...
C:\Users\Ngu57001\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\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\Ngu57001\AppData\Local\Temp\arduino\sketches\8AC448DB847450ACF775A67F6E64CF34\sketch\Blink.ino.cpp -o C:\Users\Ngu57001\AppData\Local\Temp\3951122152\sketch_merged.cpp
C:\Users\Ngu57001\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\Ngu57001\AppData\Local\Temp\3951122152\sketch_merged.cpp
Compiling sketch...
C:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -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\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Ngu57001\AppData\Local\Temp\arduino\cores\arduino_avr_uno_7b4a79f087bf217a99959a21a4a374ea\core.a
Linking everything together...
C:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34/Blink.ino.elf" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34\\sketch\\Blink.ino.cpp.o" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34/..\\..\\cores\\arduino_avr_uno_7b4a79f087bf217a99959a21a4a374ea\\core.a" "-LC:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34" -lm
C:\\Users\\Ngu57001\\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\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34/Blink.ino.elf" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34/Blink.ino.eep"
C:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34/Blink.ino.elf" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34/Blink.ino.hex"
C:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size -A "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\8AC448DB847450ACF775A67F6E64CF34/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\Ngu57001\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude "-CC:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -carduino "-PCOM13" -b115200 -D "-Uflash:w:C:\Users\Ngu57001\AppData\Local\Temp\arduino\sketches\8AC448DB847450ACF775A67F6E64CF34/Blink.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM13
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=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1f
avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
So, what is error message "avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1f" meant ? Can you please elaborate it? Thanks. Please Help.
No, it still did not work. Same as before. I carefully follow your steps instructions and attached here is the error message. I have no clue how to tackle this issue!!!
FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
C:\Users\Ngu57001\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\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\Ngu57001\AppData\Local\Temp\arduino\sketches\22A10B6579BE7B74897D861E663CE91C\sketch\Blink.ino.cpp -o nul
Generating function prototypes...
C:\Users\Ngu57001\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\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\Ngu57001\AppData\Local\Temp\arduino\sketches\22A10B6579BE7B74897D861E663CE91C\sketch\Blink.ino.cpp -o C:\Users\Ngu57001\AppData\Local\Temp\1028826278\sketch_merged.cpp
C:\Users\Ngu57001\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\Ngu57001\AppData\Local\Temp\1028826278\sketch_merged.cpp
Compiling sketch...
C:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -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\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Ngu57001\AppData\Local\Temp\arduino\cores\arduino_avr_uno_7b4a79f087bf217a99959a21a4a374ea\core.a
Linking everything together...
C:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C/Blink.ino.elf" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C\\sketch\\Blink.ino.cpp.o" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C/..\\..\\cores\\arduino_avr_uno_7b4a79f087bf217a99959a21a4a374ea\\core.a" "-LC:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C" -lm
C:\\Users\\Ngu57001\\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\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C/Blink.ino.elf" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C/Blink.ino.eep"
C:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C/Blink.ino.elf" "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C/Blink.ino.hex"
C:\\Users\\Ngu57001\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size -A "C:\\Users\\Ngu57001\\AppData\\Local\\Temp\\arduino\\sketches\\22A10B6579BE7B74897D861E663CE91C/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\Ngu57001\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude "-CC:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -carduino "-PCOM13" -b115200 -D "-Uflash:w:C:\Users\Ngu57001\AppData\Local\Temp\arduino\sketches\22A10B6579BE7B74897D861E663CE91C/Blink.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Ngu57001\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM13
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=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1c
avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
What other approach or avenue I need to explore to tackle this issue. Please help. Thank you for your patience and supports.
Is this using a PCB you created yourself? If so, please provide the schematic of the board.
Or is it a standard Arduino Uno board to which you have made electrical modifications? If so, please provide a detailed description of the modifications you made.
Yes, it is a customized Arduino Uno and was designed by hardware depart. I just want to bring-it-up and test it. Attached here is partial of the schematic, excluded the multiplexers. Thanks.
I have a question:
Is it possible to use 1 good working arduino uno (and removed atmega328p from socket) to upload a sketch to my customized arduino (using Tx, Rx, reset, gnd and 5V from the good working Arduino uno)? what I mean to do is using the atmega16u2 from an existing good working Uno board to drive the Tx/Rx and RESET of my customized board (kind of bypass atmega16u2). Also, on good working arduino uno, whatelse do i need? and on my customized arduino as well? besides those 5 signals I mentioned above.