Store version in the bootloader. Debug code.

This commit is contained in:
Szczepan Zalega
2019-08-24 08:51:17 +02:00
parent 7fddd58704
commit cb13fb65de
5 changed files with 30 additions and 1 deletions

View File

@@ -1712,8 +1712,14 @@ static void ctap_state_init()
ctap_reset_rk();
}
#include "version.h"
void ctap_init()
{
printf1(TAG_ERR,"Current firmware version address: %p\r\n", &firmware_version);
printf1(TAG_ERR,"Current firmware version: %d.%d.%d.%d (%02x.%02x.%02x.%02x)\r\n",
firmware_version.major, firmware_version.minor, firmware_version.patch, firmware_version.reserved,
firmware_version.major, firmware_version.minor, firmware_version.patch, firmware_version.reserved
);
crypto_ecc256_init();
authenticator_read_state(&STATE);