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.

CCS/66AK2H12: TI/RTOS NDK - Initializing FD environment: fdOpenSession vs autoOpenCloseFD = true

Part Number: 66AK2H12

Tool/software: Code Composer Studio

PDK 4.0.7, NDK 2.25.1.11, SYS/BIOS 6.45.5.55, IPC 3.46.2.04, EDMA3 2.12.4, CTools 2.2.0

I've got a task that needs to use the file descriptor environment (require using pipe()). This task is not created by main(). 

The flow is:

main() {Task_create(myFunc())};

myFunc() { Task_create( funcWithProblem()) }

In funcWithProblem() is where I need the fd environment and is where I call pipe(). I had fdOpenSession() in funcWithProblem() and it works. I commented that out and placed in my CFG file the following per the NDK API user manual:

var Ndk = xdc.useModule('ti.ndk.config.Global');
Ndk.autoOpenCloseFD = true;

Now the call to pipe() fails returning -1.  ffdError() returns -1, a sure indication that the fd environment is not initialized.

What am I doing wrong?

Mike