I’m trying to use versaloon programmer and its vsprog tool to flash a firmware in the AT32UC3B0256 microcontroller.

The first I had to remove some conditional compilation from vsprog source code to compile with support to AVR32 (it is a bad signal, probably because it is not well supported).

Let see if our device is supported:

$ vsprog -Savr32
VSProg 1.0 svn:
CopyRight(c) 2008-2010 by SimonQian <[email protected]>

URL: http://www.SimonQian.com/en/Versaloon
mail: [email protected]

Support list of avr32(AX):
avr32: id = 0x0, mode = j:JTAG(F), area = f1
avr32uc3b0512: id = 0x205003F, mode = j, area = f1
avr32uc3b1512: id = 0x205203F, mode = j, area = f1
avr32uc3b0256: id = 0x1EE403F, mode = j, area = f1
avr32uc3b1256: id = 0x1EE503F, mode = j, area = f1
avr32uc3b0128: id = 0x1EE603F, mode = j, area = f1
avr32uc3b1128: id = 0x1EE903F, mode = j, area = f1
avr32uc3b064: id = 0x1EEA03F, mode = j, area = f1
avr32uc3b164: id = 0x1EEB03F, mode = j, area = f1
avr32uc3a0512: id = 0x1EDC03F, mode = j, area = f1
avr32uc3a1512: id = 0x1EDD03F, mode = j, area = f1
avr32uc3a0256: id = 0x1EDF03F, mode = j, area = f1
avr32uc3a1256: id = 0x1EE003F, mode = j, area = f1
avr32uc3a0128: id = 0x1EE203F, mode = j, area = f1
avr32uc3a1128: id = 0x1EE303F, mode = j, area = f1

Good, it is supported! Then I tried to flash using the ELF file:

$ sudo vsprog -d2 -savr32 -cavr32uc3b0256 -I nuttx -o w
VSProg 1.0 svn:
CopyRight(c) 2008-2010 by SimonQian <[email protected]>

URL: http://www.SimonQian.com/en/Versaloon
mail: [email protected]

Debug:  avr32 initialized.
Debug:  avr32 initialized.
Error:  flash is not defined, please define first.
Error:  Fail to check target defined content.
Error:  Fail to run command: prepare.

Then I decided to use the nuttx.bin:

$ sudo vsprog -d2 -savr32 -cavr32uc3b0256 -I nuttx.bin -o w
VSProg 1.0 svn:
CopyRight(c) 2008-2010 by SimonQian <[email protected]>

URL: http://www.SimonQian.com/en/Versaloon
mail: [email protected]

Debug:  avr32 initialized.
Debug:  avr32 initialized.
Error:  Fail to parse input file nuttx.bin.
Error:  Fail to initialize target data.
Error:  Fail to run command: prepare.

Probably this raw binary is not supported.