Building LwIP from a CubeMX project
I have a CubeMX project which uses LwIP. I have to make some changes to get it to compile. I would like to get confirmation from the community that these changes are correct, and also capture these changes for anyone else who might see this problem.
I am using Linux Ubuntu (Release: 15.10). I have created a project using CubeMX (Version 4.17.0; STM32Cube_FW_F4_V1.13.0) and imported it into System Workbench (Version: 1.11.0.201610101240).
When I compile I get the following error:
error: redefinition of ‘struct timeval’
To fix this I have done the following:
- Open the LWIP Configuration dialog in the CubeMX project.
- Under the ‘User Constants’ tab, add a constant ‘LWIP_TIMEVAL_PRIVATE’ with value 0.
When I compile I get the following warning:
warning: “BYTE_ORDER” redefined
To fix this I have done the following:
- Open file /Middlewares/Third_Party/LwIP/system/arch/cpu.h
- Comment out ‘#define BYTE_ORDER LITTLE_ENDIAN’