Debug Questions
Surac
Posts: 176
In the "good old days" i had a monitor program on my z80 and 6502 machines that let me run program in singe step and have a look at memory, registers and flags.
So now i have a P2:
can a monitor program running in one cog access the cogram or lutram of an other cog?
is there a way to singlestep a program without code instrumentation? or place a breakpoint into the code if it is in cogram/hubram?
an we save the two falgs and restore them later?
So now i have a P2:
can a monitor program running in one cog access the cogram or lutram of an other cog?
is there a way to singlestep a program without code instrumentation? or place a breakpoint into the code if it is in cogram/hubram?
an we save the two falgs and restore them later?
Comments
It is possible to do what you are talking about, but you would need to read the debug-interrupt documentation and implement some debugger.
In the future, we will have this automated, but for now, you need to cook up your own solution.
OzPropDev does have a single-stepping debugger, but he needs to document and post it, in order for everyone to be able to use it.
It does display HUB/LUT/COG ram, and can read files from SD. You can call it from your program by jmp-ing into the ROM.
There is a thread on the forum explaining how to use it. Does not support single stepping as far as I followed.
Enjoy!
Mike
forums.parallax.com/discussion/170638/p2-rom-monitor-debugger-rev-1-rev-2-silicon
It is both a set of "callable" routines, and has a "monitor" call too, as well as being able to go straight to the "monitor" after power-up by a simple serial command.
And there is this thread too...
https://forums.parallax.com/discussion/168502/p2-rom-booter-serial-flash-sd-card-monitor-and-taqoz-features-and-operation/p1
I'm hoping to get my debugger stuff wrapped up this weekend so I can post it next week.
Here's a capture of some simple demo code and how the debugger is invoked. and here's a capture of some debugger output.
Stack contents, flag states and program counter related info is shown.