PASD - Propeller Assembly Sourcecode Debugger
Ariba
Posts: 2,690
Thanks to a Spam post, the original PASD thread was accidentally deleted by a Forum administrator, and is lost.
So I make a new one here.
For the poeple that not know PASD, here is the introduction from the manual:
The Propeller Assembler Source-code Debugger (PASD) is a suite of software components which enable end-users to debug Propeller assembly language code at the source level using a remote (USB attached) Windows PC. PASD supports setting multiple break points, single-step execution, memory inspection/modification of COG RAM, inspection of Main RAM, label recognition, and I/O pin state inspection.
The debugger suite consists of a Windows application, a spin object and a short Debug Kernel which must be inserted at
the beginning of the code to be debugged. The Debug Kernel is only 12 longs in size, and makes possible communication
with the PASD spin driver, which runs into own Cog.
The PASD spin driver communicates over the Propeller’s serial programming interface with the PASD Windows application running on an attached PC. Except for pins 30 and 31 (the Propeller’s serial programming interface pins) all Propeller IO pins are freely available during debugging.
The total Propeller resource footprint of the PASD suite is:
- Two IO Pins (30 and 31, the serial programming interface pins).
- 12 longs at the start of COG Ram in the COG whose assembly code is being debugged.
- The upper two longs of Main RAM ($7ff8 to $7fff).
- The PASD driver which occupies about 223 Longs and runs in one dedicated COG.
All remaining Propeller resources (cogs, RAM, pins) are fully usable.
Attached is a screenshot of PASD in action.
PASD can only debug one cog at the same time for now.
It can also be useful while learning PASM, because you can see what's going on in the cog.
You will always find the newest version on my Propeller website:
www.insonix.ch/propeller/prop_pasd.html
The website is in german, but the ZIP contains a user manual in english, written by Eric Moyer.
Andy
Edit: Jim (hover1) has made a pdf with the latest posts from the lost thread. I've attached it. Thanks Jim
Post Edited (Ariba) : 4/25/2010 12:04:40 AM GMT
So I make a new one here.
For the poeple that not know PASD, here is the introduction from the manual:
The Propeller Assembler Source-code Debugger (PASD) is a suite of software components which enable end-users to debug Propeller assembly language code at the source level using a remote (USB attached) Windows PC. PASD supports setting multiple break points, single-step execution, memory inspection/modification of COG RAM, inspection of Main RAM, label recognition, and I/O pin state inspection.
The debugger suite consists of a Windows application, a spin object and a short Debug Kernel which must be inserted at
the beginning of the code to be debugged. The Debug Kernel is only 12 longs in size, and makes possible communication
with the PASD spin driver, which runs into own Cog.
The PASD spin driver communicates over the Propeller’s serial programming interface with the PASD Windows application running on an attached PC. Except for pins 30 and 31 (the Propeller’s serial programming interface pins) all Propeller IO pins are freely available during debugging.
The total Propeller resource footprint of the PASD suite is:
- Two IO Pins (30 and 31, the serial programming interface pins).
- 12 longs at the start of COG Ram in the COG whose assembly code is being debugged.
- The upper two longs of Main RAM ($7ff8 to $7fff).
- The PASD driver which occupies about 223 Longs and runs in one dedicated COG.
All remaining Propeller resources (cogs, RAM, pins) are fully usable.
Attached is a screenshot of PASD in action.
PASD can only debug one cog at the same time for now.
It can also be useful while learning PASM, because you can see what's going on in the cog.
You will always find the newest version on my Propeller website:
www.insonix.ch/propeller/prop_pasd.html
The website is in german, but the ZIP contains a user manual in english, written by Eric Moyer.
Andy
Edit: Jim (hover1) has made a pdf with the latest posts from the lost thread. I've attached it. Thanks Jim
Post Edited (Ariba) : 4/25/2010 12:04:40 AM GMT
Comments
Jazzed asked about fixing a bug when the IDE shows an error and PASD tries to get the code from it.
And for a list of what has changed in the last updates.
And pjv asked for a tweak to allow CON sections inside an Assembly code.
The new version 0.7 of PASD should solve both problems and also includes some additions, requested by
Bean to work as debugger for PropBasic.
List of PASD Improvements since version 0.3:
- supports now also BST
- Viewers can be sticky or not
- Viewer positions and status is stored in INI
- executes now only first cog code, if you have several cogs in 1 source file
- Watchpoints added (experimental)
- some minor bugs fixed
- <BP> or <WP> added as comment in a source line sets a Break- or Watchpoint
- CON sections inside Assembly code possible
- Viewers minimized while switching to the IDE
Andy
Sorry to bother you, but I just downloaded version 7, and it will not load my assembler program. I get the "no data- assembler code......." error message box.
I confirmed that version 5 still works as before. (had not tried v6)
Hope it is an obvious problem.
Cheers,
Peter (pjv)
I have my Propeller posts come to me through email, and I have since Jan. 2009. They are all saved. I will try and recreate a PDF dodument with all the posts. It may take a few days as I will be traveling.
Best Regards,
Jim
I just downloaded version 6, and it also will not load the same assembly program, whereas version 5 does work.
Version 5 treats embedded CONs as assigned cog memory locations..... as before, of course.
Version 6 generates the "no data" error box, lists the program but as all zeros for op codes, and assigns cog memory locations for embedded CONs.
Version 7 generates the "no data" error box, lists the program but as all zeros for op codes, but skips over embedded CONs as per request.
Because both version 6 and 7 exhibit the same "error" message box, I wonder if I have done something wrong in my installation, but what??
Hope someone can help!
Cheers,
Peter (pjv)
Thanks. I was the one that accidentally deleted the whole thread instead of just the spam post.
Arrggg spammers....
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
Thank's for the offer, if you can create such a PDF I will attach it to the first post. But I think the early thread was from 2007.
pjv
Hmm, from 0.5 to 0.6 I have changed the way how PASD opens the COM port, to support higher COM numbers and CDC serial ports. Perhaps this is not compatible to your setup. Do you use a PropPlug and a new FTDI driver? What Windows version?
I will see if I can add a switch to use the old COM open.
Andy
Until Christof bumped the thread, there was nothing before Jan 2009, that’s when I started saving.
Bean, that spammer was just out of control. I could see how it would have gotten to , Tag> Delete, Tag> Delete, Tag> Delete, OPPS!
I hope it will be of SOME use.
Jim Edit:I tried the "Way Back Machine" with no luck also. I dont' know if they archive forums.
Post Edited (hover1) : 4/24/2010 11:16:57 PM GMT
I've tried also some Archive sites, and Google cache, but they seem to store only the Thread Index not the dynamic content.
Also not found it in my local cache.
pjv
Can you try the attached Test exe? This uses the old way to open the COM as default, but can be changed with the CDC-mode item in the COM menu to the new one. I have the feeling the new one produces a Propeller reset on COM close.
Andy
I tried PASD - downloaded from your site.
I installed as directed.
After PASD.EXE is run I chose the COM port.Them keeping the Prop IDE active pressing <F2> nothing happened - the PASD window was not updated.When "Get ASM code" was chosen from the menu - " No COM port found" error showed up. When I clicked on it - then the PASD widow was updated with the "Debug_Demo_Code"
But the "RUN" code will not function and also there was no "blue highlighting" of the first line .
Help me to resolve this please.
Siri
Just tested your version PASD_071 and that works fine. It also skips over the embedded CONs, so thanks very much for all your effort.
I subsequently reconfirmed that version 7 will not load the code.
Thanks again, and
Cheers,
Peter (pjv)
So I make this version the new 0.7, I think not many have downloaded it so far.
Siri
Have you set the right COM port in the COM menu of PASD? If you press F7 in the PropTool, you see what COM port is used for your hardware. If you choose Open/Close in the COM menu, no error should appear.
After you have set the right Port, minimize PASD, go to the PropTool load the code from there with F10, restore PASD and press F2.
If it not works, please download the version 0.7 again, I have made a little change.
Andy
I discovered a small OOPS in version 071
If a comment-out braces set
{
}
is used in an embedded CON, then all constants after those braces are again assigned address locations up until the next CON directive is detected.
Not a big deal, but nice to clean up if it's not difficult.
Cheers,
Peter (pjv)
I have added an entry in the top post for you - I did not realise PASD was not there.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
How is the watchpoint activated/used? And how many at a time?
Cheers,
Peter (pjv)
Can you tell me what frequency range PASD will work properly ? Then I can change PropBasic to only allow that frequency range if you specify PASD.
Thanks,
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
It works down to 10 MHz, perhaps a bit lower. Also RCfast is possible if you set the right frequency value in Hubaddr 0.
pjv
You will find a lot of such OOPS, because the parser is made very simple. I just decide: is this a line that produces code or not, according some simple rules. But I think this one is easy to fix.
To set a watchpoint, select the code field of the line and choose toggle Watchpoint. The text will be green to differentiate it from a Breakpoint. You can enable/disable it with the checkbox. Break- and Watchpoints are only limited by the amount of code lines
But it will be very slow if you set one on every line.
Cluso
Thanks for adding PASD to the list.
Andy
I'm still a little confused... when pressing F5 (run) when sitting on a break point, PASD behaves as if I pressed F8 (step) -- seems like it should run all instructions until it hits another break point.
Yes, I just downloaded the latest 0.7. Again, thanks for a cool tool.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
When encountering the BREAKpoint, then pressing F5 indeed takes only one step as if you had pressed F8. Pressing F5 again releases it to run until a BREAK is again encountered.
Just a peculiarity.
Cheers,
Peter (pjv)
I questioned that too. But Andy explained that it is a quirk of how the debugger works. He said he might be able to fix/change it so you only have to press F5 once.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
At a Breakpoint the original instruction in the cog is replaced by a "jump to Break". That''s why I can't continue at this point, I have to replace this instruction first. PASD can execute single instructions sent over serial so I just execute the original instruction this way when you press F5 and stay at a Breakpoint.
You can uncheck the Breakpoint, this replaces the jump with the original instruction, and then press F5 to continue direct, if you don't need the Break anymore.
Andy
F5 should now run also on Breakpoints, it does the second F5 for you automatically.
And nested CON/DAT and {} are now possible.
I'm not quite sure if this changes not bring just other quirks, so it should be tested first by some users, before I make it a release
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
It seems I'm continuing to ask for things, and this one is probably well over the top.....
I have watchpoints working now, and if I understand correctly; if a watchpoint is set, then on encountering that instruction the whole cog ram viewer window is updated, (not sure about the program listing window) and that takes some time as all have to be passed through hub ram. This makes things somewhat slow as you had indicated. Would it significantly speed things up if we were able to pre-select what cog locations to update in case of a watchpoint hit? Perhaps a watch window with preselected entries.
Probably a lot of work, but very nice to have if even practical.
Cheers,
Peter (pjv)
I have noticed that the "Pin Viewer" IS updated even if there are no watchpoints. And the code is running at full speed (I assume).
I don't know if that helps you or not.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
No, I don't use the pin viewer at all; things are typically happening way too fast so I connect my trusty old scope to catch real-time things. But obseving a selected memory value or two at high speed would be very useful. With multi-tasking I could readily make my applications kick out an update trigger at a viewable rate.
Cheers,
Peter (pjv)
I'm just stressing the watchpoint code in 072 some, and I note that when triggering on a rather busy point in my application, the watcpoint will be updated for a few dozen cycles and then hang in either a "Watch" or "Run" state. The USB traffic leds turn off at that point. It seems (although I'm not sure because there is so much variability) that it runs longer if I close the cog ram viewer.
Version 071 exhibits similar characteristics.
Cheers,
Peter (pjv)
pjv
That is what a meant with not very reliable. I develope PASD on an old slow XP PC, so I don't knew if this happens because of that.
Why does it work 3 times and then stucks? The code is always the same. And on next try it works 5 times. The problem must have to do with the redraw timing and the message events of Windows. This kind of bugs are very annoying to find, and who knows if it then also works on another Windows version.
The same code is now also used for this automated F5, that's why I'm not so convinced that this is a good idea.
WRT Watch-window:
Would be very useful and was also planned for a commercial version of PASD. But I think that's not worth to do. So I left it at the bare minimum.
Andy
I understand, and appreciate what you have done to give us this tool. I find it very useful, even with it's peculiarities.
Cheers,
Peter (pjv)
I have been looking for a good debugger to use for PASM coding and I would like to add to the chorus of thanks for what looks like a seriously useful product. Well done!
I have noticed an issue similar to that mentioned by others. I have been trying to use the Pin Viewer with your sample LED blinker program and notice that it displays correctly for a few cycles and then freezes, although the LEDs continue to blink on the hardware, and the USB LEDs continue to show that coms is still operating with the PC. From time to time the Pin Viewer will then work for a burst and stop again. Sometimes the USB LEDs also start bursting, rather than the usual steady twinkle.
I am using your v0.7 on a Parallax prototype board with the built in USB FTDI, and have tried 2 different boards on 3 different computers.
Does anyone else have this problem, or have I got a known setup issue?
Cheers,
Stephen