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 <SimonQian@SimonQian.com>
URL: http://www.SimonQian.com/en/Versaloon
mail: SimonQian@SimonQian.com
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 <SimonQian@SimonQian.com>
URL: http://www.SimonQian.com/en/Versaloon
mail: SimonQian@SimonQian.com
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 <SimonQian@SimonQian.com>
URL: http://www.SimonQian.com/en/Versaloon
mail: SimonQian@SimonQian.com
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.
Passing only the chip name the message change, but the error still the same:
$ sudo vsprog -d2 -cavr32uc3b0256 -I /home/alan/nuttxspace/nuttx/nuttx -o w
VSProg 1.0 svn:
CopyRight(c) 2008-2010 by SimonQian <SimonQian@SimonQian.com>
URL: http://www.SimonQian.com/en/Versaloon
mail: SimonQian@SimonQian.com
Debug: avr32 initialized for avr32uc3b0256.
Error: flash is not defined, please define first.
Error: Fail to check target defined content.
Error: Fail to run command: prepare.
I also tried adding the flash information to avr32.xml:
<chip name="avr32uc3b0256">
<chip_id>0x01EE403F</chip_id>
<program_mode>j</program_mode>
<app_page_num>512</app_page_num>
<app_default>0xFF</app_default>
<app_addr>0x80000000</app_addr>
<app_seg>0</app_seg>
</chip>
But it didn’t help, same flash not defined error.