海思MPP移植到eclipse下实现在eclipse下用海思交叉编译器实现编译
来源:互联网 发布:matlab两个矩阵相加 编辑:程序博客网 时间:2024/05/17 09:21
</pre><p></p><pre name="code" class="html">
题记:为了将视频采集及压缩部分代码,和live555糅合到一起。想先将海思MPP移植到eclipse下实现在eclipse下用海思交叉编译器实现编译,实现在eclipse下编译出可执行文件然后放到海思开发平台下运行。这样就可以再接下来的将live555糅合后可以实行。以下是主要过程:
1 新建一个工程后要将 各个.c文件放到SRC目录下。
2 将用到的头文件放到指定目录下,注意要必须是所有头文件,下图是路径,我建立了个文件夹hi_include
其中下图中的hi...是hi_include,hi_incldue放的是MPP用到的所有头文件。
3 将库函数进行配置。我放在了hi_lib文件夹下,并且在工程文件里还要添加库文件路径。主要各个库文件之间有严格的依赖关系,顺序不能颠倒。
我是先根据MPP的sample_venc目录下make命令后的变异顺序所依赖的库文件进行配置,make之后
hi3518/mpp/component/acodec -I/home/frank/hi3518/mpp/extdrv/tw2865 -Dhi3518 -DHICHIP=0x35180100 -DSENSOR_TYPE=APTINA_AR0130_DC_720P_
30FPS -DHI_DEBUG -DHI_XXXX -lpthread -lm -lpthread -lm -o sample_venc sample_venc.o /home/frank/hi3518/mpp/sample/venc/../common/loa
dbmp.o /home/frank/hi3518/mpp/sample/venc/../common/sample_comm_audio.o /home/frank/hi3518/mpp/sample/venc/../common/sample_comm_isp
.o /home/frank/hi3518/mpp/sample/venc/../common/sample_comm_sys.o /home/frank/hi3518/mpp/sample/venc/../common/sample_comm_vda.o /ho
me/frank/hi3518/mpp/sample/venc/../common/sample_comm_venc.o /home/frank/hi3518/mpp/sample/venc/../common/sample_comm_vi.o /home/fra
nk/hi3518/mpp/sample/venc/../common/sample_comm_vo.o /home/frank/hi3518/mpp/sample/venc/../common/sample_comm_vpss.o /home/frank/hi3
518/mpp/lib/libmpi.a /home/frank/hi3518/mpp/lib/libVoiceEngine.a /home/frank/hi3518/mpp/lib/libaec.a /home/frank/hi3518/mpp/lib/libr
esampler.a /home/frank/hi3518/mpp/lib/libanr.a /home/frank/hi3518/mpp/lib/libisp.a /home/frank/hi3518/mpp/lib/libsns_ar0130_720p.a然后,eclipse配置:
编译的时候出现错误:
Building file: ../Src/loadbmp.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/loadbmp.d" -MT"Src/loadbmp.d" -o "Src/loadbmp.o" "../Src/loadbmp.c"Finished building: ../Src/loadbmp.c Building file: ../Src/sample_comm_audio.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_comm_audio.d" -MT"Src/sample_comm_audio.d" -o "Src/sample_comm_audio.o" "../Src/sample_comm_audio.c"Finished building: ../Src/sample_comm_audio.c Building file: ../Src/sample_comm_isp.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_comm_isp.d" -MT"Src/sample_comm_isp.d" -o "Src/sample_comm_isp.o" "../Src/sample_comm_isp.c"Finished building: ../Src/sample_comm_isp.c Building file: ../Src/sample_comm_sys.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_comm_sys.d" -MT"Src/sample_comm_sys.d" -o "Src/sample_comm_sys.o" "../Src/sample_comm_sys.c"Finished building: ../Src/sample_comm_sys.c Building file: ../Src/sample_comm_vda.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_comm_vda.d" -MT"Src/sample_comm_vda.d" -o "Src/sample_comm_vda.o" "../Src/sample_comm_vda.c"Finished building: ../Src/sample_comm_vda.c Building file: ../Src/sample_comm_venc.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_comm_venc.d" -MT"Src/sample_comm_venc.d" -o "Src/sample_comm_venc.o" "../Src/sample_comm_venc.c"Finished building: ../Src/sample_comm_venc.c Building file: ../Src/sample_comm_vi.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_comm_vi.d" -MT"Src/sample_comm_vi.d" -o "Src/sample_comm_vi.o" "../Src/sample_comm_vi.c"Finished building: ../Src/sample_comm_vi.c Building file: ../Src/sample_comm_vo.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_comm_vo.d" -MT"Src/sample_comm_vo.d" -o "Src/sample_comm_vo.o" "../Src/sample_comm_vo.c"Finished building: ../Src/sample_comm_vo.c Building file: ../Src/sample_comm_vpss.cInvoking: Cross GCC Compilerarm-hisiv100nptl-linux-gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_comm_vpss.d" -MT"Src/sample_comm_vpss.d" -o "Src/sample_comm_vpss.o" "../Src/sample_comm_vpss.c"Finished building: ../Src/sample_comm_vpss.c Building file: ../Src/sample_venc.cppInvoking: Cross G++ Compilerarm-hisiv100nptl-linux-g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Src/sample_venc.d" -MT"Src/sample_venc.d" -o "Src/sample_venc.o" "../Src/sample_venc.cpp"Finished building: ../Src/sample_venc.cpp Building target: hi_MPPInvoking: Cross G++ Linkerarm-hisiv100nptl-linux-g++ -L/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib -o "hi_MPP" ./Src/loadbmp.o ./Src/sample_comm_audio.o ./Src/sample_comm_isp.o ./Src/sample_comm_sys.o ./Src/sample_comm_vda.o ./Src/sample_comm_venc.o ./Src/sample_comm_vi.o ./Src/sample_comm_vo.o ./Src/sample_comm_vpss.o ./Src/sample_venc.o -lmpi -lVoiceEngine -laec -lresampler -lanr -lisp -lsns_ar0130_720p/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib/libmpi.a(mpi_adec.o): In function `HI_MPI_ADEC_ReleaseFrame':mpi_adec.c:(.text+0x648): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x6f0): undefined reference to `sem_post'/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib/libmpi.a(mpi_adec.o): In function `HI_MPI_ADEC_GetFrame':mpi_adec.c:(.text+0x928): undefined reference to `sem_wait'mpi_adec.c:(.text+0x9dc): undefined reference to `sem_getvalue'/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib/libmpi.a(mpi_adec.o): In function `MPI_ADEC_SendStream':mpi_adec.c:(.text+0x1074): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x1128): undefined reference to `sem_wait'mpi_adec.c:(.text+0x124c): undefined reference to `sem_post'mpi_adec.c:(.text+0x137c): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x1398): undefined reference to `sem_wait'mpi_adec.c:(.text+0x14c0): undefined reference to `sem_post'mpi_adec.c:(.text+0x1734): undefined reference to `sem_post'mpi_adec.c:(.text+0x1788): undefined reference to `sem_post'mpi_adec.c:(.text+0x1988): undefined reference to `sem_post'mpi_adec.c:(.text+0x19e4): undefined reference to `sem_post'/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib/libmpi.a(mpi_adec.o): In function `MPI_ADEC_ClearChnBuf':mpi_adec.c:(.text+0x1fa0): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x1fac): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x1fec): undefined reference to `sem_trywait'mpi_adec.c:(.text+0x2018): undefined reference to `sem_post'mpi_adec.c:(.text+0x203c): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x2088): undefined reference to `sem_post'mpi_adec.c:(.text+0x2094): undefined reference to `sem_post'/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib/libmpi.a(mpi_adec.o): In function `MPI_ADEC_DestroyChn':mpi_adec.c:(.text+0x22b4): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x22c0): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x23d8): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x23e4): undefined reference to `sem_getvalue'mpi_adec.c:(.text+0x23fc): undefined reference to `sem_post'mpi_adec.c:(.text+0x2410): undefined reference to `sem_post'mpi_adec.c:(.text+0x2454): undefined reference to `sem_destroy'mpi_adec.c:(.text+0x2464): undefined reference to `sem_destroy'mpi_adec.c:(.text+0x2534): undefined reference to `sem_post'mpi_adec.c:(.text+0x259c): undefined reference to `sem_destroy'mpi_adec.c:(.text+0x25ec): undefined reference to `sem_post'mpi_adec.c:(.text+0x2620): undefined reference to `pthread_join'/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib/libmpi.a(mpi_adec.o): In function `MPI_ADEC_CreateChn':mpi_adec.c:(.text+0x2af8): undefined reference to `sem_init'mpi_adec.c:(.text+0x2b10): undefined reference to `sem_init'mpi_adec.c:(.text+0x2b8c): undefined reference to `pthread_create'./Src/sample_comm_audio.o: In function `SAMPLE_COMM_AUDIO_CreatTrdAiAo':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_audio.c:291: undefined reference to `pthread_create'./Src/sample_comm_audio.o: In function `SAMPLE_COMM_AUDIO_CreatTrdAiAenc':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_audio.c:310: undefined reference to `pthread_create'./Src/sample_comm_audio.o: In function `SAMPLE_COMM_AUDIO_CreatTrdAencAdec':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_audio.c:333: undefined reference to `pthread_create'./Src/sample_comm_audio.o: In function `SAMPLE_COMM_AUDIO_CreatTrdFileAdec':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_audio.c:354: undefined reference to `pthread_create'./Src/sample_comm_audio.o: In function `SAMPLE_COMM_AUDIO_DestoryTrdAi':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_audio.c:368: undefined reference to `pthread_join'./Src/sample_comm_audio.o: In function `SAMPLE_COMM_AUDIO_DestoryTrdAencAdec':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_audio.c:382: undefined reference to `pthread_join'./Src/sample_comm_audio.o: In function `SAMPLE_COMM_AUDIO_DestoryTrdFileAdec':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_audio.c:396: undefined reference to `pthread_join'./Src/sample_comm_isp.o: In function `SAMPLE_COMM_ISP_Run':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_isp.c:589: undefined reference to `pthread_create'./Src/sample_comm_isp.o: In function `SAMPLE_COMM_ISP_Stop':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_isp.c:678: undefined reference to `pthread_join'./Src/sample_comm_vda.o: In function `SAMPLE_COMM_VDA_MdStart':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_vda.c:371: undefined reference to `pthread_create'./Src/sample_comm_vda.o: In function `SAMPLE_COMM_VDA_OdStart':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_vda.c:452: undefined reference to `pthread_create'./Src/sample_comm_vda.o: In function `SAMPLE_COMM_VDA_MdStop':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_vda.c:469: undefined reference to `pthread_join'./Src/sample_comm_vda.o: In function `SAMPLE_COMM_VDA_OdStop':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_vda.c:516: undefined reference to `pthread_join'./Src/sample_comm_venc.o: In function `SAMPLE_COMM_VENC_StartGetStream':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_venc.c:1014: undefined reference to `pthread_create'./Src/sample_comm_venc.o: In function `SAMPLE_COMM_VENC_StopGetStream':/home/frank/workspace1/hi_MPP/Debug/../Src/sample_comm_venc.c:1025: undefined reference to `pthread_join'/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib/libmpi.a(mpi_aenc.o): In function `MPI_AENC_DestroyGetFrmProc':mpi_aenc.c:(.text+0x30): undefined reference to `pthread_join'/opt/hisi-linux-nptl/arm-hisiv100-linux/target/usr/lib/hi_lib/libmpi.a(mpi_aenc.o): In function `MPI_AENC_CreateGetFrmProc':mpi_aenc.c:(.text+0x8c): undefined reference to `pthread_create'collect2: ld returned 1 exit statusmake: *** [hi_MPP] 错误 1然后发现缺少libpthread.a这个库文件,加上后正确
00:13:42 **** Incremental Build of configuration Debug for project hi_MPP ****
make all
make: 没有什么可以做的为 `all'。
那么接下来,我就可以进一步分析代码,争取可以尽快移植到Live555上,实现糅合
头文件下载链接
工程链接地址
0 0
- 海思MPP移植到eclipse下实现在eclipse下用海思交叉编译器实现编译
- 在Eclipse下配置Arm交叉编译器
- Cocos移植到Android-使用Eclipse交叉编译打包
- Cocos移植到Android-使用Eclipse交叉编译打包
- eclipse在windows下的arm交叉编译环境搭建
- 在Eclipse里实现Ant自动编译
- 在Eclipse里实现Ant自动编译
- 在Eclipse里实现Ant自动编译
- Windows下使用Eclipse交叉编译ARM
- Ubuntu15.10下安装arm交叉编译器并搭建编译环境以及hello.c的实现
- Eclipse 交叉编译环境
- 海思hi3518用eclipse采用交叉编译器编译程序在海思开发板上运行
- 移植linux x86 C库 到android arm平台【交叉编译实现应用增量更新】
- 移植windows eclipse下的Android项目到Ubuntu编译环境编译碰到的几个问题
- Linux下交叉编译sqlite3并移植到AR…
- Cocos2dx交叉编译后在eclipse编译不通过的问题解决
- 在windows下利用cygwin+Eclipse+NDK构建交叉编译环境攻略
- 【转】在MACOS上实现交叉编译
- JSP详细篇——Servlet3.0新特性
- OC基础(不喜欢勿喷)
- v$BH解释
- 信息论几个基本概念
- 黑马程序员——JAVA基础之IO流缓冲区,转换流,字节流
- 海思MPP移植到eclipse下实现在eclipse下用海思交叉编译器实现编译
- [extjs3.4]异步请求
- 单链表的设计和实现
- Oracle复习笔记
- linux 常用的shell脚本
- 请求消息头获取
- OC中Foundation集合的使用(其中包括基本数据类型与对象进行转换)
- RPM包rpmbuild SPEC文件深度说明
- Vs2012在Linux开发中的应用(11): 编译单个文件