Shop OBEX P1 Docs P2 Docs Learn Events
Global "debug" using FullDuplexSerial? — Parallax Forums

Global "debug" using FullDuplexSerial?

PaulPaul Posts: 263
edited 2009-10-04 00:07 in Propeller 1
How would I make OBJ DEBUG : "FullDuplexSerial" available to both the main cog and any child cogs? If I put Debug.Start in the main program, the programs that are started in another cog cannot get to the DEBUG and any DEBUG.tx in those cogs shows an error when compiled.

I almost had it working by putting DEBUG.start in the cog2 (DEBUG is in cog1) but I got odd results (but no errors) when DEBUG.dec was ran in the main program.

I've just spent the morning looking at Propeller Education Kits Labs and both Objects and Counters chapters came very close to answering this but stopped just shy of putting it all together.

Is there some address I should pass to the child cogs to make DEBUG available to them?

Thanks,
Paul

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki Rocks! - propeller.wikispaces.com

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-03 20:42
    There's a different version of FullDuplexSerial in the Propeller Object Exchange that allows this. Look for "SerialMirror". You do have to be careful so that you don't try to output from both cogs at exactly the same time. That can be handled by using the LOCKxxx statements. See the examples in the Propeller Manual or the Propeller Tool help files.
  • John AbshierJohn Abshier Posts: 1,116
    edited 2009-10-03 21:45
    This comment is from FullDuplexSerialPlus:

    v1.301
    - Incorporated SerialMirror features that allow any any object that uses the
    FullDuplexSerialPlus object to write to the same buffer.

    John Abshier
  • jazzedjazzed Posts: 11,803
    edited 2009-10-03 22:01
    For those who like diverse solutions and want to dig in to learn ....

    Sam with help from Ken described a way to use a wrapper in this thread:
    http://forums.parallax.com/showthread.php?p=843764
  • PaulPaul Posts: 263
    edited 2009-10-04 00:07
    Wow, thanks to Mike, John and jazzed! I will check out serial mirror and FDS+. Even on weekends this forum still rocks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki Rocks! - propeller.wikispaces.com
Sign In or Register to comment.