Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


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’

The last fix I mentioned (comment out BYTE_ORDER) get overridden on the next code generation from CubeMX. Any suggestions on how to remove this define in a CubeMX friendly way?

Thanks for adding the link to the ST thread. I haven’t needed to include cc.h, but i’ll keep it in mind.

I’m surprised noone else has had the issuew ith BYTE_ORDER. I’ll raise my issue on the ST website and add a link to it here.