NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Breakpoint

From Texas Instruments Wiki
Jump to: navigation, search

Breakpoint[edit]

Breakpoints stop the execution of the program. While the program is stopped, you can examine the state of the program, examine or modify variables, examine the call stack, etc. The Unified Breakpoint Manager lets you create or control one or more breakpoints. Depending on your target, you may see additional options, including watchpoints, trace triggers, count events, watchdog timers, or other trace actions.

Breakpoints can be set on a line of source code in the Source Code Window or a disassembled instruction in the Disassembly Window. After a breakpoint is set, it can be enabled or disabled. It can also have actions or conditions associated with it.

Software vs. Hardware Breakpoints There are two types of breakpoints: software breakpoints and hardware breakpoints. A software breakpoint is implemented as an opcode replacement, whereas a hardware breakpoint is implemented internally by the hardware. There is no limit to the number of software breakpoints you can set. However, because hardware breakpoints require on-chip analysis resources, you are limited to a maximum of 2-4 hardware resources. On simulator their is no limit for no. of hardware breakpoints. Hardware breakpoints can come in two types, program breakpoints and data breakpoints. Generally, hardware breakpoint capability is called Advanced Event Triggering inside CCS.

Intrusive vs. Nonintrusive Breakpoints An intrusive breakpoint halts the target. Breakpoints on simulators are always intrusive. A nonintrusive breakpoint won’t halt the target when evaluating a condition.


Learn More[edit]

Setting Breakpoint via DSS[edit]

Breakpoint can be via DSS script including the breakpoint properties.

  • Setting intrusive breakpoint - halts the target
var bp1 = debugSession.breakpoint.add("0x100")    // breakpoint with address
var main = debugSession.symbol.getAddress("main")   // Query for address of label "main"
var bp1 = debugSession.breakpoint.add(main)     // set breakpoint based on the address "main"
  • Setting non-intrusive breakpoint - perform an action on breakpoint hit

Breakpoint can be set by creating a breakpoint property object. Breakpoint properties are set via "setString()" DSS api. To get the property name and possible value, on CCS IDE right click on breakpoint & select the properties.

Break prop.jpg

Propery name are directly dervied from the properties displayed along with thei hirearchy.

Ex.
"Hardware Configuration.Location"
"Debugger Response.Action.Expression"
"Debugger Response.Skip Count"

Note: Some of the properties are read-only, cannont be modified. Ex: "Hardware Configuration.Location.symbolic" & "Debugger Response.Skip Count.Current Count"
  • Example script to set breakpoint, which execute GEL command as debugger action
// for setting breakpoint to perform gel command
var bpProps2 = session.breakpoint.createProperties(1);

bpProps2.setString("Miscellaneous.Name", "Breakpoint");    // Mandatory to select the breakpoint
bpProps2.setString("Hardware Configuration.Location",0x500);    // Breakpoing at PC address

bpProps2.setString("Debugger Response.Action","Execute Expression(GEL)");
bpProps2.setString("Debugger Response.Action.Expression", "GEL_DriverString(\"SIM_EXCEPTION,ON\")");   // Set the gel command to be executed


var bp2 = session.breakpoint.add(bpProps2);   // add breakpoint
  • Example script to set breakpoint, which control profiling for pause & resume profiling collection for profiler
// for setting breakpoint to perform profile control point
var bpProps2 = session.breakpoint.createProperties(1);

bpProps2.setString("Miscellaneous.Name", "Breakpoint");
bpProps2.setString("Hardware Configuration.Location",0x500);    // Breakpoing at PC address

bpProps2.setString("Debugger Response.Action","Control Profiling");
bpProps2.setString("Debugger Response.Action.Type", "Pause Profiling"); //Option for action type - "Pause Profiling","Resume Profiling" & "Terminate Profiling"

var bp2 = session.breakpoint.add(bpProps2); // add breakpoint
  • Example script to set breakpoint at the exit of the program. Convenient to add the the loadti tool (in main.js)
var bpExit = debugSession.breakpoint.add("C$$EXIT")
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Breakpoint here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Breakpoint here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Breakpoint here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Breakpoint here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Breakpoint here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Breakpoint here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Breakpoint here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Breakpoint here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Breakpoint here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity