buglwIP - A Lightweight TCP/IP stack - Bugs: bug #58575, compilation error on ARMCC6

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #58575: compilation error on ARMCC6

Submitter:  Adib <taraben_a>
Submitted:  Mon 15 Jun 2020 01:21:30 PM UTC
   
 
Category:  Platform ports Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Tue 16 Jun 2020 04:50:34 AM UTC, comment #1: 

That patch doesn't match any file we have in our repository. The file "cc.h" is not shipped by us (only for thet unix and win32 example/test ports).

Simon Goldschmidt <goldsimon>
Group administrator
Mon 15 Jun 2020 01:21:30 PM UTC, original submission:  

Hello all,

I am using STM32 on win32 and Keil-MDK and auto generated project using CubeMX.
This comes with lwip 2.1.2

Using the compiler version 6 ARM-CC 6.1.4 clang based compiler, I run into compiler problem.

../Middlewares/Third_Party/LwIP/system\arch/cc.h(46): error: 'sys/time.h' file not found
#include <sys/time.h>
         ^~~~~~~~~~~~

in file cc.h line 44ff
...

>#if defined (_GNUC_) & !defined (__CC_ARM)
>
>#define LWIP_TIMEVAL_PRIVATE 0
>#include <sys/time.h>
>
>#endif

...

The test for compiler is not correct (i assume).
There are other tests in cmsis_compiler.h 33ff
...

>/*
> * Arm Compiler 4/5
> */
>#if   defined ( __CC_ARM )
>  #include "cmsis_armcc.h"
>
>
>/*
> * Arm Compiler 6 (armclang)
> */
>#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
>  #include "cmsis_armclang.h"
>
>
>/*
> * GNU Compiler
> */
>#elif defined ( _GNUC_ )
>  #include "cmsis_gcc.h"

...

I can resolve this error using following patch which applies the test logic of cmsis_compiler.h on that in cc.h

Index: cc.h
===================================================================
--- cc.h (revision 18447)
+++ cc.h (working copy)
@@ -40,7 +40,7 @@
 
 #define LWIP_PROVIDE_ERRNO
 
-#if defined (_GNUC_) & !defined (__CC_ARM)
+#if defined (_GNUC_) && !defined (__CC_ARM) && !(defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
 
 #define LWIP_TIMEVAL_PRIVATE 0
 #include <sys/time.h>


Adib <taraben_a>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #49273:  cc.h.patch added by taraben_a (716B - text/plain - patch that fixes the compiler problem)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by taraben_a (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-16 goldsimon StatusNone Invalid
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2020-06-15 taraben_a Attached File- Added cc.h.patch, #49273

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code