Open Klayflash opened 2 years ago
Hi, sorry for the delayed response.
No plans to support this, since I have neither a use-case nor the hardware for it, but I'll happily merge a pull request if someone is willing to implement it.
I have no experience with RTOS, but from reading a bit of those documents, their coroutine API doesn't look suitable for a Koishi backend implementation. Those coroutines are stackless, whereas Koishi coroutines have their own stacks akin to user-space threads. RTOS Tasks look like a closer fit, assuming the preemption is optional and tasks can yield to each other manually.
It's also possible to implement support for specific instruction set and ABI into the fcontext backend directly in assembly. The concept is fairly simple, you just need a way to manipulate the stack pointer and save/restore a few CPU registers to/from the coroutine stacks. (The ontop
function is currently unused and can be ignored.)
Thanks for the reply.
I've created request on ESP-IDF. So, I think, this ticket can be paused until esp-idf ticket done.
Hello!
Is context switching support planed for ESP32? For example ESP32 DEVKITV1 (ESP-WROOM-32).
I've found following: