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


You are viewing a reply to HTTPD Server - fsdata.c issue  

HTTPD Server - fsdata.c issue

France

Hi,

Why do you talk of Linux vs Windows; your problem was clearly not linked to your development platform but to the structure of the code. I just mentioned that #include-ing a “.c” file in another one was quite a bad idea as IDEs will quite often compile all “.c” files, yielding to weird errors like the one you encounter. I just check that this was indeed the case of the lwip httpd server (in fs.c line 42...)

Regarding starting the HTTP server, I don’t really know but the help window of the LWIP_HTTPD configuration option of CubeMX says “Enable HTTPD requires user specific code not yet generated by STM32Cube MX.” so yes it is possible that you need to initialize the HTTPD server manually; the way to do that probably depends on several other parameters:

  • Do you use FreeRTOS or not?
  • Which API have you configured in lwip: the “raw” API, netconn or socket (both requiring FreeRTOS)?

Anyway looking at the code for the http server (in httpd.c) it’s clear you should at least call “httpd_init()” from your main program, just before your main loop.

Moreover, as the httpd server was using the “raw” API, you should call repetitively the “MX_LWIP_Process()” function (defined in “lwip.c”) in your main loop, or received requests will never get passed to th ehttpd server.

Bernard (Ac6)

 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs