Nano Every - sketch upload error

Hi,

I am trying to upload my sketch to an arduino nano every.
Although there are some warnings, the sketch is compiled:
93% flash
11% Ram

The error: Beim Hochladen des Sketches ist ein Fehler aufgetreten (An error ocurred during upload of sketch)

Is there a way to get some more and precise information than that?

I have a Win7 PC with Arduino IDE 1.8.10.

Thanks in advance.

Martin

Enable verbose output during compilation and post the full error output

         Using Port                    : COM14
         Using Programmer              : jtag2updi
         Overriding Baud Rate          : 115200
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
  boot-loader FW version:        1
  firmware version:              6.00
  hardware version:              1
S_MCU:
  boot-loader FW version:        1
  firmware version:              6.00
  hardware version:              1
Serial number:                   00:00:00:00:00:00
Device ID:                       JTAGICE mkII
         AVR Part                      : ATmega4809
         Chip Erase delay              : 0 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 0
         StabDelay                     : 0
         CmdexeDelay                   : 0
         SyncLoops                     : 0
         ByteDelay                     : 0
         PollIndex                     : 0
         PollValue                     : 0x00
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           prodsig        0     0     0    0 no         61   61      0     0     0 0x00 0x00
           fuses          0     0     0    0 no          9    0      0     0     0 0x00 0x00
           fuse0          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse1          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse2          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse4          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse5          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse6          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse7          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse8          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0     0     0 0x00 0x00
           data           0     0     0    0 no          0    0      0     0     0 0x00 0x00
           usersig        0     0     0    0 no         64   64      0     0     0 0x00 0x00
           flash          0     0     0    0 no      49152  128      0     0     0 0x00 0x00
           eeprom         0     0     0    0 no        256   64      0     0     0 0x00 0x00

         Programmer Type : JTAGMKII_PDI
         Description     : JTAGv2 to UPDI bridge
         M_MCU hardware version: 1
         M_MCU firmware version: 6.00
         S_MCU hardware version: 1
         S_MCU firmware version: 6.00
         Serial number:          00:00:00:00:00:00
         Vtarget         : 5.0 V

avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.32s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: erasing chip
avrdude: reading input file "C:\Users\MartinS\AppData\Local\Temp\arduino_build_10544/N2K-Outside-Sensor_every.ino.hex"
avrdude: writing flash (46552 bytes):

Writing | ################################################## | 100% 37.19s

avrdude: 46552 bytes of flash written
avrdude: verifying flash memory against C:\Users\MartinS\AppData\Local\Temp\arduino_build_10544/N2K-Outside-Sensor_every.ino.hex:
avrdude: load data flash data from input file C:\Users\MartinS\AppData\Local\Temp\arduino_build_10544/N2K-Outside-Sensor_every.ino.hex:
avrdude: input file C:\Users\MartinS\AppData\Local\Temp\arduino_build_10544/N2K-Outside-Sensor_every.ino.hex contains 46552 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)

Okay, that is a lot more information. Thank you!

It seems that the verification process cannot be done correctly.

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?

Thank you in advance!

Martin

Hi Martin,

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: writing flash (36140 bytes):

Writing | ################################################## | 100% 29.37s

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.

Robin

Hello All,

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.

Hope that (maybe) helps,

Matt

I suspect a sign error in the samd11 firmware...