APStech-Attila
10-27-2006, 05:02 PM
Hi Everyone!
·· I have developed a module to enable breakpoints and trace points for the Propeller! All you need is a terminal program to do breakpoint stepping.
In your code you will add breakpoints and tracepoints like this:
Line#20·|·BPT.BPT(1,20)····· 'Breakpoint(FileID, Line#)
Line#21·| outa[8]~~
Line#22·|· repeat
Line#23·|·· ·BPT.TRC(1,23)··· 'Tracepoint(FileID, Line#)
Line#24·|··· !outa[8]
··
In the hyperterminal you will see·cnt·time your code has reached a trace or breakpoint, you will see the cogid, fileID (or other·8bit information - it supports constants and variables too!) and finally the line number (HEX)
B03303B1 TRC 00010026
B041CCE1 TRC 00010017
B05071F1 TRC 0001001A
B05G2G21 BPT 00010023
The code runs normally, until it·run into·a trace or breakpoint.
If your code is executing a tracepoint, a trace infromation is sent to the terminal via RS232, so you can see "File 1, line 23 was executed by COG $00,·at cnt time $B041CCE1" . This way it easy to see if a condition was true, see how your case statements work,·calculate cycle time, etc.
A breakpoint is very similar to a tracepoint, but·a breakpoint·halts the·execution until user interaction. It will show the same infromation, just it will wait for a keypress on hyper terminal, to continue execution. Combined with the "monitor.spin" you can see all variables, modify them if you want before continuing execution.
I have started working on a PC software, that will display the actual BPT and TRC in realtime, in the SPIN sourcecode!
Comments, ideas and help are wellcome!
Attila
·· I have developed a module to enable breakpoints and trace points for the Propeller! All you need is a terminal program to do breakpoint stepping.
In your code you will add breakpoints and tracepoints like this:
Line#20·|·BPT.BPT(1,20)····· 'Breakpoint(FileID, Line#)
Line#21·| outa[8]~~
Line#22·|· repeat
Line#23·|·· ·BPT.TRC(1,23)··· 'Tracepoint(FileID, Line#)
Line#24·|··· !outa[8]
··
In the hyperterminal you will see·cnt·time your code has reached a trace or breakpoint, you will see the cogid, fileID (or other·8bit information - it supports constants and variables too!) and finally the line number (HEX)
B03303B1 TRC 00010026
B041CCE1 TRC 00010017
B05071F1 TRC 0001001A
B05G2G21 BPT 00010023
The code runs normally, until it·run into·a trace or breakpoint.
If your code is executing a tracepoint, a trace infromation is sent to the terminal via RS232, so you can see "File 1, line 23 was executed by COG $00,·at cnt time $B041CCE1" . This way it easy to see if a condition was true, see how your case statements work,·calculate cycle time, etc.
A breakpoint is very similar to a tracepoint, but·a breakpoint·halts the·execution until user interaction. It will show the same infromation, just it will wait for a keypress on hyper terminal, to continue execution. Combined with the "monitor.spin" you can see all variables, modify them if you want before continuing execution.
I have started working on a PC software, that will display the actual BPT and TRC in realtime, in the SPIN sourcecode!
Comments, ideas and help are wellcome!
Attila