Tool/software: TI-RTOS
Hello everyone!
I am trying to use some OpenCV functions from the precompiled libraries on A15 provided with the Vision SDK, version 3.04. These functions work within the given alg-plugin examples, such as in opencvcanny. I can even modify these plugins with other OpenCV calls successfully, as long as I keep everything contained within the "cannyThreadFunc()" in alg_plugins/opencvcanny/canny.cpp
However, as soon as I try to move the OpenCV code outside of this function, it crashes with output that looks like this:
[HOST ] 51.719971 s: Unhandled Exception: [HOST ] 51.720002 s: Exception occurred in ThreadType_Task [HOST ] 51.720002 s: Exception occured in A15 with exception type 18 [HOST ] 51.720002 s: handle: 0x848ab5b8. [HOST ] 51.720002 s: stack base: 0x848adb60. [HOST ] 51.720032 s: stack size: 0x100000. [HOST ] 51.720032 s: R0 = 0x00000000 R8 = 0x849ac670 [HOST ] 51.720032 s: R1 = 0x00000001 R9 = 0x849adc5c [HOST ] 51.720063 s: R2 = 0x00000098 R10 = 0x849adc34 [HOST ] 51.720063 s: R3 = 0x048c0010 R11 = 0x849ac53c [HOST ] 51.720063 s: R4 = 0x849ac6c8 R12 = 0x2000015f [HOST ] 51.720093 s: R5 = 0x849ac660 SP(R13) = 0x8409c430 [HOST ] 51.720093 s: R6 = 0x849ac670 LR(R14) = 0x8a7350e4 [HOST ] 51.720093 s: R7 = 0x3ff00000 PC(R15) = 0x8409c430 [HOST ] 51.720093 s: PSR = 0x849adc5c [HOST ] 51.720124 s: DFSR = 0x00000206 [HOST ] 51.720124 s: IFSR = 0x00000000 [HOST ] 51.720124 s: DFAR = 0x00000010 [HOST ] 51.720124 s: IFAR = 0x00000000 [HOST ] 51.720154 s: Terminating Execution... [HOST ] 51.720154 s: [HOST ] 51.720154 s: ### XDC ASSERT - ERROR CALLBACK START ### [HOST ] 51.720185 s: [HOST ] 51.720185 s: E_dataAbort: pc = 0x8409c430, lr = 0x8a7350e4. [HOST ] 51.720215 s: [HOST ] 51.720215 s: ### XDC ASSERT - ERROR CALLBACK END ###
This particular output was caused by multiplying two cv::mat objects inside a .cpp function that was called directly from the "AlgorithmLink_xxxxProcess()" function of a custom-written plugin. Matrix addition and certain constructors were also demonstrated to fail in a similar manner.
It seems that there are certain restrictions on how the precompiled OpenCV libraries should be used... or else they will crash the application. Does anyone know what exactly these restrictions are?
Much appreciated,
Ying