Hello
I am using arduino IDE 2.3.6 with an serial to usb adapter, and I upload a sketch to an Atmega 8A via usb to serial, using minicore.
After a reboot, the very first upload from Arduino IDE works fine :
...
Sketch uses 498 bytes (6%) of program storage space. Maximum is 7808 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 1015 bytes for local variables. Maximum is 1024 bytes.
"C:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/bin/avrdude" "-CC:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/etc/avrdude.conf" -v -V -patmega8 -curclock -PCOM8 -b38400 -D -xnometadata "-Ueeprom:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.eep:i" "-Uflash:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.hex:i"
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf
Using port : COM8
Using programmer : urclock
Setting baud rate : 38400
AVR part : ATmega8
Programming modes : SPM, ISP, HVPP
Programmer type : Urclock
Description : Urboot bootloaders using urprotocol
Protocol : Urprotocol
AVR device initialized and ready to accept instructions
Device signature = 1E 93 07 (ATmega8, ATmega8A)
Processing -U eeprom:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.eep:i
Warning: no eeprom data found in Intel Hex file C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.eep
Reading 0 bytes for eeprom from input file sketch_jun9a.ino.eep
in 0 sections of [0, -1]: 0 pages and 0 pad bytes
Writing 0 bytes to eeprom
Writing | ################################################## | 100% 0.00s
0 bytes of eeprom written
Processing -U flash:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.hex:i
Reading 498 bytes for flash from input file sketch_jun9a.ino.hex
in 1 section [0, 0x1f1]: 8 pages and 14 pad bytes
Preparing flash input for device bootloader
576 bytes in 2 sections of [0, 0x1e7f]: 9 pages and 0 pad bytes
Writing 576 bytes to flash
Writing | ################################################## | 100% 0.29s
576 bytes of flash written
Avrdude done. Thank you.
Afterwards, every later upload via Arduino IDE fails with a Access denied
for the COM port :
...
Sketch uses 498 bytes (6%) of program storage space. Maximum is 7808 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 1015 bytes for local variables. Maximum is 1024 bytes.
"C:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/bin/avrdude" "-CC:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/etc/avrdude.conf" -v -V -patmega8 -curclock -PCOM8 -b38400 -D -xnometadata "-Ueeprom:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.eep:i" "-Uflash:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.hex:i"
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf
Using port : COM8
Using programmer : urclock
Setting baud rate : 38400
Error: cannot open port \\.\COM8: Acc�s refus�.
Error: unable to open port COM8 for programmer urclock
Avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
It keeps the same “failing” behaviour :
- if i exit and reopen Ardnuio IDE
- if i plug/unplug the FTDI adapter
- if i do both
But when Arduino IDE is closed, if i try to upload using the provided avrdude command in a simple powershell interpreter, it "always" succeeds (i.e. i haven't had a failure so far) :
PS C:\Users\xxxxx> C:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\bin\avrdude.exe "-CC:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/etc/avrdude.conf" -v -V -patmega8 -curclock -PCOM8 -b38400 -D -xnometadata "-Ueeprom:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.eep:i" "-Uflash:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.hex:i"
Avrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf
Using port : COM8
Using programmer : urclock
Setting baud rate : 38400
AVR part : ATmega8
Programming modes : SPM, ISP, HVPP
Programmer type : Urclock
Description : Urboot bootloaders using urprotocol
Protocol : Urprotocol
AVR device initialized and ready to accept instructions
Device signature = 1E 93 07 (ATmega8, ATmega8A)
Processing -U eeprom:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.eep:i
Warning: no eeprom data found in Intel Hex file C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.eep
Reading 0 bytes for eeprom from input file sketch_jun9a.ino.eep
in 0 sections of [0, -1]: 0 pages and 0 pad bytes
Writing 0 bytes to eeprom
Writing | ################################################## | 100% 0.00 s
0 bytes of eeprom written
Processing -U flash:w:C:\Users\xxxxx\AppData\Local\arduino\sketches\F1FF9E2869FA78A714464DCEDC676C99/sketch_jun9a.ino.hex:i
Reading 498 bytes for flash from input file sketch_jun9a.ino.hex
in 1 section [0, 0x1f1]: 8 pages and 14 pad bytes
Preparing flash input for device bootloader
576 bytes in 2 sections of [0, 0x1e7f]: 9 pages and 0 pad bytes
Writing 576 bytes to flash
Writing | ################################################## | 100% 0.27 s
576 bytes of flash written
Avrdude done. Thank you.
Yet, if i reopen Arduino IDE, and try re-uploading again, i get the same failures :
vrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\xxxxx\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf
Using port : COM8
Using programmer : urclock
Setting baud rate : 38400
Error: cannot open port \\.\COM8: Acc�s refus�.
Error: unable to open port COM8 for programmer urclock
Avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
The only thing that solved the issue in Arduino IDE is when i perform a reboot
After rebooting, it works again in Arduino IDE, but just 1 single time, after it fails again (in IDE)
My computer and hardware setup :
- Windows
- 11 Familly
- version 24H2 build 26100.6584
- Windows pack 1000.26100.234.0
- FTDI device
- FT232RL
- version 2.12.36.20 from 28/10/2024
- service FTSER2K
It seems to me that Arduino IDE is internally keeping an opened "something" to the COM port after the first upload, and is not releasing it (except on exit).
What could be the problem and what steps should i take to either help diagnose, or solve it ?
Thanks in advance