Tiger
June 8, 2021, 5:41am
#1
I had downloaded Loading... to vim3 board.
in the build_vx.sh under each example, how to set the VIVANTE_SDK_INC and VIVANTE_SDK_LIB variable?
It looks like I need to install aml SDK. can anyone tell me where to install those hdr and libs?
Thanks,
Frank
June 8, 2021, 5:44am
#2
@Tiger You don’t need to install AML SDK
Tiger
June 8, 2021, 5:49am
#3
Frank,
Thanks for reply.
in my VIM3 board, executing build_vx.sh will fail. I cannot find /usr/share/npu/sdk directory in my environment.
So I am confused how to set right path in the build_vx.sh if not missing SDK.
export VIVANTE_SDK_INC=/usr/share/npu/sdk/include
export VIVANTE_SDK_LIB=/usr/lib
Frank
June 8, 2021, 5:57am
#4
@Tiger Please upgrade your system to latest release OTA version .
khadas@Khadas:~$ ll /usr/share/npu/sdk/include
total 20
drwxrwxr-x 5 khadas khadas 4096 Jun 8 05:55 ./
drwxrwxr-x 6 khadas khadas 4096 Jun 8 05:55 ../
drwxrwxr-x 2 khadas khadas 4096 Jun 8 05:55 CL/
drwxrwxr-x 3 khadas khadas 4096 Jun 8 05:55 HAL/
drwxrwxr-x 2 khadas khadas 4096 Jun 8 05:55 VX/
khadas@Khadas:~$
Tiger
June 8, 2021, 6:03am
#5
OK
Let me check how to do OTA upgrade.
I remember I install the system last week, and kernel is 5.12.0 already.
Thanks,
Frank
June 8, 2021, 6:44am
#6
@Tiger Mainline firmware not support NPU , if you need to use NPU, Please use 4.9 kernel firmware.
Tiger
June 10, 2021, 1:24am
#7
yes. I turn to 4.9 kernel version firmware.
Now runing build_vx.sh, reports following error:
/usr/bin/ld: bin_r_cv3/main.o: in function draw_results(cv::Mat&, _DetectResult, int, int, det_model_type)': main.cpp:(.text+0x700): undefined reference to
cv::rectangle(cv::InputOutputArray const&, cv::Rect , cv::Scalar_ const&, int, int, int)’
/usr/bin/ld: main.cpp:(.text+0x7b8): undefined reference to cv::getTextSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, double, int, int*)' /usr/bin/ld: main.cpp:(.text+0x858): undefined reference to
cv::rectangle(cv::InputOutputArray const&, cv::Rect , cv::Scalar_ const&, int, int, int)’
/usr/bin/ld: main.cpp:(.text+0x924): undefined reference to `cv::putText(cv::_InputOutputArray const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::Point , int, double, cv::Scalar , int, int, bool)’
And the ld command already include those opencv libs as below:
0 R khadas 7448 7447 22 80 0 - 8493 - 01:17 pts/0 00:00:00 /usr/bin/ld -plugin /usr/lib/gcc/aarch64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/aarch64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccUrd27d.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu --as-needed -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux --fix-cortex-a53-843419 -pie -z now -z relro -o bin_r_cv3/detect_demo_x11 /usr/lib/gcc/aarch64-linux-gnu/9/…/…/…/aarch64-linux-gnu/Scrt1.o /usr/lib/gcc/aarch64-linux-gnu/9/…/…/…/aarch64-linux-gnu/crti.o /usr/lib/gcc/aarch64-linux-gnu/9/crtbeginS.o -L/usr/include/opencv2/lib -L/usr/lib -L…/source_code/bin_r -L/usr/lib/gcc/aarch64-linux-gnu/9 -L/usr/lib/gcc/aarch64-linux-gnu/9/…/…/…/aarch64-linux-gnu -L/usr/lib/gcc/aarch64-linux-gnu/9/…/…/…/…/lib -L/lib/aarch64-linux-gnu -L/lib/…/lib -L/usr/lib/aarch64-linux-gnu -L/usr/lib/…/lib -L/usr/lib/gcc/aarch64-linux-gnu/9/…/…/… bin_r_cv3/main.o -lopencv_imgproc -lopencv_core -lopencv_videoio -lopencv_imgcodecs -lopencv_highgui -lz -lOpenVX -lOpenVXU -lVSC -lGAL -lovxlib -lArchModelSw -lNNArchPerf -lnn_detect -lvpcodec -lamcodec -lamadec -lamvdec -lamavutils -lrt -lpthread -lge2d -lion -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/aarch64-linux-gnu/9/crtendS.o /usr/lib/gcc/aarch64-linux-gnu/9/…/…/…/aarch64-linux-gnu/crtn.o
Any idea about this this error?
Thanks,
Frank
June 10, 2021, 1:50am
#8
@Tiger Do you upgrade to least OTA version ? And don’t do any modifiy with souce code
Tiger
June 10, 2021, 4:34am
#9
yes. update to May 20 version. build is ok now.