Create a project w/o FreeRTOS?

fearless_fool
Posts: 3
Joined: Sun Feb 26, 2017 5:20 am

Create a project w/o FreeRTOS?

Postby fearless_fool » Sat Jul 11, 2020 8:40 pm

I have compiled and run "hello_world", but otherwise I'm a complete beginner in the land of ESP32 IDF.

Because I'm porting a new real-time framework to the ESP32, I'd like to create a new project that specifically omits FreeRTOS. `menuconfig` doesn't seem to provide a means to do that.

Any guidance or documentation on how to do that would be welcome!

ESP_Sprite
Posts: 4027
Joined: Thu Nov 26, 2015 4:08 am

Re: Create a project w/o FreeRTOS?

Postby ESP_Sprite » Sat Jul 11, 2020 9:43 pm

Suggest you don't do that, especially if you're a beginner. All the documentation, the entire framework, all the drivers etc assume you are using FreeRTOS; you'll be making your life extremely complicated if you insist on running without it.

fearless_fool
Posts: 3
Joined: Sun Feb 26, 2017 5:20 am

Re: Create a project w/o FreeRTOS?

Postby fearless_fool » Sat Jul 11, 2020 10:10 pm

Are you are saying that FreeRTOS is permanently baked into every ESP32 application?

That would be a pity -- as good as FreeRTOS is, the mulib framework I'd like to port is extremely efficient for low-power applications -- it's inherently tick-less and its single threaded design means that task switching is very fast (i.e. it's just a function call).

I'm actively porting mulib to other platforms, and it would be a shame to omit the ESP32 family. But if there's really no way to dig out FreeRTOS, then I'd agree with you.

Grandpa
Posts: 4
Joined: Mon Jul 23, 2018 8:15 pm

Re: Create a project w/o FreeRTOS?

Postby Grandpa » Sun Jul 12, 2020 5:54 am

I would also strongly suggest reading the book and reference manual found here: https://www.freertos.org/Documentation/RTOS_book.html

FreeRTOS is not as hard as it may seems at first, although mastering it will require in depth study. Also note that there's slight enhancement done for the esp32, mostly because of its dual processors.

YMMV

ESP_Sprite
Posts: 4027
Joined: Thu Nov 26, 2015 4:08 am

Re: Create a project w/o FreeRTOS?

Postby ESP_Sprite » Sun Jul 12, 2020 8:13 am

fearless_fool wrote:
Sat Jul 11, 2020 10:10 pm
Are you are saying that FreeRTOS is permanently baked into every ESP32 application?
Any default one that uses ESP-IDF: yes.
That would be a pity -- as good as FreeRTOS is, the mulib framework I'd like to port is extremely efficient for low-power applications -- it's inherently tick-less and its single threaded design means that task switching is very fast (i.e. it's just a function call).

I'm actively porting mulib to other platforms, and it would be a shame to omit the ESP32 family. But if there's really no way to dig out FreeRTOS, then I'd agree with you.
Well, depending on if you just want to port your lib as an exercise or if you want it to be actually useful, technically the bootloader that the ESP32 uses is a FreeRTOS-less application; you could try to use that as a starting point. However, you likely won't ever be able to use WiFi or BT/BTLE, as although those drivers aren't tied 'hard' to FreeRTOS, they do require some sort of pre-emptive threading to work. I'm also not sure how you would use multiple cores on a single-threaded design.

(Also, note that you're not working on a simple microcontroller here - power usage is governed by a lot more than just what the CPU is doing. Even though your solution doubtlessly has power advantages over a full RTOS on simpler controllers, I wouldn't be surprised if on the ESP32 the advantage would fall into the noise floor because of everything else going on.)

Who is online

Users browsing this forum: No registered users and 34 guests