Skip to content Skip to navigation

Connexions

You are here: Home » Content » Setting Breakpoints in Crossworks

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • TI MSP430

    This module is included inLens: Texas Instruments MSP430
    By: Texas InstrumentsAs a part of collection:"Microcontroller and Embedded Systems Laboratory"

    Comments:

    "Basic introduction to microcontroller-based embedded systems development. Includes structured laboratory exercises in the following areas: assembly programming, C language programming, peripheral […]"

    Click the "TI MSP430" link to see all content affiliated with them.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Setting Breakpoints in Crossworks

Module by: CJ Ganier

Summary: A brief tutorial on how to set breakpoints in Crossworks.

C with an embedded controller does not have as many input-output (IO) features as a regular computer. To help you debug, it will sometimes be necessary to stop the processor while it is running and examine the state of the system. To accomplish this we will use breakpoints. A breakpoint is a specific command to the development environment to stop execution of the processor when a certain condition happens. These conditions range from when a certain instruction is reached to when certain data is written or read. The advanced options are broad.

To set a basic breakpoint, one which will stop execution when a certain line is reached, just click on the left margin of the C file on the line you want to trigger. A red dot should appear to indicate you have set a break point. Click once more to make it go away. Crossworks keeps track of all of the breakpoints for you. To see this information go to Debug->Debug Windows->Breakpoints this will pop up a list of all of the breakpoints you currently have enabled. The window also has buttons to create, delete, and modify breakpoints. There are several different types of breakpoints and each one is configured differently. We will use the same terminology for the breakpoints as the Rowley environment does, but the usage is not standardized.

A source code breakpoint triggers on arrival at a certain instruction in the source code. This kind of breakpoint can be created simply by left clicking on the left margin of the line in question. The breakpoint should then appear in the breakpoint window. Right clicking on the entry for a breakpoint allows you to edit it. For all breakpoints, you may select that they only trigger on a certain iteration by editing the Counter field. If left blank, the breakpoint will trigger each time it occurs. Entering a number into the counter field will trigger the breakpoint on that numbered time the event occurs.

Another kind of breakpoint is an expression breakpoint; it triggers when a certain function is executed or a variable is written to. To set a basic expression breakpoint highlight the name of the function or variable in question and right click on the item to bring up a menu. From this menu select “Set Breakpoint On <name of variable or function>.” You can still edit the breakpoint to use the counter.

Ranged breakpoints watch for data accesses and execution of instructions inside or outside of a specified memory range.

Finally valued breakpoints break when certain data is written to a variable. The mask capability lets you only look at a certain bit set of the value, and the comparison values allow you to select from a range of values to stop on. To set up a valued breakpoint, create an expression breakpoint for a variable and edit the breakpoint to be valued. Make sure that you select whether you anticipate the conditions being a write or a read.

Alternate explanations of breakpoints can be found in the help contents of the Crossworks system.

Comments, questions, feedback, criticisms?

Send feedback