0
\$\begingroup\$

I just flashed a new program into my ATMEGA328p, just letting 8 LEDs blink. When I have a look into the output of avrdude I get a strange message:

avrdude: avr_read(): skipping page 4: no interesting data

While avrdude is working, a few LEDs flicker and then go black. What does this message mean?

The code I upload is:

#define F_CPU 1000000UL
#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
    DDRB = 0xff;
    /* Replace with your application code */
    while (1) 
    {
        PORTB = 0b11111111;
        _delay_ms(1000);
        PORTB = 0b00000000;
        _delay_ms(1000);
    }

    return (0);
}

The avrdude output:

avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\\.\libusb0-0001--0x1781-0x0c9f
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  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

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 ac 53 00]
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00sCMD: [30 00 00 00] [00 30 00 1e]
CMD: [30 00 01 00] [00 30 00 95]
Reading | #################                                  | 33% 0.01sCMD: [30 00 02 00] [00 30 00 0f]
Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
CMD: [50 00 00 00] [00 50 00 62]
avrdude: safemode read 1, lfuse value: 62
CMD: [50 00 00 00] [00 50 00 62]
avrdude: safemode read 2, lfuse value: 62
CMD: [50 00 00 00] [00 50 00 62]
avrdude: safemode read 3, lfuse value: 62
avrdude: safemode: lfuse reads as 62
CMD: [58 08 00 00] [00 58 08 d9]
avrdude: safemode read 1, hfuse value: d9
CMD: [58 08 00 00] [00 58 08 d9]
avrdude: safemode read 2, hfuse value: d9
CMD: [58 08 00 00] [00 58 08 d9]
avrdude: safemode read 3, hfuse value: d9
avrdude: safemode: hfuse reads as D9
CMD: [50 08 00 00] [00 50 08 ff]
avrdude: safemode read 1, efuse value: ff
CMD: [50 08 00 00] [00 50 08 ff]
avrdude: safemode read 2, efuse value: ff
CMD: [50 08 00 00] [00 50 08 ff]
avrdude: safemode read 3, efuse value: ff
avrdude: safemode: efuse reads as FF
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
CMD: [ac 80 00 00] [00 ac 80 00]
avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 ac 53 00]
avrdude: reading input file "CH03POV.hex"
avrdude: input file CH03POV.hex auto detected as Intel Hex
avrdude: writing flash (178 bytes):

Writing |                                                    | 0% 0.00sCMD: [4c 00 00 00] [00 4c 00 00]
Writing | #########################                          | 50% 0.20sCMD: [4c 00 40 00] [ff 4c 00 40]
Writing | ################################################## | 100% 0.45s

avrdude: 178 bytes of flash written
avrdude: verifying flash memory against CH03POV.hex:
avrdude: load data flash data from input file CH03POV.hex:
avrdude: input file CH03POV.hex auto detected as Intel Hex
avrdude: input file CH03POV.hex contains 178 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.27s

avrdude: avr_read(): skipping page 2: no interesting data
avrdude: avr_read(): skipping page 3: no interesting data
avrdude: avr_read(): skipping page 4: no interesting data

this continues on and on...

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

It's pretty self explanatory:

avrdude: avr_read():

It's doing a read.

skipping page 4:

It didn't read from page 4 of the flash

no interesting data

Because there isn't anything there that it has been asked to read.

You are asking it to write/verify 178 bytes worth of data:

avrdude: input file CH03POV.hex contains 178 bytes

And each page (chunk) of memory in the flash is 128 bytes.:

                         Page
       Memory Type  ...  Size
       -----------  ...  ----
       flash        ...   128

Your entire data fits into pages 0 and 1, and the rest are not needed - they contain no interesting data.


TL;DR; It only reads and writes pages it needs to, making the process faster, and not wearing out the flash unnecessarily.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.