Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By cal
#18605 Moin,

maybe there is some misunderstanding about "tie up the CPU for more that 10ms".
I expect that to mean "on CPU level".
If you don't block interrupts the CPU is doing stuff "in parallel", means "in interrupt handlers".

If you don't have very special requirements to block interrupts, stay with the crowd and just code your problem.

Cal
User avatar
By tve
#19658 I started out with the FreeRTOS system but soon got discouraged for the following reasons: (1) lwip is not multi-threaded and so all the threads you may run in FreeRTOS create a boatload of headaches as soon as they need to communicate and the native lwip functions just suck (personal opinion), (2) the espressif SDK has lots of wifi management stuff I don't want to reverse-engineer, and (3) the espressif SDK is being updated rapidly while the FreeRTOS SDK isn't, (4) once I understood that the Espressif SDK basically requires non-blocking comm code I knew what to do, and (5) you can still use timers and schedule call-backs from interrupts within the espressif SDK. If lwip had supported multiple threads nicely I probably would have persevered, but the fact that it doesn't is a total head-scratcher to me. Obviously YMMV!
User avatar
By projectgus
#19787
tve wrote:I started out with the FreeRTOS system but soon got discouraged for the following reasons: (1) lwip is not multi-threaded and so all the threads you may run in FreeRTOS create a boatload of headaches as soon as they need to communicate and the native lwip functions just suck (personal opinion)


FWIW, you only have the single threaded restriction if you use the lwIP raw socket API. If you use the BSD socket API (which is enabled in the iot_rtos_sdk, and also in esp-open-rtos) then this is multithreaded and lwIP should handle the headaches for you.

There is some extra resource overhead in using BSD-style sockets though, which is why the lwIP raw socket API exists in the first place.
User avatar
By esp03madness
#19790 very interesting, thanks for the info tve and projectgus!

Would either of you mind elaborating on:

lwip is not multi-threaded and so all the threads you may run in FreeRTOS create a boatload of headaches as soon as they need to communicate


and how does the use of Berkeley socket API get around these problems?

PS. Wifi management is not part of RTOS SDK?