Hi,
I am new to Arduino since i just started using! for Mechatronics course. The problem is, whenever i try to upload a code like "blink" example code i am getting an error but code compiles just fine. I tried changing the versions of IDE but it didn't work. I searched for a solution but couldn't find a working one. Port and board selection is correct. I am using Ubuntu 16.10. The error message, the system and board information is as below. Any help would be appreciated.
Linux Kernel Info:
Linux Gangie 4.8.0-44-generic #47-Ubuntu SMP Wed Mar 22 14:27:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Sketch uses 1,066 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
Sketch uses 1,066 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: verification error, first mismatch at byte 0x0002
0x68 != 0x5c
avrdude: verification error; content mismatch
Not sure what your problem could be but if you go into the IDE File-> Preferences and you enable "verbose output during programming" you will get more details as to what is happening during uploading.
Thank you for responding. I did what you said. Here is the output for compilation and uploading. I used 1.6.9 Arduino IDE and AVR ISP, AVRISP mkII, ArduinoISP, Arduino as ISP programmer is used. All of them gave the same error.
for compiling there is a text file in the attachments since 9000 character limit in the forum.
For uploading:
/home/mtaskin/Documents/arduino-1.6.9/hardware/tools/avr/bin/avrdude -C/home/mtaskin/Documents/arduino-1.6.9/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/builde5a2dea7b37df114b46bdb3dc5b914d6.tmp/Blink.ino.hex:i
avrdude: Version 6.0.1, compiled on Apr 14 2015 at 19:04:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/home/mtaskin/Documents/arduino-1.6.9/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/home/mtaskin/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : arduino
Overriding Baud Rate : 115200
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
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f
avrdude: reading input file "/tmp/builde5a2dea7b37df114b46bdb3dc5b914d6.tmp/Blink.ino.hex"
avrdude: writing flash (1066 bytes):
Writing | ################################################## | 100% 0.15s
avrdude: 1066 bytes of flash written
avrdude: verifying flash memory against /tmp/builde5a2dea7b37df114b46bdb3dc5b914d6.tmp/Blink.ino.hex:
avrdude: load data flash data from input file /tmp/builde5a2dea7b37df114b46bdb3dc5b914d6.tmp/Blink.ino.hex:
avrdude: input file /tmp/builde5a2dea7b37df114b46bdb3dc5b914d6.tmp/Blink.ino.hex contains 1066 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.15s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
0x68 != 0x5c
avrdude: verification error; content mismatch
avrdude done. Thank you.
I am a newbie so hopefully someone with more experience will have good suggestions
I have used the same setup as you have (sticked with -c arduino though), and got the same error at the same stage, and despite the error the sketch was working fine on the target board afterwards, but...
... I have also bricked two pro minis trying to program them through ArduinoISP
Personnally I ordered a dedicated small ISP programmer.
Franck
Man, that mismatch at 0x0002 seems to be hitting a lot of people lately, and it makes zero sense (and prior to like a month or two ago, nobody was reporting that). Something is up...
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
Not able to upload programs to the Arduino UNO.
Im using the 1.8.1 IDE on 32bit Ubuntu Mate 16.10 LTS.
I am able to select the port on Tools --> Ports but the IDE wont upload to the board, even simple LED blinking program dosent upload.
Have you installed the required extensions i also faced the same error when i was a newbie check the recommend or update able extensions you installed for arduino
I am a experienced and i faced this is my new computer in which i was trying to make a PS5 using arduino leonardo and i am using the arduino 2.0 so be careful with your version
I don't know if this was helpful so yea lets get going