AVR-ISP-MKII flashing firmware on linux does not work

Started by ch33f, June 09, 2015, 10:08:16 PM

Previous topic - Next topic

ch33f

Hi there,
wanted to flash the avr-dude firmware on my brand new avr-isp-mkii.

This is the commandline I use (as root): dfu-programmer at90usb162 flash --debug 99 libUSB-AVRISP-MKII.hex
This is the output:
     target: at90usb162
    chip_id: 0x2ffa
  vendor_id: 0x03eb
    command: flash
      quiet: false
      debug: 99
device_type: AVR
------ command specific below ------
   validate: true
   hex file: libUSB-AVRISP-MKII.hex

atmel.c:1295: atmel_flash( 0x7ffc39bc3980, 0x7ffc39bc3880, false, false )
atmel.c:1158: atmel_flash_prep_buffer( 0x7ffc39bc3880 )
atmel.c:1335: Flash available from 0x0 to 0x2FFF (64kB p. 0 to 0), 0x3000 bytes.
atmel.c:1339: Data start @ 0x0: 64kB p 0; 128B p 0x0 + 0x0 offset.
atmel.c:1343: Data end @ 0x287F: 64kB p 0; 128B p 0x50 + 0x7F offset.
atmel.c:1348: Totals: 0x2880 bytes, 81 128B pages, 1 64kB byte pages.
atmel.c:934: atmel_blank_check( 0x7ffc39bc3980, 0x00000000, 0x0000287F )
atmel.c:1041: atmel_select_memory_unit( 0x7ffc39bc3980, 0 )
atmel.c:1055: Ignore Select Memory Unit for non GRP_AVR32 device.
Checking memory from 0x0 to 0x287F... 
atmel.c:1100: atmel_select_page( 0x7ffc39bc3980, 0 )
atmel.c:1114: Selecting page 0, address 0x0.
atmel.c:867: __atmel_blank_page_check( 0x7ffc39bc3980, 0x00000000, 0x0000287f )
atmel.c:902: Region is NOT bank.
atmel.c:910:  First non-blank address in region is 0x0.
atmel.c:981: Flash NOT blank beginning at 0x0.
Not blank at 0x1.
The target memory for the program is not blank.
Use --force flag to override this error check.
atmel.c:1368: The target memory is not blank.
commands.c:342: Error writing memory data. (err -1)


If I use --force, as suggested by dfu-programmer I get this:
     target: at90usb162
    chip_id: 0x2ffa
  vendor_id: 0x03eb
    command: flash
      quiet: false
      debug: 99
device_type: AVR
------ command specific below ------
   validate: true
   hex file: libUSB-AVRISP-MKII.hex

atmel.c:1295: atmel_flash( 0x7ffdf9e25bf0, 0x7ffdf9e25af0, false, false )
atmel.c:1158: atmel_flash_prep_buffer( 0x7ffdf9e25af0 )
atmel.c:1335: Flash available from 0x0 to 0x2FFF (64kB p. 0 to 0), 0x3000 bytes.
atmel.c:1339: Data start @ 0x0: 64kB p 0; 128B p 0x0 + 0x0 offset.
atmel.c:1343: Data end @ 0x287F: 64kB p 0; 128B p 0x50 + 0x7F offset.
atmel.c:1348: Totals: 0x2880 bytes, 81 128B pages, 1 64kB byte pages.
atmel.c:1041: atmel_select_memory_unit( 0x7ffdf9e25bf0, 0 )
atmel.c:1055: Ignore Select Memory Unit for non GRP_AVR32 device.
Programming 0x2880 bytes...
atmel.c:1100: atmel_select_page( 0x7ffdf9e25bf0, 0 )
atmel.c:1114: Selecting page 0, address 0x0.
atmel.c:1431: Program data block: 0x0 to 0x3FF (p. 0), 0x400 bytes.
atmel.c:1566: __atmel_flash_block( 0x7ffdf9e25bf0, 0x7ffdf9e25af0, false )
atmel.c:1528: atmel_flash_populate_header( 0x7ffdf9e255c0, 0x0, 0x3FF, false )
atmel.c:1482: atmel_flash_populate_footer( 0x7ffdf9e255c0, 0x7ffdf9e259e0, 65535, 65535, 65535 )
atmel.c:1627: atmel_flash: flash data dfu_download failed.
atmel.c:1629: Expected message length of 1072, got -9.
atmel.c:1434: Error flashing the block: err -2.
ERROR
Memory write error, use debug for more info.
commands.c:342: Error writing memory data. (err -4)



Systeminfo:
archlinux 64-bit (latest version, booting the non-lts kernel)
dfu-programmer v0.7.2 (tried various older versions with the same result)
libusb 1.0.19