Free (GPLv2) TCP/IP stack developed by TASS Belgium

Dependents:   lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more

Issue: Compiler error with GCC ARM embedded: '__packed' does not name a type (Closed: Fixed)

I get the following compiler errors with GCC ARM embedded:

lpc1768-picotcp-eth/pico_dev_mbed_emac.cpp:36:1: error: '__packed' does not name a type

lpc1768-picotcp-eth/pico_dev_mbed_emac.cpp:42:1: error: '__packed' does not name a type

lpc1768-picotcp-eth/pico_dev_mbed_emac.cpp:48:1: error: '__packed' does not name a type

lpc1768-picotcp-eth/pico_dev_mbed_emac.cpp:54:1: error: '__packed' does not name a type

lpc1768-picotcp-eth/pico_dev_mbed_emac.cpp:60:1: error: '__packed' does not name a type

This is caused by lines like (lpc1768-picotcp-eth/pico_dev_mbed_emac.cpp):

__packed struct RX_DESC_TypeDef {                        /* RX Descriptor struct              */

'_packed' seems to be a compiler specific feature for ARMCC
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/CJAFJHJD.html

It should be changed to 'struct attribute((packed))' to fix the error, the line becomes:

struct __attribute__((packed)) RX_DESC_TypeDef {                        /* RX Descriptor struct              */


GCC version:
gcc version 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601] (GNU Tools for ARM Embedded Processors)


Wim Leflere

1 comment:

28 Nov 2013