Hi all, I have an issue programming the Attiny1624 in Ubuntu Linux while it works fine in Windows 11. My setup is the following:
In Ubuntu I can successfully program an Attiny1614 but the programming fails when I try with the attiny1624. In Windows 11, the exact same setup (same Arduino IDE version, same programmer and same megaTinyCore version) can successfully program the attiny1624.
I paste below the output from the Arduino IDE serial console while attempting to program the attiny1624 from the Ubuntu PC. Is this happening to anyone else? I would greatly appreciate if you can help me solving this issue in Ubuntu, I don't really want to have to use Windows :)
Sketch uses 1871 bytes (11%) of program storage space. Maximum is 16384 bytes.
Global variables use 149 bytes (7%) of dynamic memory, leaving 1899 bytes for local variables. Maximum is 2048 bytes.
"/home/user/.arduino15/packages/megaTinyCore/tools/python3/3.7.2-post1/python3" -u "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/prog.py" -t uart -u /dev/ttyUSB0 -b 57600 -d attiny1624 --fuses 0:0b00000000 2:0x02 6:0x04 7:0x00 8:0x00 "-f/home/user/.cache/arduino/sketches/13870171F2DA4C1512A2C5C7DE307E65/Blink_LED.ino.hex" -a write -v
SerialUPDI
UPDI programming for Arduino using a serial adapter
Based on pymcuprog, with significant modifications
By Quentin Bolsee and Spence Konde
Version 1.3.1 - Aug 2025
Using serial port /dev/ttyUSB0 at 57600 baud.
Target: attiny1624
Set fuses: ['0:0b00000000', '2:0x02', '6:0x04', '7:0x00', '8:0x00']
Action: write
File: /home/user/.cache/arduino/sketches/13870171F2DA4C1512A2C5C7DE307E65/Blink_LED.ino.hex
pymcuprog.programmer - INFO - Setting up programming session for 'attiny1624'
pymcuprog.deviceinfo.deviceinfo - INFO - Looking for device attiny1624
pymcuprog.serialupdi.physical - INFO - Opening port '/dev/ttyUSB0' at '57600' baud
pymcuprog.serialupdi.link - INFO - STCS 08 to 0x03
pymcuprog.serialupdi.link - INFO - STCS 06 to 0x02
pymcuprog.serialupdi.link - INFO - LDCS from 0x00
pymcuprog.serialupdi.link - INFO - UPDI init OK
pymcuprog.serialupdi.link - INFO - STCS 06 to 0x02
pymcuprog.serialupdi.link - INFO - Setting UPDI clock to 4 MHz
pymcuprog.serialupdi.link - INFO - STCS 03 to 0x09
pymcuprog.serialupdi.physical - INFO - Switching to '57600' baud
pymcuprog.serialupdi.application - INFO - SIB: 'tinyAVR P:0D:1-3M2 (04.59B0D.0)'
pymcuprog.serialupdi.application - INFO - Device family ID: 'tinyAVR'
pymcuprog.serialupdi.application - INFO - NVM interface: 'P:0'
pymcuprog.serialupdi.application - INFO - Debug interface: 'D:1'
pymcuprog.serialupdi.application - INFO - PDI oscillator: '3M2'
pymcuprog.serialupdi.application - INFO - Extra info: '(04.59B0D.0)'
pymcuprog.serialupdi.application - INFO - Using 16-bit UPDI
pymcuprog.serialupdi.link - INFO - LDCS from 0x00
Traceback (most recent call last):
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/prog.py", line 289, in <module>
pymcuprog.serialupdi.physical - INFO - Closing port '/dev/ttyUSB0'
main()
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/prog.py", line 129, in main
return_code = pymcuprog_basic(args, fuses_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/prog.py", line 200, in pymcuprog_basic
status = pymcu._start_session(backend,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/libs/pymcuprog/pymcuprog_main.py", line 545, in _start_session
backend.start_session(sessionconfig)
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/libs/pymcuprog/backend.py", line 359, in start_session
self.programmer.setup_device(
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/libs/pymcuprog/programmer.py", line 78, in setup_device
self.device_model = get_nvm_access_provider(self.transport,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/libs/pymcuprog/nvm.py", line 42, in get_nvm_access_provider
accessprovider = NvmAccessProviderSerial(transport, device_info, baud=frequency, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/libs/pymcuprog/nvmserialupdi.py", line 59, in __init__
self.avr.read_device_info()
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/libs/pymcuprog/serialupdi/application.py", line 125, in read_device_info
self.logger.info("PDI revision = 0x%02X", self.readwrite.read_cs(constants.UPDI_CS_STATUSA) >> 4)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/libs/pymcuprog/serialupdi/readwrite.py", line 25, in read_cs
return self.datalink.ldcs(address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.arduino15/packages/megaTinyCore/hardware/megaavr/2.6.12/tools/libs/pymcuprog/serialupdi/link.py", line 87, in ldcs
raise PymcuprogError("Unexpected number of bytes in response: "
pymcuprog.pymcuprog_errors.PymcuprogError: Unexpected number of bytes in response: 0 byte(s) expected 1 byte(s)
Failed programming: uploading error: exit status 1
Hi all, I have an issue programming the Attiny1624 in Ubuntu Linux while it works fine in Windows 11. My setup is the following:
In Ubuntu I can successfully program an Attiny1614 but the programming fails when I try with the attiny1624. In Windows 11, the exact same setup (same Arduino IDE version, same programmer and same megaTinyCore version) can successfully program the attiny1624.
I paste below the output from the Arduino IDE serial console while attempting to program the attiny1624 from the Ubuntu PC. Is this happening to anyone else? I would greatly appreciate if you can help me solving this issue in Ubuntu, I don't really want to have to use Windows :)