Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


stm32f4discovery + lwip

I’m trying to build empty project for stm32f4discocery with lwip. Every time when i try to build project i get error ” lwip/opt.h no such file or directory” for different c file.

Is there any solution to this ?

France

Hi,
The System Workbench support of lwIP is still partial and you will have to make several adjustments to the generated project.

Correct the include path

You should add (in project >> Properties >> C/C++ General >> Paths and Symbols and for all languages and configurations) a workspace include path to the directory, in the library project, that includes the lwip directory header files are located, that is something like /stm32f4discovery_hal_lib/Middlewares/Third_Party/LwIP/src/include.

You must also include LwIP/src/systemand either LwIP/src/core/ipv4 or LwIP/src/core/ipv6 (but not both__, this is currently not supported by LwIP).

You must do that both in the library project itself and in the application project.

Exclude unneeded source code

You must exclude the LwIP/test and LwIP/system/OS directories (or noOS if you use FreeRTOS too) from the build of the library, by directory >> Properties >> C/C++ Build then check Exclude resource from build; also exclude LwIP/src/netif/ethernetif_template.c as this file could not compile correctly without being completed...

You must also exclude either LwIP/src/core/ipv4 or LwIP/src/core/ipv6 from the build, depending on the protocol you want to use (remember you can’t use both...)

You should also exclude either system/OS or system/noOS from the include search path

Provide the LwIP configuration file

You have to provide an lwipopts.h file, in LwIP/include, to configure which options you need in LwIP; you can get samples either from the LwIP/test/unit directory or some samples provided by ST (however these usually also include FreeRTOS, so you will have to simplyfy them if you don’t).

Provide a network interface

You can either create an ethernet interface from scratch (starting from LwIP/src/netif/ethernetif_template.c or copy an ethernetif.c file from one of the ST-provided demos for your board.

  • For example you have a FreeRTOS-based version in Projects/STM324xG_EVAL/Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS and a noOS version in Projects/STM324xG_EVAL/Applications/LwIP/LwIP_HTTP_Server_Raw; these are supporting an STM324xG-EVAL board, so you may have to correct a few interface setups (like pin multiplexing).

  • This file should be placed in your application project, as you may have to configure the interface specially for your needs.


If you want to use a PPP interface (there is no ETH port on the stm32f’discovery) you will probably have to twiddle the lwipopts.h file, look at the code in src/netif/ppp and LwIP documentation as I don’t think there is any ST-provided example of using LwIP with PPP...

Compile and debug

The result should compile cleanly but, as usual, YMMV...

Hi,

Thank you for detiled answer. I ‘ve created proj with HALdrivers, selected add low level drivers, as source in the app proj, and enabled lwip lib,
deleted include paths for ipv6, OS,ppp , test and excluded from build ipv6, os , test and ppp. I still have fatal error: lwip/opt.h: No such file or directory.

p.s. I had to change path variable to avoid Application was not properly initialized (0xc0000142). error. And i’m using CDT internal builder.

I’ve attached projet settings file.

For information, the exclude path has changed :

directory >> Properties >> C/C++ General >> Source Location (tab)


France

Hi,

In Paths and Symbols, there is two paths that you have to correct: You should eliminate the lwip last path element from Middlewares/LwIP/src/include/ipv4/lwip and Middlewares/LwIP/src/include/lwip to get the paths I asked you to add in my post (Middlewares/LwIP/src/include/ipv4 and Middlewares/LwIP/src/include); lwip/opt.h is located in Middlewares/LwIP/src/include so, if you put lwip in the include path, it will not find it...

Bernard

Hi,
I’ve forgot to correct those paths.
Everything compiles now.
Thank you for your help.

Luka


I’m also having trouble to compile the same for f429 with lwip stack.
Getting the same error fatal error: lwip/opt.h: No such file or directory but i think paths are ok.
Bellow paths for lwip.
${ProjDirPath}/Middlewares/Third_Party/LwIP/doc/doxygen
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/apps/httpd
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/apps/snmp
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/include/lwip
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/include/lwip/apps
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/include/lwip/priv
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/include/netif
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/include/netif/ppp
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/include/netif/ppp/polarssl
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/include/posix
${ProjDirPath}/Middlewares/Third_Party/LwIP/src/include/posix/sys
${ProjDirPath}/Middlewares/Third_Party/LwIP/system/arch
${ProjDirPath}/Middlewares/Third_Party/LwIP/system/noOS
${ProjDirPath}/Middlewares/Third_Party/LwIP/system/OS
${ProjDirPath}/Middlewares/Third_Party/LwIP/test/unit/core
${ProjDirPath}/Middlewares/Third_Party/LwIP/test/unit/dhcp
${ProjDirPath}/Middlewares/Third_Party/LwIP/test/unit/etharp
${ProjDirPath}/Middlewares/Third_Party/LwIP/test/unit
${ProjDirPath}/Middlewares/Third_Party/LwIP/test/unit/tcp
${ProjDirPath}/Middlewares/Third_Party/LwIP/test/unit/udp

Also when i press open declaration on #include “lwip/opt.h” i get pointed succesfully to the file.

United States

I have installed/downloaded/compiled and get this error as well.

>> papadkostas on 2016-11-08 Posted almost a year ago.

Is there no soulition for this or have I missed something that is not documented.