Shop OBEX P1 Docs P2 Docs Learn Events
Launching an unmodified binary image from another running spin file — Parallax Forums

Launching an unmodified binary image from another running spin file

BradCBradC Posts: 2,601
edited 2009-08-02 02:02 in Propeller 1
Ok, tested and working

This runs on my demo board. I have a led on P7 that flashes to let me know what is going on while it's loading (Takes quite a while)
I have the standard propeller demo in eeprom.
This loads it and runs it while leaving the initial spin program running in its initial cog. I see it frantically flashing the led colliding with the pulsing from
The demo chaser.

I had tv_text running in the initial spin program also, but of course when the demo launched it caused a massive desync of the tv image.

Anyway, this is how to do it [noparse]:)[/noparse]

Edit: replaced the file with one slightly better put together

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!

Post Edited (BradC) : 7/20/2008 5:06:38 PM GMT

Comments

  • BradCBradC Posts: 2,601
    edited 2008-07-20 17:25
    And a much quicker version (as I learned how to use the i2c library properly)

    Watch out for the stack of the original spin program. I can't reliably load below about $388 with this running..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • jazzedjazzed Posts: 11,803
    edited 2008-07-20 20:01
    Excellent Brad!

    Apparently the image must be loaded on a long boundary for this to work.
    If you set Loadaddr to $2002 for example it fails but using $2000 works.
    Some memory allocation schemes return an unaligned address mad.gif

    I can load and run a .bin from SD now and should be able to manage it at will.
    Thanks for looking at this.
    --Steve

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • BradCBradC Posts: 2,601
    edited 2008-07-21 02:33
    Yes, that is because both the address and par chop the bottom 2 bits off (as per the docs).. so it _must_ be long aligned

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • Aaron193Aaron193 Posts: 27
    edited 2009-08-01 20:07
    Any ideas why the TV is desyncing? I need the TV object to display the output from the "subroutine" loaded by your object. Can you fix that?
  • BradCBradC Posts: 2,601
    edited 2009-08-02 02:02
    Aaron193 said...
    Any ideas why the TV is desyncing? I need the TV object to display the output from the "subroutine" loaded by your object. Can you fix that?

    Not without significantly more information about what you are doing, how you are doing it and preferably a copy of the code you are doing it with.

    Generally I see the TV object "desync" when you trample its ram, so I suspect you are blowing over either the code section or the display buffer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lt's not particularly silly, is it?
Sign In or Register to comment.