Shop OBEX P1 Docs P2 Docs Learn Events
Question about cog execution and developer API — Parallax Forums

Question about cog execution and developer API

greybeardgreybeard Posts: 65
edited 2007-08-01 22:08 in Propeller 1
1.· Is there a developers API to download new code into the Propeller Ram and/or ROM using a serial connection.

2.· I have a little confusion about where code is being executed by the propeller.· If I do a Start or CogNew and pass a method, is the method uploaded into the the cog and run within the Cog (as long as there are no main ram references and the method doesn't exceed Cog memory)· or does the Cog reference the main memory each time the HUB gives the Cog access to main memory.

<Edit> Subject added by moderator </Edit>

Post Edited By Moderator (Paul Baker (Parallax)) : 8/1/2007 10:15:37 PM GMT

Comments

  • rjo_rjo_ Posts: 1,825
    edited 2007-08-01 21:30
    Formally speaking... there is no API... but in reality, there is a fully configurable user interface... which you configure by including various objects in your program. The Propeller essentially redefines the meaning of object oriented programming... you will love it.

    All code is executed in "da cogs"

    The most concise description of how everything works can be found in a document called..."Propeller Guts." But I forgot where I found it and my search of the forum failed to find it[noparse]:)[/noparse]

    Any help guys?

    Rich
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-08-01 22:04
    ((expletive), (expletive), (expletive)) <- geezer grouching

    Presently it nested three deep:
    1st, click this sticky: Propeller Announcement and Thread Index stickies
    2nd, click this link: Graham Stabler's Good Thread Index
    3rd, under Programming the propeller, find and click this link: Propeller guts download (the origional documentation)

    The Good Thread Index ought to be a top level sticky, but we've been outvoted by the unnamed co-conspirator.

    For the sake of in thread usefulness the guts file link is: http://forums.parallax.com/showthread.php?p=572669

    {edit: fun with links}

    Post Edited (Fred Hawkins) : 8/1/2007 10:09:35 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-08-01 22:08
    While there is no officially released API, the deatils of communication to load the Propeller have been released (bottom of this page: http://forums.parallax.com/showthread.php?p=611536) and various people have made utilities using the information:

    http://forums.parallax.com/showthread.php?p=622354

    http://forums.parallax.com/showthread.php?p=601314

    If cognew or coginit is invoked with a Spin method a cog is loaded with the Spin interpretor and it begins to execute the spin bytecode located in the hub. If·cognew or coginit is invoke with an assembly address the first 512 longs from the address are loaded into the cog and the cog begins executing the assembly code directly in the cog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.