fs: littlefs: force alignment for buffers

At least one flash driver requires that the source and destination
buffers be word-aligned.  Annotate the synthesized definitions to make
sure this happens.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-04-07 06:13:54 -05:00 committed by Anas Nashif
parent 67d220d5cd
commit 05b072f8d1
1 changed files with 2 additions and 2 deletions

View File

@ -68,8 +68,8 @@ struct fs_littlefs {
* @param lookahead_sz see :option:`CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE`
*/
#define FS_LITTLEFS_DECLARE_CUSTOM_CONFIG(name, read_sz, prog_sz, cache_sz, lookahead_sz) \
static u8_t name ## _read_buffer[cache_sz]; \
static u8_t name ## _prog_buffer[cache_sz]; \
static u8_t __aligned(4) name ## _read_buffer[cache_sz]; \
static u8_t __aligned(4) name ## _prog_buffer[cache_sz]; \
static u32_t name ## _lookahead_buffer[(lookahead_sz) / sizeof(u32_t)]; \
static struct fs_littlefs name = { \
.cfg = { \