<< Chapter < Page Chapter >> Page >
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.

Questions & Answers

if three forces F1.f2 .f3 act at a point on a Cartesian plane in the daigram .....so if the question says write down the x and y components ..... I really don't understand
Syamthanda Reply
hey , can you please explain oxidation reaction & redox ?
Boitumelo Reply
hey , can you please explain oxidation reaction and redox ?
Boitumelo
for grade 12 or grade 11?
Sibulele
the value of V1 and V2
Tumelo Reply
advantages of electrons in a circuit
Rethabile Reply
we're do you find electromagnetism past papers
Ntombifuthi
what a normal force
Tholulwazi Reply
it is the force or component of the force that the surface exert on an object incontact with it and which acts perpendicular to the surface
Sihle
what is physics?
Petrus Reply
what is the half reaction of Potassium and chlorine
Anna Reply
how to calculate coefficient of static friction
Lisa Reply
how to calculate static friction
Lisa
How to calculate a current
Tumelo
how to calculate the magnitude of horizontal component of the applied force
Mogano
How to calculate force
Monambi
a structure of a thermocouple used to measure inner temperature
Anna Reply
a fixed gas of a mass is held at standard pressure temperature of 15 degrees Celsius .Calculate the temperature of the gas in Celsius if the pressure is changed to 2×10 to the power 4
Amahle Reply
How is energy being used in bonding?
Raymond Reply
what is acceleration
Syamthanda Reply
a rate of change in velocity of an object whith respect to time
Khuthadzo
how can we find the moment of torque of a circular object
Kidist
Acceleration is a rate of change in velocity.
Justice
t =r×f
Khuthadzo
how to calculate tension by substitution
Precious Reply
hi
Shongi
hi
Leago
use fnet method. how many obects are being calculated ?
Khuthadzo
khuthadzo hii
Hulisani
how to calculate acceleration and tension force
Lungile Reply
you use Fnet equals ma , newtoms second law formula
Masego
please help me with vectors in two dimensions
Mulaudzi Reply
how to calculate normal force
Mulaudzi
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Microcontroller and embedded systems laboratory. OpenStax CNX. Feb 11, 2006 Download for free at http://cnx.org/content/col10215/1.29
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Microcontroller and embedded systems laboratory' conversation and receive update notifications?

Ask