Breakpoints and Program Stepping
FR Family MB2198-01 Emulating and Debugging Installation Guide, Doc. No. 002-05223 Rev. *A
14
Now we are “trapped”. Because the function
wait
has the parameter value
20000
(specified by
main
) for
counting, we would have to press about (number_of_instructions_in_
wait
multiplied by 20000) times “F5” until
we would be back in the
main
function.
Therefore the step-out command exists:
(
Debug
Run
Step out
or “Shift-F6”. Using this stepping method,
after a
further
step-in within the function, the next execution stop will be in the caller function (here:
main
) just
after return from the sub function:
Note, if you are using the simulator, you can’t step out from the top of a function. In emulation mode the step-out
command at the top of a function causes in a continued run mode.
To step through a program without entering sub functions you can use the step-over command:
(
Debug
Run
Step Over
or “F7”)
With the Execute-until-cursor-position command (
,
Debug
Run
Run Until Cursor
or “Ctrl-F7”) you can set
a temporary breakpoint. Therefore click into the source window so that the cursor is flashing. Then reset the CPU
and perform the command. The execution will stop at the cursor position.
Note, that the execution only stops, if the marked program code is executed. Be careful with conditional
instructions using this command.
28:
wait(20000);
=>
(
X
)
000C01E2: 9B044E20 LDI:20 #04E20,R4
=>
(
)
000C01E6: D7DB CALL \wait
29:
30:
PDR1++;
=>
(
)
000C01E8: 0A01 DMOVB @001,R13
.
=>
(
)
000C01EA: 8BD0 MOV R13,R0
=>
(
)
000C01EC: A410 ADD #1,R0
=>
(
)
000C01EE: 8B0D MOV R0,R13
=>
(
)
000C01F0: 1A01 DMOVB R13,@001
=>
(
)
000C01F2: E0F7 BRA 000C01E2
31: }
14: unsigned int i;
15:
16: void wait(unsigned int a)
=>
(
)
000C019E: 1704 ST R4,@-R15
.
=>
(
)
000C01A0: 1781 ST RP,@-R15
=>
(
)
000C01A2: 0F01 ENTER #004
17: {
18: for (i=0; i<a; i++);
=>
(
)
000C01A4: C000 LDI:8 #00,R0
=>
(
)
000C01A6: 9B3CC000 LDI:20 #3C000,R12
=>
(
)
000C01AA: 14C0 ST R0,@R12
=>
(
)
000C01AC: 9B3CC000 LDI:20 #3C000,R12
=>
(
)
000C01B0: 04C0 LD @R12,R0
=>
(
)
000C01B2: 2021 LD @(R14,8),R1
=>
(
)
000C01B4: AA10 CMP R1,R0
=>
(
)
000C01B6: E508 BNC 000C01C8
Summary of Contents for MB2147-01
Page 10: ......
Page 11: ...FUJITSU LIMITED DSU FR EMULATOR MB2198 01 HARDWARE MANUAL ...
Page 12: ......
Page 20: ...viii ...
Page 22: ...x ...
Page 56: ...34 CHAPTER 2 CONNECTION METHOD ...
Page 64: ...42 CHAPTER 3 OPERATION METHOD ...
Page 66: ......
Page 76: ...54 APPENDIX B User System Specifications ...
Page 78: ......
Page 92: ......