Bonjour,
Je rebondis sur le post de hbachetti "ARDUINO : problèmes de téléversement " mais je préfère en ouvrir un nouveau car je pense que mon problème est lié à ma config (Linux Mint 20).
Je n'ai n'ai pas de problème pour téléverser via le port USB. En revanche, je n'ai jamais réussi à téléverser via un programmateur
-quelle que soit la carte (Nano pro, Nano Pro Micro, Mega Pro Micro, bluepill, blackpill...)
-quel que soit le programmateur ( USBASP, AVRISP, FDTI)
J'ai déjà passé pas mal de temps sur le sujet, en vain
Par exemple, avec une Mega 2560 Pro Mini et UsbAsp:
-Le chargement via usb fonctionne :
/home/pierre/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/pierre/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cwiring -P/dev/ttyUSB0 -b115200 -D -Uflash:w:/tmp/arduino_build_605932/MEGA-Blink.ino.hex:i
-usbAsp est monté:
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 04f2:b520 Chicony Electronics Co., Ltd HD WebCam
Bus 001 Device 003: ID 04ca:3016 Lite-On Technology Corp.
Bus 001 Device 047: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb
Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 040: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$dmesg
[...]
[161791.072996] usb 1-6: new low-speed USB device number 48 using xhci_hcd
[161791.228345] usb 1-6: New USB device found, idVendor=16c0, idProduct=05dc, bcdDevice= 1.02
[161791.228351] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[161791.228354] usb 1-6: Product: USBasp
[161791.228357] usb 1-6: Manufacturer: www.fischl.de
-Fichier 99-USBasp.rules :
$ cat 99-USBasp.rules
# USBasp - USB programmer for Atmel AVR controllers
SUBSYSTEM=="usb", ATTR{product}=="USBasp", ATTR{idProduct}=="05dc", ATTRS{idVendor}=="16c0", MODE="0666"
-un autre fichier udev (platformio) définit le meme idProduct avec des paramètres différents (aucun conflict?)
$ grep 05dc /etc/udev/rules.d/*
99-platformio-udev.rules:ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
99-USBasp.rules:SUBSYSTEM=="usb", ATTR{product}=="USBasp", ATTR{idProduct}=="05dc", ATTRS{idVendor}=="16c0", MODE="0666"
-ArduinoIDE ne voit pas de port USB associé (grisé: est-ce normal?)
-/dev/ttyUSB0 et -P/dev/ttyACM1 n'ont pas été créés (est-ce normal?)
-Le téléchargement via usbAsp échoue:
- le message final sous-entend que ca sest bien passé, et pourtant non
- le programme précédent (blink) a été effacé
- le nouveau programme n'est pas chargé
- des warnings intermédiaires suggerent de mettre à jour usbAsp mais celui-ci n'a pas évolué depuis 2011
$ /home/pierre/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/pierre/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cusbasp -Pusb -Uflash:w:/tmp/arduino_build_605932/MEGA-Blink.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/pierre/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/home/pierre/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : usbasp
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
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 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 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 : usbasp
Description : USBasp, USBasp - USB programmer for Atmel AVR controllers - fischl.de
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "/tmp/arduino_build_605932/MEGA-Blink.ino.hex"
avrdude: writing flash (2060 bytes):
Writing | ################################################## | 100% 0.70s
avrdude: 2060 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_605932/MEGA-Blink.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_605932/MEGA-Blink.ino.hex:
avrdude: input file /tmp/arduino_build_605932/MEGA-Blink.ino.hex contains 2060 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.60s
avrdude: verifying ...
avrdude: 2060 bytes of flash verified
avrdude done. Thank you.
Des idées????? Merci d'avance.