If you never heard about Free-and-Open-Source ZEPHYR RTOS [1] (Apache 2.0 licensed) then it will make your day as the best platform out there for your new embedded electronics design :-) It works on anything.. even on Open-Source-Hardware RISC-V CPU [2] :-)
Update: After initial time playing around any my first bigger project I did not find Zephyr attractive for many reasons. I know people may like it or not, it’s up to you. For me constant changes, complexity of DTS required for custom board creation, and strong dependencies on external SDKs that are moving targets, make this solution harder to maintain than research. Turns out I prefer more old-school / conservative BSD Unix like approach and I found Apache NuttX RTOS [3] a lot cleaner, smarter in design, and self-contained, with strong commercial validation in many products around I would not even suspect :-)
[1] https://zephyrproject.org/
[2] https://riscv.org/
[2] https://nuttx.apache.org/



