




全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
编译、编写自己的信号处理模块珠海:叶少聪我们在编写USRP模块的时候,一般都是使用GNU RADIO模板,把模板修改一个名字,然后在函数中编写自己的程序,这样就可以独立运行了,但是目前的GNU RADIO模板是3.3.0版本,这个版本增加了CppUnit测试代码,目录结构也跟以往不太一样,刚开始的时候,修改还真有困难,今天做了一个小实验,记录了这次使用模板的全过程:解压3.3版本的代码到目录中,并将目录改成自己需要的名称linux-3a23:/home/shaocong_ye/project # gzip -c gr-howto-write-a-block-3.3.0.tar.gz linux-3a23:/home/shaocong_ye/project # tar -vxf gr-howto-write-a-block-3.3.0.tar linux-3a23:/home/shaocong_ye/project # mv gr-howto-write-a-block-3.3.0 mathbaselinux-3a23:/home/shaocong_ye/project # cd mathbase然后删除多余的文件linux-3a23:/home/shaocong_ye/project/mathbase # rm lib/howto_square2_ff.h linux-3a23:/home/shaocong_ye/project/mathbase # rm lib/howto_square2_ff.cc linux-3a23:/home/shaocong_ye/project/mathbase # rm swig/howto_square2_ff.i 再把文件名改成自己需要的linux-3a23:/home/shaocong_ye/project/mathbase # mv lib/qa_howto.h lib/qa_mathbase.hlinux-3a23:/home/shaocong_ye/project/mathbase # mv lib/qa_howto_square_ff.h lib/qa_mathbase_sqrt_ff.hlinux-3a23:/home/shaocong_ye/project/mathbase # mv lib/qa_howto_square_ff.cc lib/qa_mathbase_sqrt_ff.cclinux-3a23:/home/shaocong_ye/project/mathbase # mv lib/qa_howto.cc lib/qa_mathbase.cclinux-3a23:/home/shaocong_ye/project/mathbase # mv lib/howto_square_ff.h lib/mathbase_sqrt_ff.hlinux-3a23:/home/shaocong_ye/project/mathbase # mv lib/howto_square_ff.cc lib/mathbase_sqrt_ff.cclinux-3a23:/home/shaocong_ye/project/mathbase # mv grc/howto_square_ff.xml grc/mathbase_sqrt_ff.xmllinux-3a23:/home/shaocong_ye/project/mathbase # mv apps/howto_square.grc apps/mathbase_sqrt.grclinux-3a23:/home/shaocong_ye/project/mathbase # mv apps/howto_square.py apps/mathbase_sqrt.pylinux-3a23:/home/shaocong_ye/project/mathbase # mv swig/howto.i swig/mathbase.ilinux-3a23:/home/shaocong_ye/project/mathbase # mv swig/howto_square_ff.i swig/mathbase_sqrt_ff.ilinux-3a23:/home/shaocong_ye/project/mathbase # mv python/qa_howto.py python/qa_mathbase.py 查找到有square2字符串的文件,删除这些行(因为这个与我们的目标代码无关,如果有关,就需要留下)find . -print | xargs grep square2根据上面操作,查找到的文件,删除与square2有关的的行./grc/Makefile.am:howto_square2_ff.xml./grc/Makefile.in:howto_square2_ff.xml./lib/mathbase_sqrt_ff.h: * sa howto_square2_ff for a version that subclasses gr_sync_block./lib/Makefile.am:howto_square2_ff.h./lib/Makefile.am:howto_square2_ff.cc./lib/Makefile.am:qa_howto_square2_ff.cc./lib/Makefile.am:qa_howto_square2_ff.h./lib/qa_mathbase.cc:#include ./lib/qa_mathbase.cc: s-addTest(qa_howto_square2_ff:suite();./lib/Makefile.in:qa_howto_square2_ff.lo./lib/Makefile.in:howto_square2_ff.lo./lib/Makefile.in:howto_square2_ff.h./lib/Makefile.in:howto_square2_ff.cc./lib/Makefile.in:qa_howto_square2_ff.cc./lib/Makefile.in:qa_howto_square2_ff.h./lib/Makefile.in:AMDEP_TRUEam_include am_quote./$(DEPDIR)/howto_square2_ff.Ploam_quote./lib/Makefile.in:AMDEP_TRUEam_include am_quote./$(DEPDIR)/qa_howto_square2_ff.Ploam_quote./swig/mathbase.i:#include howto_square2_ff.h./swig/mathbase.i:%include howto_square2_ff.i./swig/Makefile.am:howto_square2_ff.i./swig/Makefile.in:howto_square2_ff.i./swig/Makefile.in:PYTHON_TRUEhowto_square2_ff.i./python/qa_mathbase.py: def test_002_square2_ff (self):./python/qa_mathbase.py: sqr = howto_swig.square2_ff ()替换所有文件中的square和howto字符串为自己需要的字符串,其中howto代表模块名称,square代表功能模块find . -print | xargs perl -pi -e s/square/sqrt/gfind . -print | xargs perl -pi -e s/howto/mathbase/g最后编译就是了./bootstrap./configure -prefix=/usrmakemake check检测结果如下:linux-3a23:/home/shaocong_ye/project/mathbase # make check Making check in configmake1: Entering directory /home/shaocong_ye/project/mathbase/configmake1: Nothing to be done for check.make1: Leaving directory /home/shaocong_ye/project/mathbase/configMaking check in libmake1: Entering directory /home/shaocong_ye/project/mathbase/libmake check-TESTSmake2: Entering directory /home/shaocong_ye/project/mathbase/lib.OK (2 tests)PASS: test_all=1 test passed=make2: Leaving directory /home/shaocong_ye/project/mathbase/libmake1: Leaving directory /home/shaocong_ye/project/mathbase/libMaking check in swigmake1: Entering directory /home/shaocong_ye/project/mathbase/swigmake check-ammake2: Entering directory /home/shaocong_ye/project/mathbase/swigmake2: Nothing to be done for check-am.make2: Leaving directory /home/shaocong_ye/project/mathbase/swigmake1: Leaving directory /home/shaocong_ye/project/mathbase/swigMaking check in pythonmake1: Entering directory /home/shaocong_ye/project/mathbase/pythonmake check-TESTSmake2: Entering directory /home/shaocong_ye/project/mathbase/python/home/shaocong_ye/project/mathbase/lib:/home/shaocong_ye/project/mathbase/lib/.libs:/home/shaocong_ye/project/mathbase/swig:/home/shaocong_ye/project/mathbase/swig/.libs:/home/shaocong_ye/project/mathbase/python:/usr/lib/python2.6/site-packages:/usr/lib/python2.6/site-packages:.-Ran 1 test in 0.002sOKPASS: run_tests=1 test passed=make2: Leaving directory /home/shaocong_ye/project/mathbase/pythonmake1: Leaving directory /home/shaocong_ye/project/mathbase/pythonMaking check in grcmake1: Entering directory /home/shaocong_ye/project/mathbase/grcmake1: Nothing to be done for check.make1: Leaving directory /home/shaocong_ye/project/mathbase/grcMaking check in appsmake1: Entering directory /home/shaocong_ye/project/mathbase/a
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025湖南永州市零陵高新技术产业开发区公开选调工作人员4人模拟试卷及答案详解(有一套)
- 2025河南洛阳市洛宁县招聘看护队伍劳务派遣人员45名考前自测高频考点模拟试题附答案详解(典型题)
- 2025江苏南京紫金山科技产业发展集团有限公司招聘3人模拟试卷附答案详解(突破训练)
- 2025甘肃兰州新区市政投资管理集团有限公司招聘32人考前自测高频考点模拟试题及一套参考答案详解
- 2025江苏淮安市洪泽区云创传媒有限公司总经理招聘考前自测高频考点模拟试题及一套答案详解
- 2025河南中医药大学招聘高层次人才考前自测高频考点模拟试题附答案详解(考试直接用)
- 2025广西南宁市青秀区委统战部招聘1人考前自测高频考点模拟试题及1套参考答案详解
- 2025春季中国核工业二四建设有限公司社会招聘考前自测高频考点模拟试题及参考答案详解一套
- 2025广东深圳市九洲电器有限公司招聘法务专员等模拟试卷及完整答案详解1套
- 2025北京丰台区新村街道办事处招聘城市协管员6人考前自测高频考点模拟试题及1套参考答案详解
- 尼康数码照相机D5600使用说明书
- 《燃烧基础知识》课件
- 江苏省南京市秦淮区2024-2025学年八年级上学期期中考试英语试题(含答案解析)
- 检验医学尿常规课件
- 职校开学第一课课件:谁说职业没前途
- TBT 3329-2013 电气化铁路接触网隧道内预埋槽道
- 2024版公司100%股权转让协议
- 便利店设计方案
- 对意外伤害儿童的紧急救治方法
- 为成果而管理
- 乳腺癌骨转移护理查房课件
评论
0/150
提交评论