STM32MP1 support available in SW4STM32

   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 download a short video showcasing this on the ac6-tools website (registration required).

System Workbench for STM32

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

HTTPD Server - fsdata.c issue



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)