write_mem32 needs it to be aligned, and writing extra data is harmless
at this point.
Signed-off-by: Keith Packard <keithp@keithp.com>
};
static const uint8_t loader_code_stm32l0[] = {
};
static const uint8_t loader_code_stm32l0[] = {
};
static const uint8_t loader_code_stm32f4[] = {
};
static const uint8_t loader_code_stm32f4[] = {
}
memcpy(sl->q_buf, loader_code, loader_size);
}
memcpy(sl->q_buf, loader_code, loader_size);
+
+ /* pad to 32-bits */
+ loader_size = (loader_size + 3) & ~3;
+
stlink_write_mem32(sl, sl->sram_base, loader_size);
*addr = sl->sram_base;
stlink_write_mem32(sl, sl->sram_base, loader_size);
*addr = sl->sram_base;