‘packed’ attribute ignored for type ‘WORD *’...
Hello friends,
i have working code for LPC1765 built with CrossStudio V2.1, where USB driver uses this construction:
*((__attribute__ ((packed)) WORD *)EP0Buf) = 0;
where EP0Buf is declared like:
BYTE EP0Buf[USB_MAX_PACKET0] __attribute__ ((aligned (4)));
(BYTE is unsigned char and WORD is unsigned short - USB driver is modified from NXP's example).
I moved to CrossStudio V4.8 recently and this code is not working anymore.
After compilation, there is warning:
‘packed’ attribute ignored for type ‘WORD *’ {aka ‘short unsigned int *’} [-Werror=attributes]
and if I set compiler to ignore warnigs or remove this attribute, USB device is not enumerated.
This behavior surprised me and I'm running out of time.
Can you help me?
Thanks in advance.
Pavel
Please sign in to leave a comment.
Comments
3 comments