cesanta / mongoose

Embedded Web Server
https://mongoose.ws
Other
10.97k stars 2.71k forks source link

Can FreeRTOS_IPInit_Multi function be used properly? #2760

Closed keremzorer closed 3 months ago

keremzorer commented 3 months ago

Environment

Question

My goal is:

I aim to initialize FreeRTOS IP stack using the FreeRTOS_IPInit_Multi function in my project.

My actions were:

  1. Environment Setup: I have integrated Mongoose into my project.
  2. Function Call: I attempted to initialize FreeRTOS IP stack using FreeRTOS_IPInit_Multi function.
  3. Compilation: Could not compile the project due to some errors located in mongoose library.
  4. Execution: I could not run the project on my target hardware.

My expectation was:

I expected the FreeRTOS IP stack to be initialized successfully, allowing for proper networking functionality within my application.

The result I saw:

After running the application without setting the ipconfigIPv4_BACKWARD_COMPATIBLE flag, I encountered errors in certain functions. These errors stem from a conditional check within the codebase:

#if ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 )
    #define sin_addr    sin_address.ulIP_IPv4
#endif

This check seems to be related to backward compatibility with IPv4. However, without the flag set, functions reliant on this conditional fail to execute correctly.

My question is:

Can the FreeRTOS_IPInit_Multi function be used reliably with Mongoose in my current setup? If not, are there any known limitations or specific configurations required for proper usage?

scaprile commented 3 months ago

I don't know what you are doing, why are you doing it, what you want to achieve, nor why did you architect that. There are several examples using FreeRTOS TCP, please follow them to see how we initialize. None of them directly addresses your hardware, so you're on your own. https://github.com/cesanta/mongoose/tree/master/examples/stm32/nucleo-f746zg-make-freertos-tcp (look for 'make-freertos-tcp') If you are a paying customer and need further help, please contact Support as per your contract. Thank you.

keremzorer commented 3 months ago

In your example and also in your last release you are using "FreeRTOS_IPInit" function that is deprecated. When I use newer version of "FreeRTOS_IPInit" function named "FreeRTOS_IPInit_Multi" that is recommended by FreeRTOS your library give errors and could not compile.

Best Regards

scaprile commented 3 months ago

If you look at the Makefile, we use version 10.5.0 https://github.com/cesanta/mongoose/blob/6bb40e6ec96f95bfd36a816b430ea2726fac9d05/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile#L59 If you want to use a different version or change the way we work, then you are on your own.