OpenCV cross-compile onto Jetson TK1 with Nsight Eclipse

Hi,

i want to write some code for the gpu-hog in OpenCV and test it on the Jetson TK1. I would like to write the code in eclipse and cross-compile it for the board. I will also have to debug the code.

My steps at the moment are to create an eclipse-project on the Jetson TK1 with :

cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DWITH_CUDA=ON -DCUDA_ARCH_BIN="3.2" -DCUDA_ARCH_PTX="" -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF ../opencv_source

from http://elinux.org/Jetson/Installing_OpenCV and http://www.cmake.org/Wiki/Eclipse_CDT4_Generator.
After it generated the build-folder i run ccmake, turn on the examples and put -g -G at the CUDA_NVCC_FLAGS_DEBUG.
After that i build it with make -j4 and remote debug it on the board using eclipse on my host. I don’t think this is a good way to do it so my question is :

Is there a way to import a project with cmake like OpenCV into eclipse and cross-compile it to the Jetson TK1 ?

Thank you for your help.

It should be possible, see https://devtalk.nvidia.com/default/topic/749842/jetson-tk1-including-opencv-in-cross-compile/

Thank you for your answer.

As far as i understand did he cross compile an project which depends on OpenCV and not cross compile OpenCV as a project like i try to do it. Please correct me if i am wrong.

I would think that cross-compiling OpenCV is possible, but unless I’m mistaken you won’t get the GPU optimizations that come with NVIDIA’s packaged version.