embedded - How to get stack width on FreeRTOS? -


i developing embedded platform using sdk based on freertos. need create task xtaskcreate, don't understand usstackdepth parameter. freertos documentation says:

the size of task stack specified number of variables stack can hold - not number of bytes. example, if stack 16 bits wide , usstackdepth defined 100, 200 bytes allocated stack storage. stack depth multiplied stack width must not exceed maximum value can contained in variable of type size_t.

so, how stack width? platform-dependent? targeting 32-bit risc processor xtensa lx106

the freertos task stack width port dependent. in portmacro.h , should find definition portstack_type.

if dig further tasks.c (remember have access freertos source code), you'll find stack allocated size of ( ( size_t ) usstackdepth ) * sizeof( stacktype_t). , in portmacro.h you'll find stacktype_t typedef'd same portstack_type.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -