收藏 分享(赏)

dsp 编译错误与解决方法.doc

上传人:hwpkd79526 文档编号:7127414 上传时间:2019-05-06 格式:DOC 页数:4 大小:38KB
下载 相关 举报
dsp 编译错误与解决方法.doc_第1页
第1页 / 共4页
dsp 编译错误与解决方法.doc_第2页
第2页 / 共4页
dsp 编译错误与解决方法.doc_第3页
第3页 / 共4页
dsp 编译错误与解决方法.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、 dsp-ccs 部分错误及解决 1,ERROR multiple sections with name PAGE0 解决 PAGE 0 中间有个空格隔开。 2 ERROR MEMORY specification ignored 解决 书写格式错误 3 ERROR:zero or missing length for memory area SPRAM SPRAM: origin=0x0060H, 解决 书写格式错误 4 WARNING: entry point other than _c_int00 specified 解决,在“TMS320C6000 优化汇编手册”第五章“链接 C/C+

2、代 令人生厌的 multiple definition of 我把所有的全局变量写在一个 global.h 里 然后其他文件都 include 了它 于是出现了 multiple definition of . 编译器 gcc ) 后来在网上搜到了很多类似的错误大家各有各的烦心事。我的代码结构 main.cpp #include “global.h“ WinMain() . file_1.cpp #include “global.h“ file_2.cpp #include “global.h“ . 由于工程中的每个文件都是独立的解释的即使头文件有 #ifndef _x_h #enfif )

3、在其他文件中只要包含了 global.h 就会独立的解释,然后生成每个文件生成独立的标示符。在编译器连接时,就会将工程中所有的符号整合在一起,由于文件中有重名变量,于是就出现了重复定义的错误。下面是解决方法在 global.c 或.cpp) 中声明变量 然后建一个头文件 global.h 在所有的变量声明前加上extern . 如 extern HANDLE ghEvent; 注意这儿不要有变量的初始化语句。然后在其他需要使用全局变量的 cpp 文件中包含 .h 文件而不要包含 .cpp 文件。编译器会为 global.cpp 生成目标文件 然后连接时 在使用全局变量的文件中就会连接到此文件

4、。 在其他文件中只要包含了 global.h 就会独立的解释,然后生成每个文件生成独立的标示符。在编译器连接时就会将工程中所有的符号整合在一起,由于文件中有重名变量,于是就出现了重复定义的错误。 cant open file /.obj for input 是什么原因引起的? cmd 文件中有不合法的符号 比如“ /”等1 fatal error: #error NO CHIP DEFINED 详细的出错信息:“ -g -q -fr“e:/project_documents/dsp_project/dsp_mp3/Debug“ -d“_DEBUG“ -“Debug.lkf“ .c“ “.“,

5、line 141: fatal error: #error NO CHIP DEFINED 1 fatal error detected in the compilation of “.c“. 在 Build Options 的 compiler 里设置“-d“CHIP_“如果没有设置一下 2 Q I have started to study the book “Digital Signal Processing and Applications with the C6713 and C6416 DSK (by Rulph Chassaing, 2005)“. I am working wi

6、th a C6713DSK, using CCS 3.1. But when I try to run the first example (sine8_LED) in Rulph Chassaings book on the C6713 Device Cycle Accurate Simulator, I get the following error messages: Trouble running Target CPU: Memory Map Error: READ access by CPU to address 0x1b7c100, which is RESERVED in Har

7、dware. Trouble running Target CPU: Memory Map Error: WRITE access by Default to address 0x1b7c100, which is RESERVED in Hardware. A Generally this type of error means that the CCS sees this section of memory marked as either Read-Only or RESERVED (Dont read or write). CCS can be passed a virtual mem

8、ory map which is a safety net for the user. If you look inside your DSKs GEL file you will see a number of instruction calls for GEL_MapAdd() with six arguments inside. Two of these arguments denote a starting address range and the length of that range. These are used to notify CCS what memory is va

9、lid (and by extension, everything not mentioned is invalid memory). Take a look inside your DSK6713.gel file (probably located in C:CCStudio_v3.1ccgel) and find where the GEL_MapAdd() instructions are located. You should see something similar to the following: GEL_MapAdd(0x01b7c000, 0, 0x00000128, 1

10、, 1); / PLL here 0x01b7c000 is the starting address and 0x00000128 is the length of valid memory. Because 0x1b7c100 falls within this range, if your GEL file looks like this CCS should then allow accesses to this register. The GEL file may need to be updated so that the address of the PLLCSR registe

11、r is included to the CCS Memory Map. I actually just noticed that the title of your post is “C6713 Device Cycle Accurate Simulator“ but you mentioned using the DSK. Can you please clarify which you are using? If using the DSK, open the DSK6713.gel file found in C:CCStudio_v3.1ccgel and locate the se

12、tup_memory_map() function. Inside this function you should see numerous calls to GEL_MapAdd(). One of these will look similar to the one I copied in my last post. Once you find the function call that starts with the address 0x01b7c000, find out the length of this range (which should be the third arg

13、ument). If this length does not cover address 0x01b7c100, modify the range to something like 0x00000128 to ensure that all of the PLL registers are included. If you are using the Cycle Accurate Simulator, I think this might be a limitation of the simulator software as it is run entirely on software

14、as opposed to hardware. Well, you can modify the init6713sim.gel file in the same directory to add a GEL_MapAdd() from my earlier post. With the original GEL file CCS thinks that this memory range is invalid (because the simulator does not support the PLL). This would get rid of the errors regarding

15、 accessing that memory space, but because the PLL is not supported on the simulator writes to this address will not work. Ive seen the project you mentioned before, but I do not remember enough about it to know whether or not this would cause the application to fail. I think a bigger question here i

16、s why work on the simulator if you have a DSK handy? The code from that book is designed specifically to work on the DSK hardware, not on a CPU simulator. 3 把调试程序的时候的一些错误提示和解决方法记录下来,有备无患 1.symbol referencing errors undefined first referenced symbol in file - - _dot_asm E:CCStudio_v3.1MyProjectsdot_m

17、py_6211Debugmain.obj error: symbol referencing errors 提示找不到符号,一般是出现在用 c 调用汇编函数的时候,比较大的可能性是汇编程序里面的标号写错了(特别是前面少了一个下划线 ),或者是忘记将标号定义成全局的了 (在文件开头用 “.global 标号“的形式可以定义 ) 不过我碰到另外一种情况,是由于存在同名的文件. 比如说我的工程里面,有 dot.c 和 dot.asm 两个文件,分别定义了 dot_c 和 dot_asm 两个函数,这个时候就会有其中一个函数提示找不到了,经过检查,原来 CCS 在编译的时候,会根据文件名(不含扩展名)

18、 生成同名的目标文件(扩展名为 obj),而我前面的两个文件,文件名相同而扩展名不同,那么在编译的时候,就会有一个生成的目标文件被另外一个覆盖的问题(取决于编译的顺序).知道了原因就好解决了,只要这两个文件的文件名不要相同就好了. 2.弹出一个确认框,提示“TRDX target application does not match emulation protocol!Loaded program was created with an rtdx library which does not match the target device“ 错误原因是使用的是软件模拟(Simulator),

19、不能模拟 JTAG 解决方法: 打开 cdb 文件,选择“Input/Output - RTDX-Real-Time Data Exchange Settings“右键,然后选择“Properties“,打开对话框,RTDX Mode 的下拉列表中选择 Simulator(默认值是 JTAG,需要接仿真器才能用默认值) 放在这里备用吧. 各位大侠小弟以前用的是 cc2000 现在改用 ccs2.2 但是在编译的时候报错说不能打开 obj 文件,我查了一下在指定的 obj 保存目录下根本就没生成 obj 文件,修改一下编译的路径 在编写 DSP 程序时遇到一个很奇怪的问题,我的程序在 CCS4.

20、1 版本下运行正常 但在 2.20 版本中确总是出现以下编译问题 cant open file E:HNJN100.obj for input 版本一样 编译器版本不一样,这时要从新建立.mak 文件,然后 add files 包含进来.cmd .asm 等程序文件编译即可,不能直接打开编译 .cmd 文件错 快刀斩乱麻,进入你的项目文件夹 把所有.obj 文件删掉 一般在 obj 文件夹中 然后执行 rebuild all 一般就能解决问题。 1112.mak, LINE 32: -o flag does not specify a valid file NAME : cant open f

21、ile .out for input Build Complete, 2 Errors, 0 Warnings. bill(75623171) 12:51:05 这个是什么原因 补充两句 现代编译器都支持分别编译技术 即每个文件都可以独自编译生成二进制目标文件 .obj最后连接在一起生成可执行文件 .out 。问题是 ccs 编译器采用了独特的识别文件修改的方法 如果原文件的修改时间大于目标文件的修改时间 编译器就认为次原文件被修改过。如果用户的工程文件曾经复制到别的电脑并做过修改,此时清查,看并修改原文件的修改时间。否则就可能出现编译上的错误 这往往是由两台电脑的时间系统不同而导致的。就像我遇到的这种错误一样。如史修栋所说 把所有.obj 文件删掉 一般在 obj 文件夹中 然后执行 rebuild all

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报