How are people loading data to hubram?

BaggersBaggers Posts: 2,965
edited 2013-03-23 - 17:15:04 in Propeller 2
Hi all,
Just a quick question, I've recently joined the Prop2Emu club :) ( just waiting on the add-on boards, so reading up etc. )
And I wanted to know what people are using to load bigger programs than just 512 longs? as PNut, which I assume so far, can only do programs for a single cogs worth.
Are people using the SD card for their data? how are they filling the 128K ( if at all ) when writing programs for the prop2.

The reason I'm asking is I'm wanting to get onto doing some graphics stuff, and wondering what's the best/optimal way to get big data into hub ram that people have come up with so far.

Cheers,
Jim.

Comments

  • David BetzDavid Betz Posts: 13,663
    edited 2013-03-22 - 16:24:43
    Baggers wrote: »
    Hi all,
    Just a quick question, I've recently joined the Prop2Emu club :) ( just waiting on the add-on boards, so reading up etc. )
    And I wanted to know what people are using to load bigger programs than just 512 longs? as PNut, which I assume so far, can only do programs for a single cogs worth.
    Are people using the SD card for their data? how are they filling the 128K ( if at all ) when writing programs for the prop2.

    The reason I'm asking is I'm wanting to get onto doing some graphics stuff, and wondering what's the best/optimal way to get big data into hub ram that people have come up with so far.

    Cheers,
    Jim.
    I wrote a loader called p2load that can load all of hub memory from an image created by PNut. Also, propeller-load, part of PropGCC can load all of hub memory on the P2 as well. However, it currently requires a .elf file. I could add support for PNut image files if anyone is interested. The advantage of using propeller-load is that it also knows how to write a bootable image to SPI flash that will load all of hub memory and start a COG image on reset.
  • Cluso99Cluso99 Posts: 15,675
    edited 2013-03-22 - 18:34:02
    baggers: Welcome to the P2emu club :)

    pnut can load larger programs to the hub. The first DAT pasm program (starts at $E80) runs in cog0 first. You can use that to run other cogs (if you have a DE2), or just coginit a new pasm program in cog0 (on DE0). Take a look at my SerialDebugger program - it also reboots the ROM Monitor (you need to hit <space> for the autoboard to work and display something). Be careful of key bounce if you are using the monitor to look at some results - multiple resets causes problems & clears the hub.

    BTW the sticky has good info on how to get your DE0/DE2 running.

    Postedit 27 March 2013:
    The loader part of pnut can only load about 504 longs to hub. This limit is $165F using $E80 as the start.
  • potatoheadpotatohead Posts: 9,957
    edited 2013-03-22 - 18:40:15
    I am alternating between David's loader and using the monitor, depending on what it is. with the loader, you send an entire package, optionally running something that can fetch more data.

    With the monitor you can keep P2 running, stop, start cogs and upload download code through a terminal. When doing this, I often run two Prop Plugs. One on the default port, another on some free pins. Upload program, which then fires off a monitor COG as part of it's initialization. I keep a terminal connected to the "free pins" Prop Plug, which then basically stays on. Tap the space bar, enter monitor and do whatever it is needs doing.

    You might not have seen this yet: http://forums.parallax.com/attachment.php?attachmentid=98587&d=1357887830 That's a monitor document I wrote up a while back.
  • Cluso99Cluso99 Posts: 15,675
    edited 2013-03-22 - 23:44:26
    potatohead: I had forgotten about this. Thanks forthe reminder. I just had another read and discovered a few new things.
  • BaggersBaggers Posts: 2,965
    edited 2013-03-23 - 17:15:04
    Hi all, thanks for your replies :D
    I shall have a play tomorrow, not had time at the computer today, as I was doing a full drive backup, so left it to it, whilst I made snow bunnies with my girls :D
    Should hopefully get the add-on boards any day now, so will be able to really have a good play!
    Been dying to join the P2emu club :D I've had the odd curiosity look at the forum, but couldn't bring myself to take part, as it's hard when you can't play along lol and you all looked like you're having great fun too! can't wait!
Sign In or Register to comment.