在DSP里面调用elf格式的lib库
注:lib库需是elf格式的,用ccs5.2可编译elf格式lib库,lib库如何生成具体见1.1.2
1、把Jupitercar.lib拷贝到
/home/DVRRDK/DVRRDK_04.00.00.03/dvr_rdk/mcfw/src_bios6/alg/va/lib
2、rules_c674.mk里添加imglib2_elf.lib所在的路径
在/home/DVRRDK/DVRRDK_04.00.00.03/dvr_rdk/makerules
下打开rules_c674.mk在里面添加:
LIB_PATHS += $(RTSLIB_PATH)
$(fc_INCLUDE)/ti/sdo/fc/ecpy/lib/debug/ecpy.ae674
$(dvr_rdk_PATH)/mcfw/src_bios6/alg/scd/lib/scd.ae674
$(dvr_rdk_PATH)/mcfw/src_bios6/alg/va/lib/vlib.ae674
$(dvr_rdk_PATH)/mcfw/src_bios6/alg/va/lib/Jupitercar.lib
最后一个$(dvr_rdk_PATH)/mcfw/src_bios6/alg/va/lib/Jupitercar.lib是我添加进去的。
在ARM里面加linux的动态库.so库
注:这个库可以放任意目录中,只要路径加的正确就ok,(dvr_rdk_PATH)=DVRRDK_03.50.00.05dvr_rdk,(LIB_DIR)=DVRRDK_03.50.00.05dvr_rdklib i816x-evm
example:
1、把libcarview.so拷贝到Z:duthDVRRDK_03.50.00.05dvr_rdkUnitChecksrc
2、看看Z:duthDVRRDK_03.50.00.05dvr_rdkUnitChecksrc目录下的makefile
include
$(dvr_rdk_PATH)/makerules/includes_a8.mk $(dvr_rdk_PATH)/makerules/common_header_a8.mk
includes_a8.mk是添加库的文件
LIBS= $(LIB_DIR)/dvr_rdk_demo_mcfw_api.a $(MCFW_LIBS) $(AUDIO_LIBS)
LIBS= $(LIB_DIR)/UnitCheck.a $(MCFW_LIBS) $(AUDIO_LIBS) $(RPE_LIBS)
看到生成静态库dvr_rdk_demo_mcfw_api.a需要$(MCFW_LIBS) $(AUDIO_LIBS)这2个库
看到生成我们要运行代码的静态库需要$(AUDIO_LIBS) $(RPE_LIBS)这2个库
3、进入includes_a8.mk看到
AUDIO_LIBS=$(linuxdevkit_PATH)/usr/lib/libasound.so.2
MCFW_LIBS=$(LIB_DIR)/dvr_rdk_mcfw_api.a $(LIB_DIR)/dvr_rdk_link_api.a $(LIB_DIR)/dvr_rdk_osa.a $(SYSLINK_LIBS)
RPE_LIBS=$(rpe_PATH)/lib/lib/a8/debug/rpe.av5T
接下来加自己的库(仿造上面写)
CAR_LIBS=$(dvr_rdk_PATH)/UnitCheck/src/libcarview.so
然后加到自己要生成文件后面
LIBS= $(LIB_DIR)/UnitCheck.a $(MCFW_LIBS) $(AUDIO_LIBS) $(RPE_LIBS) $(CAR_LIBS)
转自:http://blog.csdn.net/mianhuantang848989/article/details/27224383