TI Stellaris M3的硬件断点数

 TI Stellaris M3的硬件断点数

Cortex-M3内核支持8个硬件断点(hardware breakpoints)以及4个监测点/观察点(Watchpoints)。
(来自http://www.arm.com/zh/products/processors/cortex-m/cortex-m3.php 规范一页)

不同的仿真工具所支持的调试断点数量不同,如果用TI的Stellaris ICDI调试,那么最多只能支持6个断点,在Keil环境下如果设置断点超过六个,进入调试环境会提示出错,如果是在IAR环境下,设置的断点最多就只能到6个,再多就会提示调试器驱动报错。如果是使用J-link调试工具,那么可以提供的断点要多得多,我试过了不论在Keil还是IAR环境下,所能够设置的断点都能到达20个以上。另外,用Keil下载程序的时候会有如下的提示信息:
Device: LM3S9B96

VTarget = 3.377V

State of Pins:
TCK: 1, TDI: 0, TDO: 1, TMS: 0, TRES: 1, TRST:
1
Hardware-Breakpoints: 6
Software-Breakpoints: 8192

Watchpoints:          4

JTAG speed: 2000 kHz

也就是说,它能提供的断点除了6个硬件断点之外,还有8192个软件断点。但是这个软件断点,就需要相应的仿真器支持才可以设置,TI的ICDI驱动就是不支持软件断点,所以只能设定6个断点。而J-link因为支持软件断点,所以可以提供多得多的断点用来调试。

另外为什么Cortex-M3内核的说明上说支持8个断点而实际的硬件断点只能设置6个呢?这个我们可以看一下IAR的一个说明(Technical Note 31070)可以看到,IAR将两个硬件断点用作特殊用途了,一个是停在main()函数,另外一个用于堆栈:

http://supp.iar.com/Support/?note=31070&from=note+95436

 

Technical Note 31070

Use all hardware breakpoints (EWARM 6.x, 5.x & 4.x)
EW targets: ARM
EW component: C-SPY debugger
Keywords: emulator, hardware breakpoint, on-chip breakpoint
Last update: May 27, 2011

The number of hardware breakpoints can become a limitation when debugging in hardware. (ARM-cores before Cortex/Coresight typically have 2 hardware breakpoints.)

Problem

I want to use all hardware breakpoint for my own debugging. I want to keep C-SPY from using any hardware breakpoints at all.

What to do

Disable the breakpoints that C-SPY sets.

Disadvantages

When you debug your application you will not be able to: run to main; use the stack plugin; use the "C-SPY Debugger runtime interface" (for example the I/O window in C-SPY, for full details see the corresponding chapter in the Compiler Guide).

How to do it (version 6.20 and later)

Perform the following actions:

? Disable : Project > Options > Debugger > Setup > "run to"
 
? Disable : Tools > Options > Stack > "Disable all checkboxes"
 
? Select : Project > Options > General Options > Library configuration > Library low-level interface implementation > None
 

How to do it (version 6.10 and 5.x)

Perform the following actions:

? Disable : Project > Options > Debugger > Setup > "run to"
 
? Disable : Project > Options > Debugger > Plugins > "stack"
 
? Select : Project > Options > General Options > Library configuration > Library low-level interface implementation > None
 

How to do it (v.4.xx)

Perform the following actions:

? Disable : Project > Options > Debugger > Setup > "run to"
 
? Disable : Project > Options > Debugger > Plugins > "stack"
 
? Disable : Project > Options > Linker > Output > Format > "With runtime control modules"
 

Example projects (v.4.xx)

To the right you find examples (made with EWARM v.4.31A) for some of the IAR evaluation boards.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值