AVR ISP SHELD will Burn Sketch cannot load through USB

Sketch will load and work when using a AVR ISP SHELD to Burn Sketch to a chip "Programmer Arduino as ISP". But when I try to Load by USB Gets Stuck on "Upload" then throws error Do I have to Change programmer?
Error

Sketch uses 860 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 15 bytes (0%) of dynamic memory, leaving 2033 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xfb
Failed uploading: uploading error: exit status 1

writing sketch with ISP deletes the bootloader.

1 Like

FIXED Brilliant Why is there not a warning re that.
They call it a programmer.
Do I have to work out how to use a FTDI to load to a Chip and retain the Bootloader on the AVR ISP SHIELD ?

the bootloader is in the arduino. ISP programming erases the flash memory of the Arduino including the bootloader.

1 Like

The IDE generates two files for upload, yourSketch.ino.hex and yourSketch.ino.with_bootloader.hex.

The IDE uses the former when uploading. You can write a batch file or shell script to issue the correct command.

If you enable verbose output during upload, you can find the standard command. It will look something like below (note that this is for an Arduino Mega)

"C:\Users\yourUsername\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\yourUsername\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v  -patmega2560 -cwiring "-PCOM3" -b115200 -D "-Uflash:w:C:\Users\yourUsername\AppData\Local\Temp\arduino-sketch-8C49DAF07C9DAA85038EBCA27A0EB646/yourSketch.ino.hex:i"

Copy the line that you find to a command prompt and replace yourSketch.ino.hex by yourSketch.ino.with_bootloader.hex and you can upload the sketch plus bootloader.

Be aware that this is in a temporary directory and that the directory can change. If you use sketch -> Export compiled binary in the IDE menu, it will generate the hex files in a directory called *Build" in your sketch directory.

You can modify the earlier command to reflect this change

"C:\Users\yourUsername\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\yourUsername\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v  -patmega2560 -cwiring "-PCOM3" -b115200 -D "-Uflash:w:C:\Users\yourUsername\Documents\Arduino\yourSketch\Build/yourSketch.ino.with_bootloader.hex:i"

If you create a batch file or shell script, you can paste the command in there and run the batch file / shell script.

Note:
Description for IDE 2.0 (older IDEs have the same option somewhere) on Windows, not tested.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.