How can I build C project without FreeRTOS?
How can I build C project without FreeRTOS?
How can I build C project without FreeRTOS?
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: How can I build C project without FreeRTOS?
In what context? What are you trying to achieve?
Re: How can I build C project without FreeRTOS?
I would like to use my OS.
Re: How can I build C project without FreeRTOS?
You may want to look at the ports of zephyr, nuttx, rtthread, and aliOS.
Re: How can I build C project without FreeRTOS?
It's all too complicated.
I need a simple solution.
I need a simple solution.
Re: How can I build C project without FreeRTOS?
I don't think it gets easy
What you could do is increase the stack size of the main thread, and do everything from main.
If the problem is with code compatibility, you could write a wrapper to translate your OS functions to FreeRTOS functions.
That beeing said, I would just use FreeRTOS. It works and is proven to work.
What you could do is increase the stack size of the main thread, and do everything from main.
If the problem is with code compatibility, you could write a wrapper to translate your OS functions to FreeRTOS functions.
That beeing said, I would just use FreeRTOS. It works and is proven to work.
Re: How can I build C project without FreeRTOS?
FreeRTOS is a complex and slow solution. I'm used to working with the microcontroller through registers. The OS gets in the way.
Re: How can I build C project without FreeRTOS?
There is a reason why all those mentioned OS exist, it's the best general solution to effectively time share the CPU. ESP peripherals have been designed to work in this context with internal state machines. If you are trying to use esp32 as basically a coprocessor type role because it is cheap, you can take a look at the bootloader subproject which is basically a very simple app without OS. There are some attempts by users to run OS on one core and not the other but there are potential shared resource issues. There are projects that use the ULP coprocessor as a real-time core. Some people use multiple esp32 on the same board. Don't limit yourself by staying in your comfort zone.
Re: How can I build C project without FreeRTOS?
I don't want to make this sound mean. But if you feel its to complicated maybe you should spend the time to learn it. It would not take long at all. Espressif has kindly given us MANY, MANY examples. Most of which are short and sweet, easy to learn and understand what is being done. I can almost guarantee that once you get a grasp of the FreeRTOS you will never want to go back.
Re: How can I build C project without FreeRTOS?
I'm not completely sure what you are aiming for but a few hacks:
- Create one task, assign all ram to it and make it highest prio. Then you put everything in critical so taskswitching is disabled. Im not sure, but some features meight not work anymore. I don't know if the IDF can work this way. (Still uses FreeRTOS)
- You meight be able to abuse one of the freeRTOS callbacks, Although this seems a bit hacky
- Change the FreeRTOS source so you don't use the task scheduler but simply call some main function.
However:
There is a reason freertos is used. I would suggest you use it.
- Create one task, assign all ram to it and make it highest prio. Then you put everything in critical so taskswitching is disabled. Im not sure, but some features meight not work anymore. I don't know if the IDF can work this way. (Still uses FreeRTOS)
- You meight be able to abuse one of the freeRTOS callbacks, Although this seems a bit hacky
- Change the FreeRTOS source so you don't use the task scheduler but simply call some main function.
However:
There is a reason freertos is used. I would suggest you use it.
Who is online
Users browsing this forum: No registered users and 142 guests