Shop OBEX P1 Docs P2 Docs Learn Events
Stamp loader exe file... — Parallax Forums

Stamp loader exe file...

FORDFORD Posts: 221
edited 2006-03-12 00:15 in BASIC Stamp
Is it possible to use the stamp loader feature to generate object code for only a few slots of a bs2p ?

I dont wish to create an exe file with all 8 slots, as then other people would have access to my complete program.

For example, I would like to make an exe file containing code for slot 2, or slots 2 and·5 only.

If I only load eg: slot 2 into the editor, and then make an exe file out of it, I think it just loads into slot 0 on the stamp, not slot 2.

Or am I missing something here ?

Cheers,
Chris
West Oz

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-10 04:53
    No, you can't do that; slots 1 - 7 are only available when loaded by a "master" program in slot 0.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • FORDFORD Posts: 221
    edited 2006-03-10 05:00
    Thanks Jon,
    We also use a Stache (Tracy Allen), which you can just load say... slot 2 into, and then it loads the code into slot 2.
    I was hoping that the same would be possible with the stamp editor.

    Is it something that could be added at some point ?

    Thanks,
    Chris
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-10 08:18
    FORD -

    So long as no one but you has the SOURCE code (human readable code) what's the difference? Were you planning to license your program?

    Since you seem to be aware of the following feature, I include this primarily for others, who may be reading this thread, and may be unfamiliar with it. The PBASIC Stamp Editor can generate OBJECT modules, in lieu of run-time (excutable) modules. Although the OBJECT code generation feature can only be used on a whole program basis, the PBASIC Stamp Editor can re-create these OBJECT modules for each new version of the PBASIC program, as such versions may be released.

    By this method, updates to commercial Stamp programs can be distributed in a field loadable format, which is not in a human readable form. If this thought appeals to anyone, check the PBASIC Stamp Manual in the "Using the Stamp Editor" section, under the paragraph heading "Features for Developers". Unique or personalized identifying information can also be embedded in the Stamp Module by using this method. I suppose this might also include serialization, if you chose to go that route.

    I suppose another rather tricky method of providing uniqueness or simple security to a packaged Stamp System (hardware and software provided) would be to pre-program an area of the Stamp's EEPROM. The licensed PBASIC program then checks for that customized, pre-programmed ID information (unique to each unit sold), and if it's not there POOF!

    Each registered or licensed PBASIC Stamp module (hardware) can then be tied to a particular version or serailized edition of the developer's PBASIC program (software). Thus, one version/edition of the developer's software would only operate on one (now customized) PBASIC Stamp module. This is also a Stamp model independent method, and could even permit hardware upgrades!

    Is that secure and flexible enough?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-10 14:58
    I'm in the office this week Chris, so I'll check with our compiler engineer to see if I've missed something of if an update to the Stamploader is possible that meets your needs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-03-10 21:20
    Thanks for using the Stache. When programming the Stache, as you know, you can save individual banks to use for field updates.

    A workaround to do a similar thing with Stamploader requires a little bit of preplanning.

    I suppose you want to load a set of customization parameters or updates to one bank of your program, without affecting the others?

    Initialize an area of 16 DATA bytes in each bank in your program. That can contain the Stache directive and 13 additional bytes of DATA. Either unique DATA for each bank of your program, or, just zero it and have it available at run time, or don't use it at all.
    stache DATA "!1!", 0(13)
    ' otherdata DATA "whatever starts here at location 16 in eeprom"

    Let's say you want to update bank 7 only in the field. Then make a new project with banks 0 to 6 containing only the above code that affects 16 bytes from address 0 to 15 in eeprom. Open the code and data you want to use with Stamploader in bank 7. Then when you RUN this project, either in the IDE or via a Stamploader program, it will go quickly through banks 0 to 6, actually programming those 16 bytes only and leaving everything else alone, and then it will fully reprogram bank 7.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • FORDFORD Posts: 221
    edited 2006-03-11 13:18
    Thanks all for the replies...

    Jon, Yes it would be great if it could be added into the editor, then that would save a bit of pain.

    Tracy, Thanks for that, I will change my program so that is just has some useless data for the first 16 bytes for now.
    I like the Stache though, I have 3 of them, and sending them interstate for upgrading our systems is no problem, but internationally its a time issue.

    Bruce, thanks too. My issue is that we have a commercial product which we sell interstate and internationally. We have 500 systems out there which at times need modification or upgrading. I can have our distributors do upgrades with a laptop if I use the stamploader feature, but I'm reluctant to put all 8 slots in one exe file, its taken 7 years to get our product this far... you know what I mean.

    Also Bruce, now that I think of it, using Tracy's suggestion about the 16 bytes ties in exactly with yours of a locking code. If the first 16 bytes in each slot are not the same as what we specify in the software in slot 0, then its an illegal upgrade, and as you say... the stamp then goes 'Poof' !
    Come to think of it, you would need it to check the code from 2 slots, and never upgrade the 2 at the same time.

    Thanks to all.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-11 15:03
    I spoke with our compiler engineer and he said he would evaluate making that change -- he's a bit busy with the Propeller IDE at the moment, so please be a bit patient with us.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • FORDFORD Posts: 221
    edited 2006-03-12 00:15
    Thanks Jon,
    I understand that you are busy, that you have already spoken with your compiler engineer is more of a response than I really would have expected yet, thanks again.

    I bet its madness there at the moment with all the prop stuff happening... and the stores people will be dreading it !
Sign In or Register to comment.