Package: arduino-core-avr Version: 1.8.3+dfsg1-1 Severity: important X-Debbugs-Cc: onit...@gmail.com
Dear Maintainer, The Arduino bootloader binaries shipped in Debian cannot be flashed to Arduino devices, because they are too big. I tested only with the Arduino Uno, but others may be affected as well. Trying to flash leads to the following error: $ /usr/bin/avrdude -v -patmega328p -cusbtiny -Uflash:w:/usr/share/arduino/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex:i avrdude: Device signature = 0x1e950f (probably m328p) 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: Using SCK period of 10 usec avrdude: reading input file "/usr/share/arduino/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex" avrdude: ERROR: address 0x8010 out of range at line 33 of /usr/share/arduino/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex avrdude: read from file '/usr/share/arduino/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex' failed Running avr-size on this file returns: avr-size /usr/share/arduino/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex text data bss dec hex filename 0 534 0 534 216 /usr/share/arduino/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex The maximum size for the Arduino Uno bootloader is 512 bytes, at least that's what the boards.txt has configured by default. Larger loaders are possible, but require manual modifications of the fuse bits, the Arduino board configuration and the offsets in the .hex file. Please ensure that this bootloader does not exceed 512 bytes when building the package. It's likely that the increase in size was caused by a recently updated avr-gcc. I don't know if there are any compiler options or patches to reduce the size to less than 512 bytes again. As a workaround, it may be possible to set the start address to 0x7c00 (from 0x7e00) and change the sizes and fuse bits in boards.txt to accommodate the larger bootloader. Thank you. -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (900, 'testing'), (500, 'unstable-debug'), (500, 'testing- debug'), (300, 'unstable'), (1, 'experimental-debug'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.10.0-3-amd64 (SMP w/4 CPU threads) Kernel taint flags: TAINT_USER, TAINT_WARN Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages arduino-core-avr depends on: ii avr-libc 1:2.0.0+Atmel3.6.2-1.1 ii gcc-avr 1:5.4.0+Atmel3.6.2-1+b1 arduino-core-avr recommends no packages. arduino-core-avr suggests no packages. -- no debconf information -- debsums errors found: