From 22516b256fb59faf77b2e935988fe0ac48fffc4b Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 4 Mar 2020 09:21:37 +0100 Subject: [PATCH] bootloader_support: force alignment of flash_read argument --- components/bootloader_support/src/esp_image_format.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/bootloader_support/src/esp_image_format.c b/components/bootloader_support/src/esp_image_format.c index 933e7cacf..76af18ddf 100644 --- a/components/bootloader_support/src/esp_image_format.c +++ b/components/bootloader_support/src/esp_image_format.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -722,7 +723,7 @@ static esp_err_t verify_checksum(bootloader_sha256_handle_t sha_handle, uint32_t length = (length + 15) & ~15; // Pad to next full 16 byte block // Verify checksum - uint8_t buf[16]; + WORD_ALIGNED_ATTR uint8_t buf[16]; esp_err_t err = bootloader_flash_read(data->start_addr + unpadded_length, buf, length - unpadded_length, true); uint8_t calc = buf[length - unpadded_length - 1]; uint8_t checksum = (checksum_word >> 24)