Renesas H8S/2628 Technické informace Strana 245

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 430
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 244
217
5.12 Stopping Your Program
This section describes how you can halt execution of your application's code. This section describes how to do
this directly by using the [Stop] button and by setting breakpoints at specific locations in your code.
5.12.1 Stopping the Program by the [Stop] Toolbar Button
When your program is running, the [Stop] toolbar button is enabled (
) (a red STOP sign), and when the
program has stopped it is disabled (
) (the STOP sign is grayed out). Click on the [Stop] toolbar button, or
choose [Debug->Halt Program].
When the program has been stopped by [Stop], "Stop" is displayed in the [Debug] sheet of the [Output] window.
5.12.2 Standard Breakpoints (PC Breakpoints)
When you are trying to debug your program you will want to be able to stop the program running when it
reaches a specific point or points in your code. You can do this by setting a PC breakpoint on the line or
instruction at which to want the execution to stop. The following instructions will show you how to quickly set
and clear simple PC breakpoints. If more complex breakpoint operation is required, use the [Event] window,
which can be opened by clicking the (
) button or choosing [View -> Code -> Eventpoints]. For details, refer
to section 5.15, Using the Event Points.
To set a PC breakpoint in the [Source] window
1. Make sure that the [Disassemble] or a [Source] window is open at the place you want to set a PC
breakpoint.
2. Choose [Toggle Breakpoint] from the popup menu, or press F9, at the line showing the address at which
you want the program to stop.
3. You will see a red circle appear in the gutter to indicate that a PC breakpoint has been set.
4. The current breakpoint set can be enabled or disabled by using [Enable/Disable Breakpoint] in the popup
menu.
Now when you run your program and it reaches the address at which you set the PC breakpoint, execution halts
with the message "PC Break" displayed in the [Debug] sheet of the [Output] window, and the [Source] or
[Disassembly] window is updated with the PC breakpoint line marked with an arrow in the gutter.
Note: When a break occurs, the program stops just before it is about to execute the line or instruction at which
you set a program PC breakpoint. If you choose Go or Step after stopping at the PC breakpoint, then the
line marked with an arrow will be the next instruction to be executed.
Zobrazit stránku 244
1 2 ... 240 241 242 243 244 245 246 247 248 249 250 ... 429 430

Komentáře k této Příručce

Žádné komentáře