Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

trim task call stack size #33

Open
adam-at-epsilon opened this issue May 7, 2015 · 4 comments
Open

trim task call stack size #33

adam-at-epsilon opened this issue May 7, 2015 · 4 comments

Comments

@adam-at-epsilon
Copy link
Contributor

Task call stack size is supplied as a parameter whenever a task is created.

Giving a too large stack uses up memory unnecessarily. A too small stack size will result in memory being overwritten elsewhere.

@adam-at-epsilon
Copy link
Contributor Author

define INCLUDE_uxTaskGetStackHighWaterMark

This will enable this: http://www.freertos.org/uxTaskGetStackHighWaterMark.html

Which allows us to see how much of the task stack has been used.

@adam-at-epsilon
Copy link
Contributor Author

vTaskGetRunTimeStats uses sprintf, not snprintf

@adam-at-epsilon
Copy link
Contributor Author

with the latest check in task-status prints lowest historical watermarks to console.

Use this to trim stack sizes.

@adam-at-epsilon
Copy link
Contributor Author

our current stack sizes are, at idle (rightmost numbers, alignment doesn't seem to work ...):

The number meas the lowest number of bytes ever available in the stack so far.

Task             Abs Time    % Time     Stack (rem b)
USB_COM_RX       50215       14%            313
IDLE                      224294     62%         104
FLIGHT_CTRL        66043       18%         88
Tmr Svc            0              <1%           220
tFcbSensors       17677       4%           391
USB_COM_TX        1              <1%          92

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant