Tool/software: Linux
Dear,
I'd like to read a *.bin file to buffer to use new weight for object detection.
Related thread is here :
https://e2e.ti.com/support/processors/f/791/p/777039/2874228#2874228
So, in usecase I wrote this code.
Void Chains_ReadAdaboostFromFile(AlgorithmLink_ObjectDetectionCreateParams *pOdPrm, char *fileName)
{
Int32 status;
UInt32 dataSize = 0;
pOdPrm->pWeightPDBuf
= OSA_memAllocSR(OSA_HEAPID_DDR_CACHED_SR1, PD_FILE_MAX_SIZE, 128);
if(!pOdPrm->pWeightPDBuf)
{
Vps_printf("Adaboost memory alloc error!!\n");
}
status = OSA_fileReadFile(
fileName,
pOdPrm->pWeightPDBuf,
PD_FILE_MAX_SIZE,
&dataSize
);
if(status == OSA_EFAIL)
{
Vps_printf("Adaboost file read error!!\n");
}
}
Do I need virtual to physics address using OSA_memVirt2Phys()?
The pOdPrm->pWeightPDBuf is used for AlgorithLink_objectDetectionInitIOBuffers() in objectDetectionLink_algPlugin.c.
Best regards,
Heechang