2020-04-09 08:47 AM
Hello everyone,
I generated a code for having ethernet on stm32f407 discovery board.
I just enabled lwIP and ethernet in cubeMX and nothing more.
when I compiled the generated code in KEIL 5.29 Arm Compiler version5, everything is OK, but when I change compiler to Arm Compiler version6, I got this error. I've got 83 errors because of missing <sys/time.h>
Thanks for you're answers.
../Src/lwip.c(21): warning: In file included from...
../Inc\lwip.h(28): warning: In file included from...
../Middlewares/Third_Party/LwIP/src/include\lwip/opt.h(52): warning: In file included from...
../Middlewares/Third_Party/LwIP/src/include\lwip/debug.h(40): warning: In file included from...
../Middlewares/Third_Party/LwIP/src/include\lwip/arch.h(48): warning: In file included from...
../Middlewares/Third_Party/LwIP/system\arch/cc.h(46): error: 'sys/time.h' file not found
#include <sys/time.h>
^~~~~~~~~~~~
1 error generated.
compiling lwip.c...
../Src/main.c(23): warning: In file included from...
../Inc\lwip.h(28): warning: In file included from...
../Middlewares/Third_Party/LwIP/src/include\lwip/opt.h(52): warning: In file included from...
../Middlewares/Third_Party/LwIP/src/include\lwip/debug.h(40): warning: In file included from...
../Middlewares/Third_Party/LwIP/src/include\lwip/arch.h(48): warning: In file included from...
../Middlewares/Third_Party/LwIP/system\arch/cc.h(46): error: 'sys/time.h' file not found
#include <sys/time.h>
^~~~~~~~~~~~
2020-04-14 03:53 AM
Hi @naser moravej
Could you please share your .ioc file to check the issue.
Please tell me which STM32CubeMX version do you use.
Best regards,
Nesrine
2024-07-01 06:53 PM - edited 2024-07-01 06:55 PM
Refer to HERE for the solution.
#if defined (__GNUC__) && !defined (__CC_ARM) && !(defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))