avrdude error...help

Hello,
When i try to upload my code cosole shows me

avrdude: verification error, first mismatch at byte 0x7800
0x6d != 0xff
avrdude: verification error; content mismatch

size of my code is 31.046 bytes
i have arduino uno and for bootloader use 0.5k
so my size of programm i guess is ok

when i delete some code and the size is smaller 27k it's ok...

What this error is? please help

I think your sketch is running out of program memory space.

please tell me if you know the solution

You need to write it more efficiently.

Or maybe, depending of what you want, you may need another Arduino board with more Flash (for example the MEGA 2560).

luisilva:
Or maybe, depending of what you want, you may need another Arduino board with more Flash (for example the MEGA 2560).

I doubt that's necessary. If it's around 30k already, it won't take much to reduce that by about a quarter. I guarantee it.

i dont want to buy another..
i will try to reduse the size but without reduse enough

If you post your code as an attachment, we'll probably be able to give you some pointers.

how many kb must be the code less than 30k?

Less than 31,5kB I think, but depends of what board do you have.

i have arduino uno…its 31.378 bytes but shows
avrdude: verification error, first mismatch at byte 0x7800
0x48 != 0xff
avrdude: verification error; content mismatch

Post your code (as an attachment). Otherwise it is all guesswork.

How to use this forum

What bootloader do you have? You should be able to get up to 0x7DFF with Optiboot.

Try running my self-detect board sketch:

http://gammon.com.au/Arduino/Atmega_Self_Read_Signature.zip

That should give you this output:

Signature detector.
Written by Nick Gammon.
Signature = 1E  95  0F 
Fuses
Low = FF High = DE Ext = FD Lock = EF 

Processor = ATmega328P
Flash memory size = 32768
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 512 bytes starting at 7E00

Bootloader:

7E00: 11 24 84 B7 14 BE 81 FF F0 D0 85 E0 80 93 81 00 
7E10: 82 E0 80 93 C0 00 88 E1 80 93 C1 00 86 E0 80 93 
7E20: C2 00 80 E1 80 93 C4 00 8E E0 C9 D0 25 9A 86 E0 
7E30: 20 E3 3C EF 91 E0 30 93 85 00 20 93 84 00 96 BB 
7E40: B0 9B FE CF 1D 9A A8 95 81 50 A9 F7 CC 24 DD 24 
7E50: 88 24 83 94 B5 E0 AB 2E A1 E1 9A 2E F3 E0 BF 2E 
7E60: A2 D0 81 34 61 F4 9F D0 08 2F AF D0 02 38 11 F0 
7E70: 01 38 11 F4 84 E0 01 C0 83 E0 8D D0 89 C0 82 34 
7E80: 11 F4 84 E1 03 C0 85 34 19 F4 85 E0 A6 D0 80 C0 
7E90: 85 35 79 F4 88 D0 E8 2E FF 24 85 D0 08 2F 10 E0 
7EA0: 10 2F 00 27 0E 29 1F 29 00 0F 11 1F 8E D0 68 01 
7EB0: 6F C0 86 35 21 F4 84 E0 90 D0 80 E0 DE CF 84 36 
7EC0: 09 F0 40 C0 70 D0 6F D0 08 2F 6D D0 80 E0 C8 16 
7ED0: 80 E7 D8 06 18 F4 F6 01 B7 BE E8 95 C0 E0 D1 E0 
7EE0: 62 D0 89 93 0C 17 E1 F7 F0 E0 CF 16 F0 E7 DF 06 
7EF0: 18 F0 F6 01 B7 BE E8 95 68 D0 07 B6 00 FC FD CF 
7F00: A6 01 A0 E0 B1 E0 2C 91 30 E0 11 96 8C 91 11 97 
7F10: 90 E0 98 2F 88 27 82 2B 93 2B 12 96 FA 01 0C 01 
7F20: 87 BE E8 95 11 24 4E 5F 5F 4F F1 E0 A0 38 BF 07 
7F30: 51 F7 F6 01 A7 BE E8 95 07 B6 00 FC FD CF 97 BE 
7F40: E8 95 26 C0 84 37 B1 F4 2E D0 2D D0 F8 2E 2B D0 
7F50: 3C D0 F6 01 EF 2C 8F 01 0F 5F 1F 4F 84 91 1B D0 
7F60: EA 94 F8 01 C1 F7 08 94 C1 1C D1 1C FA 94 CF 0C 
7F70: D1 1C 0E C0 85 37 39 F4 28 D0 8E E1 0C D0 85 E9 
7F80: 0A D0 8F E0 7A CF 81 35 11 F4 88 E0 18 D0 1D D0 
7F90: 80 E1 01 D0 65 CF 98 2F 80 91 C0 00 85 FF FC CF 
7FA0: 90 93 C6 00 08 95 80 91 C0 00 87 FF FC CF 80 91 
7FB0: C0 00 84 FD 01 C0 A8 95 80 91 C6 00 08 95 E0 E6 
7FC0: F0 E0 98 E1 90 83 80 83 08 95 ED DF 80 32 19 F0 
7FD0: 88 E0 F5 DF FF CF 84 E1 DE CF 1F 93 18 2F E3 DF 
7FE0: 11 50 E9 F7 F2 DF 1F 91 08 95 80 E0 E8 DF EE 27 
7FF0: FF 27 09 94 FF FF FF FF FF FF FF FF FF FF 04 04 

MD5 sum of bootloader = FB F4 9B 7B 59 73 7F 65 E8 D0 F8 A5 08 12 E7 9F

Nick i downloaded your file and i put it in libraries file of arduino.
i am trying to upload code but shows me

md5\md5.c.o: In function `md5_starts':
C:\Program Files (x86)\Arduino\libraries\md5/md5.c:40: multiple definition of `md5_starts'
md5.c.o:C:\Users\admin\AppData\Local\Temp\build6123632754648520266.tmp/md5.c:40: first defined here
md5\md5.c.o: In function `md5_process':
C:\Program Files (x86)\Arduino\libraries\md5/md5.c:51: multiple definition of `md5_process'
md5.c.o:C:\Users\admin\AppData\Local\Temp\build6123632754648520266.tmp/md5.c:51: first defined here
md5\md5.c.o: In function `md5_update':
C:\Program Files (x86)\Arduino\libraries\md5/md5.c:174: multiple definition of `md5_update'
md5.c.o:C:\Users\admin\AppData\Local\Temp\build6123632754648520266.tmp/md5.c:174: first defined here
md5\md5.c.o: In function `md5_finish':
C:\Program Files (x86)\Arduino\libraries\md5/md5.c:221: multiple definition of `md5_finish'
md5.c.o:C:\Users\admin\AppData\Local\Temp\build6123632754648520266.tmp/md5.c:221: first defined here
Atmega_Self_Read_Signature.cpp.o: In function `readBootloader()':
C:\Program Files (x86)\Arduino/Atmega_Self_Read_Signature.ino:213: undefined reference to `md5_starts(md5_context*)'
C:\Program Files (x86)\Arduino/Atmega_Self_Read_Signature.ino:218: undefined reference to `md5_update(md5_context*, unsigned char*, unsigned long)'
C:\Program Files (x86)\Arduino/Atmega_Self_Read_Signature.ino:221: undefined reference to `md5_finish(md5_context*, unsigned char*)'

i have not experience with arduino. is it ok to set your file in libraries?

i upload my code----a little description :
i use wifi breakout and sensors for temperature humidity and pressure
i get measurements and send them to my local server

**there are some lines with sntp connection code not all the code for sntp due to memory size
i am trying to reduce the other code and after fill the whole sntp code

mycode.ino (4.06 KB)

It's just a stand-alone sketch, not a library. Unzip into the sketch folder and open the .ino file.

What happen with my code?
did somebody reduce the size of kb?
any advice for help?

What does #include "utility/debug.h" do? What happens if you remove it?

i dont know what happens and what it is :stuck_out_tongue:
mycode includes many examples. it wasn't made by me from the start...
i think that i tried this in the past...i will try again..
do you compile the code ? what happens about size?

akisd:
i dont know what happens and what it is :P.

You're not trying are you?