1、DSP学习心得笔记DSP学习心得笔记- 白建成.baijc.icekoor建立新工程过程中:问题1:GPIO_Study.c, line 61: fatal error: could not open source file DSP280x_Device.h1 fatal error detected in the compilation of GPIO_Study.c.解决方法:因为project build optionscompilerpreprocessor中,要包含的头文件的地址没有加进去,你可以找到头文件的地址,然后加进去。问题2:undefined first reference
2、d symbol in file- -_c_int00 D:DSP studytest3DebugDSP280x_CodeStartBranch.objFS$MPY D:DSP studytest3DebugDSP280x_CpuTimers.objFS$TOL D:DSP studytest3DebugDSP280x_CpuTimers.obj error: symbol referencing errors - ./Debug/test3.out not built或者下面的问题:undefined first referenced symbol in file- -_c_int00 D:
3、DSP studyGPIO_StudyDebugDSP280x_CodeStartBranch.obj error: symbol referencing errors - ./Debug/GPIO_Study.out not built解决办法都是下面:这个问题是因为没有加在库文件,请在project build optionslinkerlibraries中加入rts2800.lib。问题3: warning: creating .stack section with default size of 400 (hex) words. Use -stack option to change
4、the default size. error: cant allocate .stack, size 00000400 (page 1) in RAMM1 (avail: 00000380) error: errors in input - ./Debug/GPIO_Study.out not built解决办法:这个问题是关于堆栈存储大小的问题,他是说,创建堆栈段使用与设置400个字,并建议在“堆栈操作”中改变这个与设置。这时,需要进行如下修改就可通过:project build optionsLinkerbasic,在Stack Size(-stack):填入800或者其他小于1024的
5、数值。调试程序:在编译完成之后,要来下载程序并进行功能调试。FileLoad Program,在工程文件夹下面的Debug文件夹下,选中*.out文件,点击打开,便开始下载程序了。将*.out文件下载到目标板上2812的RAM中。注意,这里是调试,所以将程序下载到RAM。等到最后您要固化程序的时候,就得下载到FLASH了,因为断电之后,RAM里面所有的数据都会消失。(Run和Animate的区别,Run是如果遇到断点的话它就停下来了。而Animate就算遇到断点时先停止DSP内核,刷新窗口,然后接着继续启动运行,常用来连续刷新变量窗口和生成graph图形等)知识储备。添加断点:加上断点的方法很
6、简单,只要在该行代码前双击就行。双击之后,这行代码前面会出现一个红色圆块。另外一种添加断点的方法,就是在刚才的编译工具栏上,点一下那个小手图形的按钮,前提是你要把光标移动到想要设置断点的哪一行上。使用watch window:Watch window的作用是来观察程序运行过程中的各个变量的值。调用watch window的方法是点击菜单栏的View ,watch window,这时watch window就会显示在CCS下方的信息区域;选中所要观察的变量,然后右键,在右键菜单中选择add to watch window。调试代码观察:我们在调试程序的时候经常想让程序从Main函数开使运行,点D
7、ebugGo main。 既能看到源文件中代码的执行情况,又能看到汇编指令的执行情况ViewMixed Source/Asm;关于F2812中用C语言来实现中断的说明1.首先在.cmd中定位系统中断表:MEMORYPAGE 0 : .PAGE 1 : . PIE_VECT : origin = 0x000D00, length = 0x000100. SECTIONS. PieVectTable : PIE_VECT, PAGE = 1.2.在C中制定该中断的结构体:#pragma DATA_SECTION(PieVectTable,PieVectTable);struct PIE_VECT_
8、TABLE PieVectTable;(在DSP28_GlobalVariableDefs.C中初始化)3.用一组常数(按照中断向量的顺序)初始化该名字为PIE_VECT_TABLE的表:typedef interrupt void(*PINT)(void);这里有些一问,一下应该为函数名?/ Define Vector Table:struct PIE_VECT_TABLE / Reset is never fetched from this table. / It will always be fetched from 0x3FFFC0 in either/ boot ROM or XIN
9、TF Zone 7 depending on the state of/ the XMP/MC input signal. On the F2810 it is always/ fetched from boot ROM. PINT PIE1_RESERVED; PINT PIE2_RESERVED; PINT PIE3_RESERVED; PINT PIE4_RESERVED; PINT PIE5_RESERVED; PINT PIE6_RESERVED; PINT PIE7_RESERVED; PINT PIE8_RESERVED; PINT PIE9_RESERVED; PINT PIE
10、10_RESERVED; PINT PIE11_RESERVED; PINT PIE12_RESERVED; PINT PIE13_RESERVED;/ Non-Peripheral Interrupts: PINT XINT13; / XINT13 PINT TINT2; / CPU-Timer2 PINT DATALOG; / Datalogging interrupt PINT RTOSINT; / RTOS interrupt PINT EMUINT; / Emulation interrupt PINT XNMI; / Non-maskable interrupt PINT ILLE
11、GAL; / Illegal operation TRAP PINT USER0; / User Defined trap 0 PINT USER1; / User Defined trap 1 PINT USER2; / User Defined trap 2 PINT USER3; / User Defined trap 3 PINT USER4; / User Defined trap 4 PINT USER5; / User Defined trap 5 PINT USER6; / User Defined trap 6 PINT USER7; / User Defined trap
12、7 PINT USER8; / User Defined trap 8 PINT USER9; / User Defined trap 9 PINT USER10; / User Defined trap 10 PINT USER11; / User Defined trap 11 / Group 1 PIE Peripheral Vectors: PINT PDPINTA; / EV-A PINT PDPINTB; / EV-B PINT rsvd1_3; PINT XINT1; PINT XINT2; PINT ADCINT; / ADC PINT TINT0; / Timer 0 PIN
13、T WAKEINT; / WD ./ Group 12 PIE Peripheral Vectors: PINT rsvd12_1; PINT rsvd12_2; PINT rsvd12_3; PINT rsvd12_4; PINT rsvd12_5; PINT rsvd12_6; PINT rsvd12_7; PINT rsvd12_8;然后在使我们在.cmd文件中定义的表有以上属性:extern struct PIE_VECT_TABLE PieVectTable;(在.h文件中)4.初始化该表(在.c文件中)使之能够为主程序所使用:const struct PIE_VECT_TABLE
14、PieVectTableInit = PIE_RESERVED, / Reserved space PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, PIE_RESERVED, / Non-Peripheral Interrupts INT13_ISR, / XINT13 or CPU-Timer 1 INT14_ISR, / CPU-Timer2 DATALOG_ISR, / Datalogging interrupt RTOSINT_ISR, / RTOS interrupt EMUINT_ISR, / Emulation interrupt
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1