From dfb7a5952fee8a83663a6feddf0770f3e22ca7aa Mon Sep 17 00:00:00 2001 From: Johann Fischer Date: Thu, 9 Dec 2021 10:30:02 +0100 Subject: [PATCH] include: usb: add alignment attribute to macro USBD_CFG_DATA_DEFINE It could be observed on native_posix_64 platform that without alignment attribute the usb_cfg_data structures are placed with a gap or padding in specified RAM section. This breaks the possibility to iterate over the structures. Signed-off-by: Johann Fischer --- include/usb/usb_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/usb/usb_device.h b/include/usb/usb_device.h index 8884c8afbbe..2ee06fc3393 100644 --- a/include/usb/usb_device.h +++ b/include/usb/usb_device.h @@ -68,7 +68,7 @@ extern "C" { * inside usb data section in the RAM. */ #define USBD_CFG_DATA_DEFINE(p, name) \ - static __in_section(usb, data_##p, name) __used + static __in_section(usb, data_##p, name) __used __aligned(4) /************************************************************************* * USB configuration