Merge pull request #71 from fanoush/patch-1

fix for issue #70
This commit is contained in:
hathach 2019-06-05 12:17:13 +07:00 committed by GitHub
commit 580ae2e7fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -817,6 +817,9 @@ uint32_t dfu_sd_image_validate(void)
uint32_t image_end = bootloader_settings.sd_image_start +
bootloader_settings.sd_image_size;
/* ##### FIX START ##### */
block_size &= ~(uint32_t)(CODE_PAGE_SIZE - 1);
/* ##### FIX END ##### */
uint32_t img_block_start = bootloader_settings.sd_image_start + 2 * block_size;
uint32_t sd_block_start = sd_start + 2 * block_size;

View File

@ -790,6 +790,9 @@ uint32_t dfu_sd_image_validate(void)
uint32_t image_end = bootloader_settings.sd_image_start +
bootloader_settings.sd_image_size;
/* ##### FIX START ##### */
block_size &= ~(uint32_t)(CODE_PAGE_SIZE - 1);
/* ##### FIX END ##### */
uint32_t img_block_start = bootloader_settings.sd_image_start + 2 * block_size;
uint32_t sd_block_start = sd_start + 2 * block_size;