How to skip VERIFY process?

avrdude: AVR device initialized and ready to accept instructions



Reading | ################################################## | 100% 0.01s



avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: reading input file "C:x\xx\xxxxx"

avrdude: writing flash (14058 bytes):



Writing | ################################################## | 100% 5.25s



avrdude: 14058 bytes of flash written

avrdude: verifying flash memory against C:x\xx\xxxxx:

avrdude: load data flash data from input file C:x\xx\xxxxx:

avrdude: input file avrdude: reading input file C:x\xx\xxxxx;
 contains 14058 bytes

avrdude: reading on-chip flash data:



Reading | avrdude: stk500_loadaddr(): (a) protocol error, expect=0x14, resp=0x73



avrdude: stk500_paged_load(): (a) protocol error, expect=0x14, resp=0x74

avrdude: stk500_cmd(): programmer is out of sync

avr_read(): error reading address 0x0000

    read operation not supported for memory "flash"

avrdude: failed to read all of flash memory, rc=-2

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x72



avrdude done.  Thank you.

Hi guys, there are two questions I can’t figure out in this upload error message.

  1. The READING process happened twice. How to delete the second Reading Process?
  2. Is there any way to fix it??

BTW, I am not using arduino IDE to do this so the uncheck VERIFY BOX will not work for me. I’d like to find how to delete the second Reading Process from files like avrdude.config or others I don’t know.

This is what my platform.txt looks like. I know there maybe a way to delete -v in some place. But How…?

preproc.macros.flags=-w -x c++ -E -CC
recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{preprocessed_file_path}"

# AVR Uploader/Programmers tools
# ------------------------------

tools.avrdude.path={runtime.tools.avrdude.path}
tools.avrdude.cmd.path={path}/bin/avrdude
tools.avrdude.config.path={path}/etc/avrdude.conf

tools.avrdude.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA

tools.avrdude.upload.params.verbose=-v
tools.avrdude.upload.params.quiet=-q -q
# tools.avrdude.upload.verify is needed for backwards compatibility with IDE 1.6.8 or older, IDE 1.6.9 or newer overrides this value
tools.avrdude.upload.verify=
tools.avrdude.upload.params.noverify=-V
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} {upload.verify} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"

tools.avrdude.program.params.verbose=-v
tools.avrdude.program.params.quiet=-q -q
# tools.avrdude.program.verify is needed for backwards compatibility with IDE 1.6.8 or older, IDE 1.6.9 or newer overrides this value
tools.avrdude.program.verify=
tools.avrdude.program.params.noverify=-V
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} {program.verify} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"

tools.avrdude.erase.params.verbose=-v
tools.avrdude.erase.params.quiet=-q -q
tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m

tools.avrdude.bootloader.params.verbose=-v
tools.avrdude.bootloader.params.quiet=-q -q
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m

tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}

tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port {upload.network.port} -sketch "{build.path}/{build.project_name}.hex" -upload {upload.network.endpoint_upload} -sync {upload.network.endpoint_sync} -reset {upload.network.endpoint_reset} -sync_exp {upload.network.sync_return}

# USB Default Flags
# Default blank usb manufacturer will be filled in at compile time
# - from numeric vendor ID, set to Unknown otherwise
build.usb_manufacturer="Unknown"
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'

Thanks! :slight_smile:

Shouldn't your investigation be focused on why the read operation fails?

Thanks for the reply !

I think the answers to that might be a more complicated one. So I decided to skip the VERIFY part directly. On one hand, I want to avoid this problem. On the other hand, skipping the VERIFY part will increase the upload speed.

Since IDE ver 1.6.9, there is a box in the Preference menu to Uncheck Verify code after upload. I don't know what parameter has changed with this process.

In addition, the platform.txt has changed a lot since 1.6.9 version. I couldn't find what has been described

To disable verification, go to:
ArduinoSoftwareFolder/hardware/arduino/sam/plataform.txt

Then, open it and go to the last line (It's what "calls" bossac to upload the sketch). Find the following section:
"-e -w -v -b"
and alter it to:
"-e -w -b" (just remove the "-v", witch means: VERIFY code after upload).

in this thread INSTRUCTIONS to skip verification - Arduino Due - Arduino Forum.

Please don't let this topic down. I am really troubled right now.

Post the rest of the upload log?

That snippet of instructions you posted was for the SAM boards (due, zero) which use bossac to upload, but your upload log shows avrdude output, indicating that you're uploading to an avr. Those instructions are not relevant to your board.

On avrdude, -v is for verbose output, and -V disables automatic verify.

However, right now when you are getting the verify failure, is the sketch actually uploaded? It should be. If not, then turning off verification will just remove the error message, it wont make the upload work (it's like seeing the check engine light come on in your car, and removing the light bulb instead of fixing whatever the problem is)

DrAzzy:
That snippet of instructions you posted was for the SAM boards (due, zero) which use bossac to upload, but your upload log shows avrdude output, indicating that you're uploading to an avr. Those instructions are not relevant to your board.

On avrdude, -v is for verbose output, and -V disables automatic verify.

However, right now when you are getting the verify failure, is the sketch actually uploaded? It should be. If not, then turning off verification will just remove the error message, it wont make the upload work (it's like seeing the check engine light come on in your car, and removing the light bulb instead of fixing whatever the problem is)

Thanks for the reply! You have saved me. Thank you to let me know the meaning of -v and -V. I will try to modify it soon.

And yes, the code has been written on the flash of the chip and it works fine. I just want to get rid of those error messages and to boost up the uploading speed.

# tools.avrdude.upload.verify is needed for backwards compatibility with IDE 1.6.8 or older, IDE 1.6.9 or newer overrides this value
tools.avrdude.upload.verify=-V
tools.avrdude.upload.params.noverify=-V
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} {upload.verify} -p{build.mcu} -c{upload.protocol} "-P{serial.port}" -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"

tools.avrdude.program.params.verbose=-v
tools.avrdude.program.params.quiet=-q -q
# tools.avrdude.program.verify is needed for backwards compatibility with IDE 1.6.8 or older, IDE 1.6.9 or newer overrides this value
tools.avrdude.program.verify=-V
tools.avrdude.program.params.noverify=-V
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} {program.verify} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"

I have changed this part : tools.avrdude.program.verify= to -V. But it still trying to verify the code... Did I put it wrong?

westfw:
Post the rest of the upload log?

The upload log shows like this and nothing more..

vrdude: AVR device initialized and ready to accept instructions



Reading | ################################################## | 100% 0.01s



avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: reading input file "C:xxxxxxxxxxxxx.HEX"

avrdude: writing flash (4220 bytes):



Writing | ################################################## | 100% 1.58s



avrdude: 4220 bytes of flash written

avrdude: verifying flash memory against C:xxxxxxxxxx.HEX:

avrdude: load data flash data from input file C:xxxxxxxxxHEX:

avrdude: input file C:xxxxxxxxx.HEX contains 4220 bytes

avrdude: reading on-chip flash data:



Reading | #avrdude: stk500_recv(): programmer is not responding

Should I put -V here?Or is there anywhere else I should put it?

## Preprocessor
preproc.includes.flags=-w -x  c++ -M -MG -MP 
recipe.preproc.includes="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.includes.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}"

preproc.macros.flags=-w -x  c++ -E -CC
recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{preprocessed_file_path}"

Please, someone, help me with this issue... I believe there are beginners like me who have such confusion.

I just read this page that explains how avrdude works when uploading sketch.

https://www.nongnu.org/avrdude/user-manual/avrdude_4.html

The is a sentence describes how to disable the verify process:

-V
Disable automatic verify check when uploading data.

I did exactly as what it says but still... it does not work.