Well if you are developing an micro controller based product, there are couple of ways to proceed, one is to develop the entire application in one single infinite loop and manage the timing yourself by fine tuning.

Another approach is to use an RTOS (Real Time Operating System) and let it handle the timing constraints for the application, so as a developer you can focus on the application logic.

One of the popular choices is FreeRTOS which is more or less available for all combination of compiler and MCU variants even including RISC V. Now with this approach, there are a few choices to be made.

Use FreeRTOS without paying any royalty and go into production, it comes with MIT license which is permissive.

If your company has a blanket agreement to not use any kind of open source, then you can for the OpenRTOS which is fully compatible with FreeRTOS, it is the exact same kernel under a commercial license.

If the product in question is Safety product , then the choice is to use SafeRTOS so the safety certification of the kernel is taken care by https://www.highintegritysystems.com/.

Happy development !