完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
本帖最后由 一只耳朵怪 于 2018-5-31 16:28 编辑
最近要在DM6467上面集成一个第三方的*.lib文件,这个.lib是第三方在CCS上编译出来的,且没有遵照xDM的标准。 现在我要集成到DM6467上面来,所以自己新建了一个IMGENC的Codec,对这个*.lib做了一个简单封装,使其遵循xDM的标准。然后在ARM端调用xDM的接口,调用这个.lib的功能。 因此我在这个Codec的package.bld文件的最顶端添加了这一句话(假设这个.lib文件放在Codec目录下的./ThirdPart/ThirdPart.lib): Pkg.attrs.lopts = "-l ./ThirdPart/ThirdPart.lib" 在编译整个.x64P文件(即Server)的最后出现了编译错误,内容如下(我要生成的.a64P文件叫'platerecognize.a64P',.x64P文件叫'PhocusALG.x64P' ): undefined first referenced symbol in file --------- ---------------- _TH_RecogImage /home/Phocus1855/ALG_20111010/packages/unic/sdo/codecs/platerecognize/lib/platerecognize.a64P _TH_InitPlateIDSDK /home/Phocus1855/ALG_20111010/packages/unic/sdo/codecs/platerecognize/lib/platerecognize.a64P _TH_UninitPlateIDSDK /home/Phocus1855/ALG_20111010/packages/unic/sdo/codecs/platerecognize/lib/platerecognize.a64P >> error: relocation overflow occurred at address 0x00000048 in section '.text' of input file 'platerecognize.o64P (/home/Phocus1855/ALG_20111010/packages/unic/sdo/codecs/platerecognize/lib/platerecognize.a64P)'. The 29-bit PC-relative displacement 471141000 at this location is too large to fit into the 21-bit PC-Relative field; the destination address is too far away from the instruction. You may need to add a mask to the assembly instruction or use other target specific assembly features if you really only need the lowest 21 bits of this symbol. Please see the section on Relocation in the Assembly User's Guide. >> error: relocation overflow occurred at address 0x000000cc in section '.text' of input file 'platerecognize.o64P (/home/Phocus1855/ALG_20111010/packages/unic/sdo/codecs/platerecognize/lib/platerecognize.a64P)'. The 29-bit PC-relative displacement 471140968 at this location is too large to fit into the 21-bit PC-Relative field; the destination address is too far away from the instruction. You may need to add a mask to the assembly instruction or use other target specific assembly features if you really only need the lowest 21 bits of this symbol. Please see the section on Relocation in the Assembly User's Guide. >> error: relocation overflow occurred at address 0x00000224 in section '.text' of input file 'platerecognize.o64P (/home/Phocus1855/ALG_20111010/packages/unic/sdo/codecs/platerecognize/lib/platerecognize.a64P)'. The 29-bit PC-relative displacement 471140880 at this location is too large to fit into the 21-bit PC-Relative field; the destination address is too far away from the instruction. You may need to add a mask to the assembly instruction or use other target specific assembly features if you really only need the lowest 21 bits of this symbol. Please see the section on Relocation in the Assembly User's Guide. >> error: symbol referencing errors - 'PhocusALG.x64P' not built gmake[1]: *** [PhocusALG.x64P] Error 1 gmake: *** [packages/unic/sdo/servers/encode,.executables] Error 2 make: *** [servers] Error 2 我现在想知道是在DVSDK的编译环境下面如果在Codec里面调用*.lib文件,在编译阶段应该如何配置自己的编译脚本? 希望TI的专家们能予以回复。 |
|
相关推荐
10个回答
|
|
|
如下
1. 这个.lib不遵循xdm标准,是否表示其对堆栈和任何形式的存储空间(片内,片外)的使用是随意的,如果是,则是无法集成到codec server的combo里也不能保证甚至是无法和其它Codec一起运行的 2. 这个.lib编译过程中使用的ToolChain要和DVSDK保持一致 |
|
|
|
|
rwd2016 发表于 2018-5-31 03:01 这个个.lib肯定不遵循xdm标准,它对对堆栈和任何形式的存储空间(片内,片外)的使用是随意的。按照我提到的编译方法,在编译的最后阶段会出现上述错误。但是在那个Codec的目录下,还是会生成一个.a64P文件,即这个Codec是编译成功了,只是在最后编译.x64P的时候出错了。出错的原因应该是.x64P没有找到那几个接口函数所需要的.lib文件。 事实上,如果我在整个.x64P最顶端的那个config.bld文件中加上这样一句话 C64P.lnkOpts.suffix = " -l /xxx/xxx/xxx/xx/ThirdPart/ThirdPart.lib" ; (xxx代表具体的路径) 整个.x64P的编译是通过的。这至少说明,.lib至少可以被.x64P引用。但是这样做的结果就是在最后发布我自己的Codec的同时(.a64P或者叫.l64P),还要暴露那个.lib。 事实上,我要封装的就是那个.lib,发布的时候我只想发布我自己编译生成的那个Codec的.a64P(或者叫.l64P),不想暴露那个.lib。所以我想知道的是如何在发布的时候不暴露这个.lib,我最想要的结果就是那个Codec自己引用.lib即可通过所有的编译。 至于你提到的“.lib编译过程中使用的ToolChain要和DVSDK保持一致”,那个.lib肯定不是在DVSDK里面编出来的,而且那个.lib也不是在6467上编译的,它是在DM642上编译出来的,且是用CCS编译出来的(由于是第三方的,所以具体的CCS版本也无从知晓)。 再次感谢您的回复 |
|
|
|
|
邀杯同醉酒 发表于 2018-5-31 03:12 1. 编肯定是能编出来的,编出来也不一定能够正确运行 2. 您最后发布的是.x64P的Combo就可以不暴露.a64P,如果单纯发布.a64P的Codec好像不太可能不暴露 |
|
|
|
|
rwd2016 发表于 2018-5-31 03:28 谢谢哦, VampireDaVinci 还有哪位TI的大爷能帮我回答一下这个问题么?不胜感激呀 |
|
|
|
|
|
信VampireDaVinci没错的. :) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rwd2016 发表于 2018-5-31 03:28 我和楼主遇到同样的问题,是同一个库,这个第三方库就是一个车牌识别的库。 可以编译,调用初始化成功,也调用TH_Getversion看到版本号。就是执行TH_RecogImage时不返回了。都测试了一个礼拜, 没找到办法。 楼主解决了吗?,请给些提示。 |
|
|
|
|
rwd2016 发表于 2018-5-31 03:01 Vampire 你好! 我是在dvsdk1.4下编译,server下没有bld文件,请问,我应该在哪里添加对lib的链接呢?谢谢! |
|
|
|
|
maishengwei 发表于 2018-5-31 04:27 我也要遇到了类似问题,不知道楼主最后是如何解决的呢 |
|
|
|
|
只有小组成员才能发言,加入小组>>
550 浏览 0 评论
1613 浏览 0 评论
2047 浏览 0 评论
为啥BQ7693003DBTR芯片在和BQ769X0盒子通讯时收不到信号?
1514 浏览 0 评论
DSP 28027F 开发板 XDS100v2调试探针诊断日志显示了 Error -150 (SC_ERR_FTDI_FAIL)如何解决
1338 浏览 0 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
1757浏览 29评论
2782浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
1724浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
1634浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
1645浏览 13评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 14:27 , Processed in 0.874855 second(s), Total 61, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2109