lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] lwip-1.4.1 based on ADS IDE(RVDS2.2) compile failed


From: 薛佳元
Subject: [lwip-devel] lwip-1.4.1 based on ADS IDE(RVDS2.2) compile failed
Date: Fri, 2 Aug 2013 18:04:55 +0800 (CST)

Dear Sir:
          I am a LWIP  primary programmer.
          now,my project situation as below:
          uc/os-II(2.86)  + lwip(1.4.1 table) + RVDS2.2(armcc  IDE:ADS) + s3c6410
         
          case 1:
          in cc.h
           #define PACK_STRUCT_FIELD(x)   x __attribute__((packed))
           #define PACK_STRUCT_STRUCT   __attribute__((packed))
           #define PACK_STRUCT_BEGIN
           #define PACK_STRUCT_END
           compile pass!
                      I am so happy,  but "__attribute__((packed))" is the standard usage under GUN CC,my compiler is ARMCC.
           so I have to change to case 2.
 
          case 2:
          in cc.h 
          #define PACK_STRUCT_FIELD(x)  __packed x
          #define PACK_STRUCT_STRUCT   
          #define PACK_STRUCT_BEGIN   __packed
          #define PACK_STRUCT_END
           this time compile failed as follow:
           argument of type "const __packed u8_t *" is incompatible with parameter of type "const void *"            
 
           I track the code stop at etharp.c  line 1340: 
           "} else if (eth_addr_cmp(&ethhdr->dest, &ethbroadcast)) {"       
          and #define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETHARP_HWADDR_LEN) == 0)
          I think I found the problem :
          prototype: int memcmp(constvoid*buf1,constvoid*buf2,unsignedintcount);
          but  &ethhdr->dest  and  &ethbroadcast   have something redundant"__packed"
 
          the problem is I should not modify your source code, so give me a solution please,I would appreciate so much!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]