Shop OBEX P1 Docs P2 Docs Learn Events
On the fly reprogramming of one COG — Parallax Forums

On the fly reprogramming of one COG

OnniOnni Posts: 7
edited 2008-03-30 19:56 in Propeller 1
This is one of them newbie "is it possible to..." questions.

What I want to do is this:

One COG runs the FullDuplex
The second COG does the higlevel protocoll stuff:
Reading "packages" and confirms checksums and so forth. And when it has recieved a full program of say 5k it then starts the third COG with the program just recived.

Why do this? Isn't it simpler to just reprogram the whole chip in one go like you usualy do?
Two reasons:
1: I want to do this over a radio. (19.2kbaud, packages aren't guaranteed to arrive, so I need some software to require resending of lost ones.)
2: I want the other COGs to run during reprogramming.

Can this be done with both spin and assembler code?· (If it only works with spin, thats enough.)

The program should of course be aware of the other COGs variables. Is that a problem?

I imagine rewriting the code. Compiling the whole project (so that variable addresses stay the same). Extracting the range from the .binary I know is the part I want to resend. Fireing up my homemade pc-software to send the chunk over the radio.

·

Comments

  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-30 19:52
    It is reasonably easy to send some new assembler to the prop and run it but it is a lot harder with spin. Finding the part you want could be a little difficult as well as the DAT sections are spread all over the place. DOL http://forums.parallax.com/showthread.php?p=701497 can load things from an SD card like you want to and it could be modified to work with a serial link instead.

    So yes it is possible but possibly a bit hard.
  • OnniOnni Posts: 7
    edited 2008-03-30 19:56
    Thanks for the lightningfast response.

    I imagined that spin would be easier sinse it was interpreted and "only data".

    I will look into that thread.

    Thanks again.
Sign In or Register to comment.