Bootloader: fix flash buffer alignment
This commit is contained in:
parent
988d84954b
commit
4ff823078f
@ -31,7 +31,7 @@
|
||||
|
||||
enum filestates { FILE_OK=0, FILE_ERR, FILE_EOF };
|
||||
|
||||
BYTE file_buf[512];
|
||||
BYTE file_buf[512] __attribute__((aligned(4)));
|
||||
FATFS fatfs;
|
||||
FIL file_handle;
|
||||
FRESULT file_res;
|
||||
|
||||
@ -189,7 +189,7 @@ FLASH_RES flash_file(uint8_t *filename) {
|
||||
}
|
||||
DBG_UART uart_putc('w');
|
||||
if((res = iap_ram2flash(flash_addr, file_buf, 512)) != CMD_SUCCESS) {
|
||||
DBG_BL printf("error %ld while writing to address %08lx (sector %d)\n", res, flash_addr, current_sec);
|
||||
DBG_BL printf("error %ld while writing from %08lX to address %08lx (sector %d)\n", res, (uint32_t)file_buf, flash_addr, current_sec);
|
||||
DBG_UART uart_putc('X');
|
||||
return ERR_FLASH;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user