Is there a single debug terminal for multiple objects?
evanh
Posts: 15,915
Using FullDuplexSerial to emit debug prints from concurrent running objects like what can be achieved with Spin2's built-in Debug() but on the Prop1 instead. I'm guessing it would be a single instance of FullDuplexSerial. Has anyone done this? Is there any examples?
Comments
I remember this one:
https://github.com/parallaxinc/propeller/tree/master/libraries/community/p1/All/SerialMirror
It's quite old, so there may be newer better solutions.
Andy
Cool! Thanks .... reading it ... huh, so basically it's FullDuplexSerial with the VAR section replaced with a DAT section. I'm guessing it's not particularly safe code without any locks on the buffer indexing ... but then it's only for terminal prints.
The 4-port objects also keep the tx and rx buffers in DAT, so multiple instances share those same buffers. One port can be assigned for DEBUG, but as with SerialMirror, there are no built-in access locks on any of the ports.