I have written some code using the LiquidCrystal_I2C library and I get the following during compiling:
"WARNING: library LiquidCrystal I2C claims to run on avr architecture(s) and may be incompatible with your current board which runs on megaavr architecture(s)." I have run another sketch with this library on this same board and did not have an issue.
That being said, I attempt to upload the new sketch to the board and I get a list of avrdude errors:
avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description.
avrdude: jtagmkII_recv(): checksum error.
avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -4).
avrdude: jtagmkII_recv(): checksum error.
avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -4).
Are these related somehow? Do I need to use a different I2C LCD library? Do I need to wipe the memory of the board prior to uploading the new software?
Hi @jpfrancis690. 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 reply here on this forum topic 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.
It is possible for a short or external circuitry connected to the Arduino board to interfere with the upload process, causing this type of upload error.
Make sure the board is not sitting on anything conductive that could short the contacts on the bottom of the board. Do a careful visual examination to make sure there isn't any conductive debris (e.g., loose beads of solder, strands of wire, or component leads) on either side of the board, or on the surface the board is sitting on.
If you have a shield or any external circuitry or components connected to your Arduino board, try this experiment:
Disconnect the USB cable of the Arduino board from your computer.
Disconnect any shields, modules, external circuitry, etc. from your board. Make sure to remove any connections to your LCD display.
Connect the Arduino board to your computer with a USB cable.
Now try uploading a sketch to the board again. Does the upload now succeed?
This experiment will determine whether the upload error was caused by interference from your external circuitry. If so, you can then focus your attention on identifying the specific problem with the circuit and resolving it.
So, I have the Nano Every installed into a DIN rail screw terminal board which is installed in a control cabinet for a stepper motor (See pictures). When the laptop I am using is not connected, the board is powered from an internal power supply. So I have previously uploaded sketches to test various functions and have had no problems but now I am at the next to final stage of testing of functions and have run into this load error. I will try the what you have stated and report back the results.
I have completely removed the Nano from the DIN rail holder and with it standing by itself, I attempted to load again. I got the same error messages as the last time.
WARNING: library LiquidCrystal I2C claims to run on avr architecture(s) and may be incompatible with your current board which runs on megaavr architecture(s).
Sketch uses 15199 bytes (30%) of program storage space. Maximum is 49152 bytes.
Global variables use 622 bytes (10%) of dynamic memory, leaving 5522 bytes for local variables. Maximum is 6144 bytes.
Performing 1200-bps touch reset on serial port COM4
"C:\Users\john.francis.PLASTOCOR\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\john.francis.PLASTOCOR\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega4809 -cjtag2updi -PCOM4 -b115200 -e -D "-Uflash:w:C:\Users\john.francis.PLASTOCOR\AppData\Local\arduino\sketches\CC9926F80742956021F8C4C54ED82FD9/Precision_Dispenser_no_keyboard_sketch_aug19a.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x00:m" {upload.extra_files}
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\john.francis.PLASTOCOR\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM4
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: 1.07
hardware version: 1
S_MCU:
boot-loader FW version: 1
firmware version: 6.07
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: 1.07
S_MCU hardware version: 1
S_MCU firmware version: 6.07
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.27s
avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: erasing chip
avrdude: reading input file "C:\Users\john.francis.PLASTOCOR\AppData\Local\arduino\sketches\CC9926F80742956021F8C4C54ED82FD9/Precision_Dispenser_no_keyboard_sketch_aug19a.ino.hex"
avrdude: writing flash (15200 bytes):
Writing | ################################################## | 100% 11.16s
avrdude: 15200 bytes of flash written
avrdude: verifying flash memory against C:\Users\john.francis.PLASTOCOR\AppData\Local\arduino\sketches\CC9926F80742956021F8C4C54ED82FD9/Precision_Dispenser_no_keyboard_sketch_aug19a.ino.hex:
avrdude: load data flash data from input file C:\Users\john.francis.PLASTOCOR\AppData\Local\arduino\sketches\CC9926F80742956021F8C4C54ED82FD9/Precision_Dispenser_no_keyboard_sketch_aug19a.ino.hex:
avrdude: input file C:\Users\john.francis.PLASTOCOR\AppData\Local\arduino\sketches\CC9926F80742956021F8C4C54ED82FD9/Precision_Dispenser_no_keyboard_sketch_aug19a.ino.hex contains 15200 bytes
avrdude: reading on-chip flash data:
Reading | #########avrdude: jtagmkII_recv(): checksum error
avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -4)
################################avrdude: jtagmkII_recv(): checksum error
avrdude: jtagmkII_paged_load(): timeout/error communicating with programmer (status -4)
######### | 100% 2.37s
avrdude: verifying ...
avrdude: 15200 bytes of flash verified
avrdude: reading input file "0x01"
avrdude: writing fuse2 (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of fuse2 written
avrdude: verifying fuse2 memory against 0x01:
avrdude: load data fuse2 data from input file 0x01:
avrdude: input file 0x01 contains 1 bytes
avrdude: reading on-chip fuse2 data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of fuse2 verified
avrdude: reading input file "0xC9"
avrdude: writing fuse5 (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of fuse5 written
avrdude: verifying fuse5 memory against 0xC9:
avrdude: load data fuse5 data from input file 0xC9:
avrdude: input file 0xC9 contains 1 bytes
avrdude: reading on-chip fuse5 data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of fuse5 verified
avrdude: reading input file "0x00"
avrdude: writing fuse8 (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of fuse8 written
avrdude: verifying fuse8 memory against 0x00:
avrdude: load data fuse8 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse8 data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of fuse8 verified
avrdude done. Thank you.
Looking through the Tools drop-down menu I noticed that the programmer that is listed is different than the one listed in the error message (see screen shot below);
The checksum error that occurred when reading back the data from flash is concerning, but it appears it was able to recover from that. And the verification was successful, so this doesn't indicate the uploaded program was corrupted.
I'm not sure what exactly could cause the checksum error. You could try a different USB cable just to make sure it isn't being caused by a damaged or defective cable.
It might indicate that the ATmega4809 microcontroller on your board has suffered permanent physical damage. It would be worth procuring a replacement board. That is handy to have regardless, especially since your board is going to be permanently incorporated into your equipment. A spare board would allow you to perform an experiment checking whether the checksum error is specific to one board, or occurs with both. If the error is specific to one board, that would support my hypothesis of a damaged board. If the error instead occurs with the fresh board as well, this would indicate a problem with some component in the system other than the board.
I just attempted to upload my sketch to the board with it removed from the terminal board and using a new USB cable and I am getting the same errors. I will later attempt to upload the sketch to a MEGA2650 I have to see if I get the same result. I also am noticing that this is becoming a frequent error occuring through other posts.
I will attempt to upload to the MEGA 2650 and when the new Nano Every boards come in I will try on them also.