tests/subsys/dfu/mcuboot: support mcuboot max alignment
MCUboot support flash write-bock-size up to BOOT_MAX_ALIGN. This patch takes this into account. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
parent
049dac2a8a
commit
d9c308cce9
|
@ -95,10 +95,13 @@ void test_write_confirm(void)
|
|||
{
|
||||
const uint32_t img_magic[4] = BOOT_MAGIC_VALUES;
|
||||
uint32_t readout[ARRAY_SIZE(img_magic)];
|
||||
const uint32_t flag = 0xffffff01;
|
||||
uint8_t flag[BOOT_MAX_ALIGN];
|
||||
const struct flash_area *fa;
|
||||
int ret;
|
||||
|
||||
flag[0] = 0x01;
|
||||
memset(&flag[1], 0xff, sizeof(flag) - 1);
|
||||
|
||||
ret = flash_area_open(FLASH_AREA_ID(image_0), &fa);
|
||||
if (ret) {
|
||||
printf("Flash driver was not found!\n");
|
||||
|
|
Loading…
Reference in a new issue