Skip to main content
clock.1166
Senior
Oct 7, 2021 5:38 PM UTC
Solved

Build error in CubeIDE. fatal error: lwipopts.h: No such file or directory

Hi

I cannot understand why my opt.h file cannot see the lwipopts.h file in the same folder.

Presumably, it must be something to do with the 'Wno-stringop-overflow' warning.

This contains a very long string -

 -mcpu=cortex-m7 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DSTM32H743xxDUSE_STM32H7XX_NUCLEO_144_MB1364 -c -I../../../Src -I"D:/halfcontainer/projects/cubeideN/LwIP_HTTP_Server_Netconn_RTOS/SW4STM32/STM32H743ZI_Nucleo/Middlewares/LwIP" -I../../../Drivers.......+ about 200 chars-

Can anyone tell me how to find out whats happening?

Trying to look back at sys_arch.c is a bit frightening! (To me at least)

Thanks,

Chris

18:12:19 **** Incremental Build of configuration Debug for project LwIP_HTTP_Server_Netconn_RTOS ****

make all

arm-none-eabi-gcc -Wno-stringop-overflow "../Middlewares/Third_Party/LwIP/system/OS/sys_arch.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DSTM32H743xx -DUSE_STM32H7XX_NUCLEO_144_MB1364 -c -I../../../Src -I"D:/halfcontainer/projects/cubeideN/LwIP_HTTP_Server_Netconn_RTOS/SW4STM32/STM32H743ZI_Nucleo/Middlewares/LwIP" -I../../../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../../Drivers/STM32H7xx_HAL_Driver/Inc -I../../../Drivers/BSP/STM32H7xx_Nucleo -I../../../Drivers/BSP/Components/Common -I../../../Drivers/BSP/Components -I../../../Middlewares/Third_Party/LwIP/src/include -I../../../Middlewares/Third_Party/LwIP/system -I../../../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../../../Middlewares/Third_Party/FreeRTOS/Source -I../../../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../../../Middlewares/Third_Party/FreeRTOS/Source/include -I../../../Utilities -I../../../Drivers/CMSIS/Include -Os -ffunction-sections -Wall -fstack-usage -MMD -MP -MF"Middlewares/Third_Party/LwIP/system/OS/sys_arch.d" -MT"Middlewares/Third_Party/LwIP/system/OS/sys_arch.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Middlewares/Third_Party/LwIP/system/OS/sys_arch.o"

In file included from ../../../Middlewares/Third_Party/LwIP/src/include/lwip/debug.h:41,

                from ../Middlewares/Third_Party/LwIP/system/OS/sys_arch.c:34:

../../../Middlewares/Third_Party/LwIP/src/include/lwip/opt.h:51:10: fatal error: lwipopts.h: No such file or directory

  51 | #include "lwipopts.h"

     |         ^~~~~~~~~~~~

compilation terminated.

make: *** [Middlewares/Third_Party/LwIP/system/OS/subdir.mk:19: Middlewares/Third_Party/LwIP/system/OS/sys_arch.o] Error 1

"make all" terminated with exit code 2. Build might be incomplete.

18:12:25 Build Failed. 2 errors, 0 warnings. (took 5s.573ms)

This topic has been closed for replies.
Imen.DBest answer
ST Technical Moderator
Oct 26, 2021 10:33 AM UTC

Hello @clock.1166​ ,

Go to Project options ->C/C++ tab->Include paths and add new paths to your include directories.

I advise you to review this FAQ: How to create project for STM32H7 with Ethernet and LwIP stack working.

When your question is answered, please close this topic by choosing Select as Best.

If you still have issues, don't hesitate to come back to the Community.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks

4 replies

Imen.DBest answer
ST Technical Moderator
Oct 26, 2021 10:33 AM UTC

Hello @clock.1166​ ,

Go to Project options ->C/C++ tab->Include paths and add new paths to your include directories.

I advise you to review this FAQ: How to create project for STM32H7 with Ethernet and LwIP stack working.

When your question is answered, please close this topic by choosing Select as Best.

If you still have issues, don't hesitate to come back to the Community.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
ST Technical Moderator
Nov 1, 2021 9:03 AM UTC

Hi @clock.1166​ ,

Were you able to resolve the issue you described here?

If yes, it will be interesting to share with us the solution you found and marked the best answer to close this post.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
clock.1166
Senior
Nov 1, 2021 9:21 AM UTC
Hi Imen,
Sorry, I am a bit late in replying. I have a million jobs on at the moment.
I will get back to it soon.
Regards,
Chris
clock.1166
Senior
Nov 17, 2021 1:18 PM UTC

Yes Thanks. That did the problem!