Part Number: TDA4VM
Hello,
I am working on PSDK 6.1.
My objective is to draw some strings on TIDL output.
To that end, I am attempting to use the Draw2D API in a source file inside $PSDKRA_PATH/vision_apps/kernels/img_proc.
The calling code is as follows.
Draw2D_Handle *pHandle = NULL;
Draw2D_BufInfo *pBufInfo = NULL;
Draw2D_FontPrm sDist;
static int vNum = 0;
retStatus = Draw2D_create(pHandle);
if(pHandle != NULL)
{
pBufInfo->bufAddr[0] = data_ptr_1;
...
retStatus = Draw2D_setBufInfo(pHandle, pBufInfo);
sprintf(temp, "%u", vNum);
sDist.fontIdx = 3;
retStatus = Draw2D_drawString(pHandle, xmin+5, ymax+5, temp, &sDist);
retStatus = Draw2D_delete(pHandle);
vNum++;
}
else
{
printf("\nReceived NULL Draw2D handle ...\n");
}
After some difficulty, I managed to build vision_apps.
But when I ran the TIDL application, the code drops into the 'else' condition above, and I end up receiving a NULL handle.
On further debugging, I found that the Draw2D object is getting created properly inside draw2d.c, but somehow, that reference is not passed to the calling code above.
How can I resolve this issue?
Thank you.