diff --git a/litex/soc/software/libfatfs/ff.h b/litex/soc/software/libfatfs/ff.h index 522504164..d9823aa16 100644 --- a/litex/soc/software/libfatfs/ff.h +++ b/litex/soc/software/libfatfs/ff.h @@ -172,7 +172,7 @@ typedef struct { LBA_t bitbase; /* Allocation bitmap base sector */ #endif LBA_t winsect; /* Current sector appearing in the win[] */ - BYTE win[FF_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg) */ + BYTE win[FF_MAX_SS] __attribute__ ((aligned (4))); /* Disk access window for Directory, FAT (and file data at tiny cfg) */ } FATFS; @@ -217,7 +217,7 @@ typedef struct { DWORD* cltbl; /* Pointer to the cluster link map table (nulled on open, set by application) */ #endif #if !FF_FS_TINY - BYTE buf[FF_MAX_SS]; /* File private data read/write window */ + BYTE buf[FF_MAX_SS] __attribute__ ((aligned (4))); /* File private data read/write window */ #endif } FIL;