Run ESP32 WORM without freertos

gchini
Posts: 18
Joined: Wed Jun 08, 2022 1:41 pm

Run ESP32 WORM without freertos

Postby gchini » Sun Sep 24, 2023 11:29 am

Is freertos necessary to run a program with ESP32? Is it necessary or optional? Why this question?

Because
- I need to develop a single thread application first
- I need to optimize the ram since I need to write an alghoritm that use a lot of ram
- I found that FreeRTOS are not able to offer me the possibilità to use all the ram for a single thread. Basucally it go in stack overflow because i think that rtos give me limited ability yo user the ram and my program dos not run properly

What i want then is to run a simple int main(){} program mono tasking. Is it possible? If yes how i can do that?

Thanks

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

Re: Run ESP32 WORM without freertos

Postby ESP_Sprite » Sun Sep 24, 2023 12:14 pm

gchini wrote:
Sun Sep 24, 2023 11:29 am
Is freertos necessary to run a program with ESP32? Is it necessary or optional? Why this question?
If you're using ESP-IDF, for practical purposes it's not optional.
- I found that FreeRTOS are not able to offer me the possibilità to use all the ram for a single thread. Basucally it go in stack overflow because i think that rtos give me limited ability yo user the ram and my program dos not run properly
FreeRTOS happily allows you to allocate the entire memory to one task. The issue here is that you run out of stack memory, however. You can set the amount of stack allocated for the main task in menuconfig; suggest you increase that.

gchini
Posts: 18
Joined: Wed Jun 08, 2022 1:41 pm

Re: Run ESP32 WORM without freertos

Postby gchini » Fri Sep 29, 2023 10:36 am

I've tried but this does not work i still receive the same error

I would like to use the entire ram available on the esp32 and allocate up to 250KB of variables going deep into my calling functions

MicroController
Posts: 1700
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Run ESP32 WORM without freertos

Postby MicroController » Fri Sep 29, 2023 8:35 pm

Basucally it go in stack overflow because i think that rtos give me limited ability yo user the ram
You can use all the RAM in the chip. Just don't try and use it all via the stack, i.e. local variables.
For bigger data structures or arrays use either global variables or allocate them from the heap.

Who is online

Users browsing this forum: Baidu [Spider] and 317 guests