Unfortunately I could not solve my problem until now.
I tried to use the beta version of the Arduino IDE and searched the internet for hints. -> Nothing worked so far.
The strange thing is that smaller sketches like "Blink" upload and run without any problems.
Is there maybe an option to increase the timout tolerance of the programmer?
I'm seeing the same as you, and in my case have a 32k image just too big for my original Nanos, that seems to write correctly as my program (LCD / Touch & SD) all works correctly, however having changed cables / USB ports (back and front of computer) and have two other Nana Every's, they all have the same issue that the read verification step fails:
avrdude: 36140 bytes of flash written
avrdude: verifying flash memory against C:\Users\xxxx\AppData\Local\Temp\arduino_build_897902/PicMars.ino.hex:
avrdude: load data flash data from input file C:\Users\xxxx\AppData\Local\Temp\arduino_build_897902/PicMars.ino.hex:
avrdude: input file C:\Users\xxxx\AppData\Local\Temp\arduino_build_897902/PicMars.ino.hex contains 36140 bytes
avrdude: reading on-chip flash data:
Reading | ##################################avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_paged_load(): fatal timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_read_byte(): fatal timeout/error communicating with programmer (status -1)
avr_read(): error reading address 0x0000
read operation not supported for memory "flash"
avrdude: failed to read all of flash memory, rc=-2
avrdude: jtagmkII_program_disable(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_close(): timeout/error communicating with programmer (status -1)
avrdude: jtagmkII_close(): timeout/error communicating with programmer (status -1)
avrdude done. Thank you.
the selected serial port
does not exist or your board is not connected
Error while setting serial port parameters: 9,600 N 8 1
Small programs work fine. The worst bit is that after this failure, I'm then seeing it lock the Arduino IDE until I disconnect the Nano Every. On replugging all works fine again.
I'm also finding that using my normal separate programming environment on a Virtualbox VM is very flaky with the Nano Every writing. The tests above used the host machine before anyone assumes it's a vBox issue.
Just to throw two cents in this, have you tried to compile/upload using Arduino Create (https://create.arduino.cc) instead of the IDE? You need to install a plugin and the free version only gets you a small amount of compilation time, but I found that it compiles faster for my Nano 33 Sense. So maybe it would upload/read faster or better?!? Although if it is a large amount of code then you might run out of free time.