Managing the working area of a thread
Posted: Wed Apr 18, 2018 7:41 pm
Hi,
I use RTOS Chibios / RT on the Arduino platform. I developed my project using 3 threads of size 100 bytes for the working area parameter. But I think I'm wasting my memory. I tried to run some tests and I got a strange result.
When defining the working area in 0 bytes, the program works in the same way as for 10, 20 ... 50 or 100 bytes (each thread has operations to flash LEDs, start motors, read digital and analog pins among other functions). I've even used a code to determine the ram memory consumption and in fact each thread uses a portion of the memory. I wonder if anyone knows why this occurred and if there is any way to determine the size of the threads since on the arduino platform the debug is difficult to perform.
Thanks!
I use RTOS Chibios / RT on the Arduino platform. I developed my project using 3 threads of size 100 bytes for the working area parameter. But I think I'm wasting my memory. I tried to run some tests and I got a strange result.
When defining the working area in 0 bytes, the program works in the same way as for 10, 20 ... 50 or 100 bytes (each thread has operations to flash LEDs, start motors, read digital and analog pins among other functions). I've even used a code to determine the ram memory consumption and in fact each thread uses a portion of the memory. I wonder if anyone knows why this occurred and if there is any way to determine the size of the threads since on the arduino platform the debug is difficult to perform.
Thanks!