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.
Hi Martin,
In order to determine whether the NDK memory manager has run out of memory, you can get a memory allocation report using _mmCheck() function. Please see Section 3.5.6 of the user guide for more info on how to interpret the memory report and _mmCheck() function syntax.
In case you find that the memory manager has run out of memory, you can increase the memory manager's raw page count or raw page size. The memory manager configuration parameters are described here.
Best,
Ashish
Hi Martin,
Section 3.5.6 of the user guide explains how to interpret the report. As per the report, no memory is available for allocation. It looks like the memory manager init routine has not run yet.
I am guessing what might be happening is that your statically created task that call fdOpenSession() is being called before the NDK task runs and is able to initialize the NDK stack. Can you try the following ?
- Create a sempahore and update your network task to pend on it before calling fdOpenSession().
- Add a networkIPAddrHook function that posts this semaphore. This hook function is called once the stack is initialized so it should be safe to unblock your network task so it can call fdOpenSession() at this time.
*.cfg: var Global = xdc.useModule('ti.ndk.config.Global'); Global.networkIPAddrHook = '&myIPAddrHook'; *.c: Void myIPAddrHook(IPN IPAddr, uint IfIdx, uint fAdd) { Semaphore_post(...); }
Best,
Ashish
Hi Martin,
Glad to know that your application is working.
Martin H. said:
To do the modifications I had to add "${PROJECT_BUILD_DIR}/configPkg/package/cfg" to the Include Search PATH of the project and add #include "app_pea8fnv.h" to the source file.
Otherwise the static tasks and semaphores would not have been available.
This .h file also includes semaphore.h (prototypes for semaphore functions) and task.h.I still wonder if that this is the recommended procedure (adding .h files manually). Or are there some settings in the .cfg file that make TI-RTOS components available automatically?
If you statically create task or semaphore instances, you can store their handles in a global variable that can be referenced from your C file. Please see this link for more info on this: http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/cfg/Program.html#global. The link also has an example.
Best,
Ashish