Open
Description
Describe the bug
Using ArduinoUpload to upload code to a Uno board whit AVR ISP programmer being chosen registers the following command:
"/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/ttyACM0 -Uflash:w:/home/s4/Arduino/sketches/AS5048A_tester/build/AS5048A_tester.ino.hex:i"
which fails and this is the output:
"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/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/home/s4/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : stk500v1
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 : STK500
Description : Atmel STK500 Version 1.x firmware
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.01s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Error during Upload: Failed programming: uploading error: exit status 1
doing the exact same thing with arduino-cli or the Arduino IDE registers this command:
"/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/arduino_build_521661/AS5048A_tester.ino.hex:i "
which succeeds and this is the output:
"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/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/home/s4/.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 (probably m328p)
avrdude: reading input file "/tmp/arduino_build_521661/AS5048A_tester.ino.hex"
avrdude: writing flash (4120 bytes):
Writing | ################################################## | 100% 0.73s
avrdude: 4120 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_521661/AS5048A_tester.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_521661/AS5048A_tester.ino.hex:
avrdude: input file /tmp/arduino_build_521661/AS5048A_tester.ino.hex contains 4120 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.57s
avrdude: verifying ...
avrdude: 4120 bytes of flash verified
avrdude done. Thank you."
the commands that each produces and the results are different, I have tested other programmer options of the plugin but none of them worked for me. I have also tested using the plugin with g:arduino_use_cli being set and without it
.
System information
- OS: [linux]
- Vim: [neovim v0.6.1]
- Arduino: [Arduino: 1.8.19]
- CLI version: [0.19.3-arch]
- ArduinoInfo: [
Board :arduino:avr:uno
Programmer :avrisp
Port :/dev/ttyACM0
Baud rate :9600
Hardware dirs :/home/s4/.arduino15/packages/arduino/hardware/avr/1.8.4, /home/s4/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31, /home/s4/.arduino15/packages/STMicroelectronics/hardware/stm32/2.1.0
Verify command:arduino-cli compile -b arduino:avr:uno -p /dev/ttyACM0 -P avrisp --build-path "/home/s4/Arduino/sketches/AS5048A_tester/build" -v "/home/s4/Arduino/sketches/AS5048A_tester/AS5048A_tester.ino
"
]
To Reproduce
Steps to reproduce the behavior:
- open a simple arduino sketch in neovim: $
nvim [sketch].ino
- use
AruinoChooseBoard
: Arduino Uno,ArduinoChoosePort
: [your system port],ArduinoChooseProgrammer
: AVR ISP. - use
ArduinoUpload
Expected behavior
Working command
- $
cd /path/to/sketch
- $
arduino-cli board attach arduino:avr:uno [sketch].ino
- $
arduino-cli board attach serial://[port]
- $
arduino-cli compile [sketch].ino
- $
arduino-cli upload -v
alternatively Arduino IDE application also works and produces the same result.
output:
"/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-P/dev/ttyACM0" -b115200 -D "-Uflash:w:/tmp/arduino-sketch-5C77E717031944FF3B6B05CEF0DD445F/AS5048A_tester.ino.hex:i"
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/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/home/s4/.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 (probably m328p)
avrdude: reading input file "/tmp/arduino-sketch-5C77E717031944FF3B6B05CEF0DD445F/AS5048A_tester.ino.hex"
avrdude: writing flash (4120 bytes):
Writing | ################################################## | 100% 0.69s
avrdude: 4120 bytes of flash written
avrdude done. Thank you.
Metadata
Metadata
Assignees
Labels
No labels