[Cryptech Tech] DFU of Alpha bootloader does not work

Paul Selkirk paul at psgd.org
Tue Dec 20 05:17:33 UTC 2016



On 12/19/2016 04:17 PM, Rob Austein wrote:
> At Mon, 19 Dec 2016 14:26:35 +0100, Fredrik Thulin wrote:
>>
>> I suspect (hope) the issue is that you are missing this commit in your ksng 
>> branch. Try merging masster into the branch or cherry-picking this commit:
>>
>> commit ae8ebceb7c47d38949a92a2f495c990e772d4e51
>> Author: Fredrik Thulin <fredrik at thulin.net>
>> Date:   Mon Aug 15 15:24:50 2016 +0200
>>
>>     cli_receive_data: re-enable UART DMA before returning
>>     
>>     Bugfix after new port of libcli where this enabling doesn't happen after
>>     every command anymore.
> 
> Sorry, no.  That commit predates the sw/stm32 ksng branch, so ksng
> already had it.  For completeness, I merged master => ksng in both
> sw/stm32 and sw/libhal so that ksng would be fully up-to-date with
> respect to master, then pushed the result and re-tested.  No change.

Umm, that commit is only for the cli-test project, and we're talking
about the hsm project. (We'll leave aside for the moment the question of
why the cli-test project still exists.)

Applying the patch to the hsm project works, in the sense that it
returns to the CLI. It doesn't reboot the board (unlike DFU on the hsm
firmware), but that can be solved by adding a reboot command to the
upload script.

However, the biggest, realest problem is that the board doesn't actually
work after uploading the new bootloader. Programming the same bootloader
via ST-LINK does work, so it's not a build error. So either the
flash-writing code has the wrong address (it doesn't look like it, but I
haven't verified it), or the flash-writing code is somehow Wrong. More
debugging required.

				paul




More information about the Tech mailing list