When invoked, the applet fails with the following error:
Applet.qml:95: Error: Could not initialize applet (status: undefined)
To investigate the issue further, I started hacking into the applet source (https://github.com/atmelcorp/atmel-soft ... ash/main.c):
I don't have any jtag interfaces at my disposal, so the debugging is quite slow and painful, however what I find is, the issue appears to be related to some sort of RAM/stack corruption.
The reason for the above error is, the applet crashes during initialisation in handle_cmd_initialize() - code never returns from applet_set_init_params().
One of the debug steps is, I've stubbed out the following functions to return success
Code: Select all
handle_cmd_read_info()
handle_cmd_erase_pages()
handle_cmd_read_pages()
handle_cmd_write_pages()
Code: Select all
Opening serial port 'COM6'
Connection opened.
XXXXXXXXXXXX
args: 0,5,2,8,0
Detected memory size is 536870912 bytes.
XXXXXXXXXXXX
Erased 0 bytes at address 0x00000000 (0.00%)
Erased 0 bytes at address 0x00000000 (0.00%)
Erased 0 bytes at address 0x00000000 (0.00%)
Erased 0 bytes at address 0x00000000 (0.00%)
Erased 0 bytes at address 0x00000000 (0.00%)
...
Thanks
deejay