User Tools

Site Tools


arduino_programmers_errors

If you want to send us your comments, please do so. Thanks
More on comments


Arduino programmers errors

All test are done whith Tools | Programmer: set to usbasp
After compiling the IDE shows something like

Sketch uses 2,458 bytes (7%) of program storage space. Maximum is 32,256 bytes.
Global variables use 234 bytes (11%) of dynamic memory, leaving 1,814 bytes for local variables.
Maximum is 2,048 bytes.

System issues

Running journalctl -xb shows in the optput:

nov 27 13:59:52 hostname systemd-udevd[359]: /etc/udev/rules.d/99-USBasp.rules:4: Unknown key 'SYSFS{idVendor}'

The SYSFS key is deprecated and replaced with the ATTRS key 1)
Change SYSFS to ATTRS in: /etc/udev/rules.d/99-USBasp.rules

gtk-icon-sizes error

Arduino IDE 1.6.11 To be solved:

Picked up JAVA_TOOL_OPTIONS: 
Error parsing gtk-icon-sizes string: ''

This can be ignored

Failed to load module "canberra-gtk-module"

Install libcanberra-gtk-module

No serial port

When looking in Tools | Port there is no /dev/ttyACM0 port

  • Open a second IDE by loading an other program and check the port there. Then check in the original IDE
  • Install gnome-system-tools

When java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver occurs do, as root, in a terminal

add-apt-repository ppa:webupd8team/java

cannot set sck period

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

This warning can be ignored. The upload is probably succesfull

can't open device

can't open device (1)

ser_open(): can't open device "/dev/ttyACM0": Permission denied
ioctl("TIOCMGET"): Inappropriate ioctl for device

Do as root or with sudo

usermod -G dialout -a user
chmod a+rw /dev/ttyACM0

and maybe

udevadm trigger

can't open device (2)

avrdude: ser_open(): can't open device "/dev/ttyACM2": No such file or directory

Possible solutions

  • Disconnect the Arduino, reconnect the Arduino
  • Disconnect the Arduino. Reconnect an other Arduino. Check (and set) the port. Reconnect the first Arduino
  • If you are using an USB hub connect the Arduino directly to the computer
  • Remove the microcontroller from the Arduino, disconnect the Arduino, reconnect the Arduino
  • Reprogram the ATmega 16U2 or 32U2 USB interface microcontroller on the UNO via its ISP connector

can't open device (3)

avrdude: ser_open(): can't open device "/dev/ttyACM0": No such device
ioctl("TIOCMGET"): Invalid argument
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Board at /dev/ttyACM0 is not available

The Arduino is not connected or the powersupply is turned off

Possible solutions

  • Check if there is an other device
  • The ATmega 328p might be defective

could not find USB device

avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

Check if the (right) box is marked to select the port under Tools | Port in the Arduino IDE
Try without USBhub, with an USBhub, with an other USBhub

With ISP

For Windows

  • Download the Nirsoft USBDeview program and run it
  • Connect the ISP device to the USB port
  • Now check in USBDeview if the address of the ISP device is VID_16C0 PID_05DC
  • Download the Zadig 2.4 driver
  • Install the Zadig program
  • Run the Zadig program
    • Select libusb-32win (v 1.2.6.0)
    • USB ID: 16C0 5DC
    • Click on Install Driver
  • Check in Device Manager if the USBasp device is installed properly
  • Restart the Arduino IDE
  • Test if it works by loading a program
  • If it still does not work uninstall, in device manager, the usbasp driver
  • Run the Zadig program again
    • Select libusbK (v 3.0.7.0)
    • USB ID 16C0 5DC [empty box for 2 digits]
    • If the field in front of the Edit checkbox is empty give the driver a name like libusbWK
    • Click on Install Driver
  • Check in Device Manager if the USBasp (USBaspWK) device is installed properly
  • Restart the Arduino IDE
  • Test if it works by loading a program
    • You can ignore avrdude: warning: cannot set sck period. please check for usbasp firmware update.
  • Then it worked for us

A similar approach for Windows

  • In Device Manager uninstall all USBasp and alike drivers
  • Start the Zadig program
    • Select libusbK(V3.0.3.0)
    • In options select USBasp
    • Now the default USBID 16C0 05DC (do not change this)
    • Click on Replace Driver
  • Check in Device Manager for libusbK USB Devices and if it has indented USBasp
  • Now it should work

Programming issues

cannot open shared object file

When using the 1.6.5-r5 IDE

/opt/arduino-1.6.5-r5/hardware/tools/avr/bin/avrdude: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory

Use the latest IDE or t.b.d.

Programmer is not responding on an Arduino UNO

The sketch compiled fine. When you get

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
  • Check if your microcontrollerchip is a ATmega328 or ATmega328p
  • Check if the ATmega328 / processor is properly seated in the socket
  • Check the port setting in the Arduino IDE. It should be /dev/ttyACM0 on Linux
    • If it is not /dev/ttyACM0 then try connecting the Arduino directly to an USB port on the computer. Do not use an USB hub. If needed restart the Arduino IDE
  • Check if there is a capacitor between RESET and Ground. There should NOT be one.
  • Check if the serial monitor works by inserting a preprogrammed ATmwga328p with output for the serial monitor into the Arduino UNO
  • For an Arduino Nano try the Tools | Processor: “ATmega328P (Old Bootloader)“ option
  • Check if an other Arduino works
  • The ATmega 328p on the Arduino UNO might have no bootloader or be defective. Try to reprogram the bootloader
  • The ATmega U16 / U32 might be defective. Maybe reflashing it solves the issue. How to do that: t.b.d.
  • Try reading with Serial Monitor (CTRL-Shift-M) if some program in the ATMega delivers output

Permission denied

avrdude: ser_open(): can't open device "/dev/ttyS0": Permission denied

This is the wrong USB port. /dev/ACM0 is needed. If your are using an USB hub then connect the Arduino UNO directly to the computer. Restart the Arduino IDE, if needed, and try again

avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied


  • Close the Arduino IDE
  • Make sure serial.port=/dev/ttyACM0 is in /home/user/.arduino/preferences.txt or in /home/user/.arduino15/preferences.txt is set
  • As the user execute the groups command and check if dialout is in the list
    • If not execute as root usermod --groups dialout --append user
    • Log out and login again

Problem uploading to board

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

There might be a terminal program like Putty or screen which holds the connecion. Find it, terminate it and try again

Incircuit programmer issues

Board at /dev/ttyACM0 is not available

If you get

Board at /dev/ttyACM0 is not available

The ATmega328p is probably defective. The fact that Board at /dev/ttyACM0 is not available is mentioned does not mean anything because with a good ATmega328p there is no issue, the programmings goes as expected.

Burning the booloader

If you get at some point

Error opening serial port '/dev/ttyACM0'.

That is no problem. The ISP will program anyway. Probably using /dev/ttyS0

Programmer is not responding with an ISP on Linux

The output of lshw (run as root)

.*-usb UNCLAIMED
     description: Generic USB device
     product: USBasp
     vendor: www.fischl.de
     physical id: 2
     bus info: usb@2:2
     version: 1.02
     capabilities: usb-1.10
     configuration: maxpower=50mA speed=2Mbit/s

This, UNCLAIMED, indicates that the ISP is not seen by the rest of your Linux installation

target doesn't answer

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.
Error while burning bootloader.

The ATmega328p is probably defective
The sketch compiled fine. When program the sketch and you get

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.
processing.app.SerialException: Error opening serial port '/dev/ttyACM0'.
at processing.app.Serial.<init>(Serial.java:127)
at processing.app.Serial.<init>(Serial.java:71)
at processing.app.SerialMonitor$3.<init>(SerialMonitor.java:93)
at processing.app.SerialMonitor.open(SerialMonitor.java:93)
at processing.app.AbstractMonitor.resume(AbstractMonitor.java:220)
at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2431)
at processing.app.Editor.access$3200(Editor.java:71)
at processing.app.Editor$DefaultExportAppHandler.run(Editor.java:2477)
at java.lang.Thread.run(Thread.java:745)
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort();
Exception type -
Port not found.
at jssc.SerialPort.openPort(SerialPort.java:167)
at processing.app.Serial.<init>(Serial.java:123)
... 8 more
Error opening serial port '/dev/ttyACM0'.  

The ATmega328p is probably defective

If you get

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.
Board at /dev/ttyACM0 is not available

The ATmega328p is probably defective. The fact that Board at /dev/ttyACM0 is not available is mentioned does not count because with a good ATmega328p there is no issue, the programmings goes as expected.

If things go not as expected

Check and reconnect

  • Check if all pins off the ATmega328p are correctly in the socket
  • Disconnect the Arduino wait 20 seconds and reconnect it

Restart the PC

  • Turn off / disconnect the arduino
  • Turn off the PC
  • Disconnect the PC from the mains
  • Press the power button of the PC
  • Wait a minute
  • Turn on the PC and start over again

USBasp v2-0 warning cannot set sck period


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
arduino_programmers_errors.txt · Last modified: 11-10-2023 21:53 by wim