-
Here is an example of how you can include the lwIP stack for the custom CMake project and the Espressif Wifi port on amazon-freertos: GitHub - yanjos-dev/amazon-freertos-examples at example/lwip_on_esp32
You just need to specify the the-DAFR_ESP_LWIP=1
flag in the cmake command as mentioned on the README file.
I realized that you don’t need to explicitly include the lwip directory path in your project’s CMakeLists file as the Espressif CMakeLists.txt on amazon-freertos gets automatically included when specifying the -DCMAKE_TOOLCHAIN_FILE=amazon-freertos/tools/cmake/toolchains/xtensa-esp32.cmake
configuration in the cmake command.
The passedAFR_ESP_LWIP
flag in the command makes the Espressif CMakeLists.txt file to configure the WiFi library port of Espressif to use the lwIP stack.
However, you would still need theset(COMPONENT_REQUIRES lwip)
dependency in your custom wifi component’s CMakeLists.txt (shown in the example here: https://github.com/yanjos-dev/amazon-freertos-examples/blob/example/lwip_on_esp32/components/common/CMakeLists.txt#L8) if you want to directly include lwIP header files in your custom component source code (like shown in the example component source code here: https://github.com/yanjos-dev/amazon-freertos-examples/blob/example/lwip_on_esp32/components/common/src/common.c#L2) -
The esp http server IDF component exists on the latest version of master on amazon-freertos (See here: https://github.com/aws/amazon-freertos/tree/master/vendors/espressif/esp-idf/components/esp_http_server) that you can consider using for your needs.
Hope the example project helps