This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TM4C1294NCPDT: Dynamic task_create issue

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi,

i am using the following version for my application development.

CCS - 6.2

TI RTOS - tirtos_tivac_2_16_01_14

ndk -  ndk_2_25_00_09

BIOS - bios_6_45_02_31

i want to create the task dynamically from another task using Task_create() API. but its returning NULL and task is not been created. find the below code used to create the task.

Task_Handle userPgmHandle;
Task_Params userPgmParams;

Task_Params_init(&userPgmParams);
userPgmParams.stackSize = 2048;
userPgmParams.priority = 5;
userPgmHandle =
Task_create((Task_FuncPtr)UserFunc, &userPgmParams, &eb);
if (userPgmHandle == NULL) {
                 System_printf("User Program Start failed\n");
}

but the same code is creating the task when its added in tcpHandlerHook function.

i also added the follwoing code to CFG file.

/* Allow for run-time creates/memory allocation */
var Defaults = xdc.useModule('xdc.runtime.Defaults');
var Types = xdc.useModule('xdc.runtime.Types');
Defaults.common$.memoryPolicy = Types.CREATE_POLICY;
BIOS.runtimeCreatesEnabled = true;

 

if i added the above code to cfg file then i am getting the following error while running..

ti.sysbios.knl.Semaphore: delete policy error

xdc.runtime.Error.raise: terminating execution

what is missed here?

Regards

Bala