TI中文支持网
TI专业的中文技术问题搜集分享网站

DSP6748 仿真运行没问题,脱机跑一直复位

Other Parts Discussed in Thread:SYSBIOS

将栈空间放大后问题解决了,但是不明白为什么仿真运行没问题?

Shine:

建议用仿真器跟踪一下boot过程,对比一下和仿真运行时堆栈有什么不同?

连上仿真器,板子上电,打开CCS, load symbols,然后可以设置硬件断点跟踪boot过程。

"Load Symbols" instead of "Load Program"

When debugging an application from flash, you want to let the application boot in its normal manner. If you select "load program" in CCS then you are overwriting the application that loaded from flash and not debugging the code as it runs normally. You should instead do "load symbols" in CCS and then select your .out file. This will allow you to debug your code using variable/function names without overwriting the code that boots from the flash.
CCS 3.3: Go to File -> Load Symbols -> Load Symbols Only
CCS 4.x: Right-click on the project and select Debug Options. On the "Debugger" tab choose "Load Symbols" instead of "Load Program"
CCS 5.x: In the "Debug View" tab choose "Run"–> "Load" –> "Load Symbols"

,

Lin Gang:

故障复现了! 我想再请问一下。ccs中设置的软件断点和硬件断点有什么区别?

,

Lin Gang:

有没有文档详细介绍ccs中这些调试功能怎么使用?

,

Shine:

因为跟踪boot时,只是load symbols,并没有load program,所以只能设置硬件断点。
请参考下面的文档。
5.1 Software and Hardware Breakpoints
www.ti.com/…/sprac17b.pdf

,

Lin Gang:

嗯好的,对比了一下脱机跑和仿真运行的区别。发现脱机跑进某个函数时sp指针值没有减少,维持不变。但是仿真跑的时候sp指针正常减小了。进该函数之前sp距离栈底还有0x705的距离 sp不正常减小是为啥?

,

Lin Gang:

我现在工程使用了xdc组件 但是没有跑sysbios 我想问一下会不会是哪里配置了栈溢出的保护,使得栈必须有一定的预留空间在。所以栈指针不自动减小了?

,

Shine:

请查看一下下面的FAQ,看一下cmd文件里不要占用ROM bootloader里使用的16KB shared RAM。
The ROM bootloader itself uses 16 KB of Shared RAM starting from 0x80000000 for multiple purposes. This
memory should not be used by any initialized section of the user application.

另外,看一下在代码编译时,请使用ROM autoinitialization model (-c) 编译选项。
When booting code through the ROM, make sure you are using the ROM autoinitialization model (-c) in your
linker options. If the RAM autoinitialization model is used (-cr), some memory locations will never get loaded
even though they did under CCS. You can find the build option here:
• CCS3.3: Build Options -> Linker -> Autoinit Model
• CCS4+: Build Options -> Runtime Environment

www.ti.com/…/spracm8a.pdf

赞(0)
未经允许不得转载:TI中文支持网 » DSP6748 仿真运行没问题,脱机跑一直复位
分享到: 更多 (0)