Question about cog execution and developer API
greybeard
Posts: 65
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
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
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
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
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.