Flash and Boot Memories?

Ah, the fight continues, lol

So I have downloaded installed the core megaavr for the nano everything, I have downloaded and installed the library for the grove TH02 temp sensor. I have successfully compiled my temp warning program and now I am trying to upload it.

First try pointing to port, second attempt point to both port and board fqbn:

robert@mountain-cabin:~$ arduino-cli upload -p /dev/ttyACM0 ~/Arduino/Sketch_Book/temperature_warning/temperature_warning.ino 
avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description

robert@mountain-cabin:~$ arduino-cli upload -p /dev/ttyACM0 -b arduino:megaavr:nona4809 ~/Arduino/Sketch_Book/temperature_warning/temperature_warning.ino 
avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description

Couple things here, is that a typo, nona4809? Would that by chance supposed to be nano4809?

That is your typo, no mine just so we are clear:

robert@mountain-cabin:~$ arduino-cli board list
Port         Type              Board Name         FQBN                     Core           
/dev/ttyACM0 Serial Port (USB) Arduino Nano Every arduino:megaavr:nona4809 arduino:megaavr

Why is it so hard to find the cli documentation in one place on the arduino website?

Argh, well getting closer and closer with every post. But I have to say, for something that has been around for so long I am baffled by all the bugs and problems I have encountered in my short 10 days of getting my new nano everything board.

Yes, I know if I just ran windows 10 and downloaded the IDE things would be so much smoother, but I am not a vanilla ice cream, I am a multicolored, multiflavored, difficult to manage edge case! :laughing:

I would try verbose upload logging on the IDE and then on the CLI. Are there any differences in the commands generated?

Ok, so I found all the documentation on the github page. Not sure why you don't have it documented on the actual arduino.cc site but oh well nothing I can do about that.

Arduino CLI Documentation

In going through the commands, I got board details, I also did a burn-bootloader -h, config dump and cache -h commands.

Somewhere in that process I must have made it touch itself because it obviously became aware of its new found flash and boot memories...or perhaps not, lol!

I don't have an IDE installed hence the reason I am using the CLI interface. But following your advice I did in fact use the verbose option and low and behold it works all the sudden, lol

robert@mountain-cabin:~$ arduino-cli upload -v -p /dev/ttyACM0 ~/Arduino/Sketch_Book/temperature_warning/temperature_warning.ino 
Performing 1200-bps touch reset on serial port /dev/ttyACM0
"/home/robert/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/home/robert/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega4809 -cjtag2updi -P/dev/ttyACM0  -b115200 -e -D "-Uflash:w:/tmp/arduino-sketch-520722344CD5A852135BBA7455861E0D/temperature_warning.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 "/home/robert/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/robert/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         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 "/tmp/arduino-sketch-520722344CD5A852135BBA7455861E0D/temperature_warning.ino.hex"
avrdude: writing flash (6956 bytes):

Writing | ################################################## | 100% 5.12s

avrdude: 6956 bytes of flash written
avrdude: reading input file "0x01"
avrdude: writing fuse2 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse2 written
avrdude: reading input file "0xC9"
avrdude: writing fuse5 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse5 written
avrdude: reading input file "0x00"
avrdude: writing fuse8 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse8 written

avrdude done.  Thank you.

robert@mountain-cabin:~$ 

Actually I do notice a couple things here that are warnings/errors but not enough to stop the process..

I noticed config file missing error in the output I listed above so I ran arduino-cli config init to generate a config file and ran the upload again.

robert@mountain-cabin:~/Arduino$ arduino-cli config init
Config file written to: /home/robert/.arduino15/arduino-cli.yaml

User configuration file is "/home/robert/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Error #2 is the original error I that started this thread, not sure why all the sudden it is not a problem where as it was before??

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

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

You can ignore that warning, it is always shown when uploading a sketch to a nano every using the IDE, so it is not surprising to see it using the CLI.

No. It's intentional. "Nona" was the original "code name" for the Nano Every project before the real product name was decided on. You'll find some other things like that in the board IDs. For example:
https://github.com/arduino/ArduinoCore-avr/blob/1.8.3/boards.txt#L951

chiwawa.name=Arduino Industrial 101

I guess it's a bit of an easter egg from the boards platform developers.

You're welcome to submit reports for any bugs you have found.

This is normal and expected. Please just ignore it. The AVRDUDE uploader tool used for the Nano Every has a capability to use a global configuration file. That is convenient for people who are using AVRDUDE directly. But with Arduino boards platforms, they configuration file is bundled with the tool installation, and the path to that file specified via the upload command. So it is perfectly fine if you don't have a global user configuration file.

You're falling into the common pitfall of interpreting innocuous informational messages or warnings as errors. It's good to pay attention to these, and do some research about what they mean if you're curious, but don't assume they mean something is wrong. In general, if you are getting an exit status 0 and everything is working as expected, then it's fine.

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