We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
there are 10 tasks in our application, stack size definition in RTX_cinfig is default setting as follows:
// <o>Task stack size [bytes] <20-4096:8><#/4> // Set the stack size for tasks which is assigned by the system. // Default: 200 #ifndef OS_STKSIZE #define OS_STKSIZE 50 #endif
one of the 10 taskes is overflow now, how to define a bigger stack for the task. thanks in advice!
try this:
define global variable in beginning of your file, then at init create your task (first name of task, then priority, then pointer to stack and its size). Hereby an example for an bigger stack for tcp_task I use:
U64 tcp_stack[800/8]; /* A bigger stack for tcp_task */ t_tcp_task = os_tsk_create_user (tcp_task, 0, &tcp_stack, sizeof(tcp_stack));
that's it. Also change the number of processes with user stack in RTX_Config file
// <o>Number of tasks with user-provided stack <0-250> // Define the number of tasks that will use a bigger stack. // The memory space for the stack is provided by the user. // Default: 0 #ifndef OS_PRIVCNT #define OS_PRIVCNT 4 #endif
Here I can have 4 processes with user provided stack
hopes this helps