CertDO bug fixes

This commit is contained in:
NIIBE Yutaka
2012-06-04 18:13:35 +09:00
parent f73634d17c
commit 1164ac4d28
4 changed files with 28 additions and 11 deletions

View File

@@ -476,7 +476,6 @@ flash_cnt123_clear (const uint8_t **addr_p)
#if defined(CERTDO_SUPPORT)
#define FLASH_CH_CERTIFICATE_SIZE 2048
int
flash_erase_binary (uint8_t file_id)
{
@@ -534,7 +533,7 @@ flash_write_binary (uint8_t file_id, const uint8_t *data,
uint32_t addr;
int i;
if (flash_check_blank (p, len) == 0)
if (flash_check_blank (p + offset, len) == 0)
return -1;
addr = (uint32_t)p + offset;

View File

@@ -149,6 +149,8 @@ extern void flash_reset_counter (uint8_t counter_tag_nr);
extern int flash_erase_binary (uint8_t file_id);
extern int flash_write_binary (uint8_t file_id, const uint8_t *data, uint16_t len, uint16_t offset);
#define FLASH_CH_CERTIFICATE_SIZE 2048
/* Linker set these two symbols */
extern uint8_t ch_certificate_start;
extern uint8_t random_bits_start;