Bootloader: fix flash buffer alignment

This commit is contained in:
Maximilian Rehkopf 2013-10-18 14:37:36 +02:00
parent 988d84954b
commit 4ff823078f
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}