Multi bank programming question
davee
Posts: 35
Is there any way that you can program a single bank on a BS2P without reprogramming the other banks?
I have proprietary code I want to put in one bank but I want to let the users use the other banks. Is this possible?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Evartt
FUSION robotics
What's in YOUR robot?
http://wehali.com
I have proprietary code I want to put in one bank but I want to let the users use the other banks. Is this possible?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Evartt
FUSION robotics
What's in YOUR robot?
http://wehali.com
Comments
'{$STAMP BS2p, newrun12.bse, newrun34.bse, newswit.bse,newsensr.bse}
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
check out our 4-digit serial LED
http://hometown.aol.com/newzed/index.html
·
Why? Because the only way you can get your proprietary code into bank 7 is to make it part of a multi-bank project, and when you open one of those the compiler wants to open all of the files. If you try to specify the same file for more than one bank, the compiler will complain that the file is already open.
In blank0.bsp, do this:
' {$STAMP B2P, blank1.bsp, blank2.bsp, blank3.bsp, blank4.bsp, blank5.bsp, blank6.bsp, proprietary.bsp}
Oh, your "blank" program can't be completely blank -- put the END keyword into it so the compiler has something valid to compile.
When you send the BASIC Stamp module to your customer you'll have to warn them not to overwrite bank 7, and of course you'll have to tell them how to call the routines that live there.
If the customer does err and overwrites the bank, you should can use the "Generate Object Code..." option from the file menu to create a loader that protects your source code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Post Edited (Jon Williams) : 7/27/2004 9:16:56 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Evartt
FUSION robotics
What's in YOUR robot?
http://wehali.com
Al Williams
AWC
http://www.awce.com
Adding on to Jon suggestion, you can set Preferences/EditorOperation to "Current bank". Have your bank 7 code in the front window when you download the code, and the compiler will download to that current bank only. With that setting it will not burn unwanted code into banks 0 to 6.
That is fine if you are programming the chip yourself, as you can open the editor with your source code visible. But if you want to email or distribute your code without revealling the source, it is a different story. I don't know any way to force the "object code loader" to skip over banks that you do not want to disturb. As far as I know, you have to put something in those other banks. Jon suggested a single END instruction. A single DATA 0 instruction will also work, and one or the other or either or neither might work depending on how you interact with your customer files. I wish it would work with a single DATA (0), but it doesn't!
If anyone knows how to create an object loader that just does a single higher bank, I would like to hear about it, too.
As Al pointed out, the DOS software allows you to program individual banks, in fact, it only lets you program one bank at a time with manual intervention, with ALT-7 say, to select bank 7 before you choose ALT-R to run the code. The DOS version is still up on the Parallax downloads section. You do have to have the source code open to use that option, so it is fine for you, but not as a way to distribute your proprietary stuff to your customers.
A third option is to use a Stache programmer. www.emesystems.com/stache.htm. (plug)
It is flexible in in the way it allows you to assign code to banks and overlay different versions. The source of code in the Stache stays a secret.
-- Tracy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 7/28/2004 3:11:51 AM GMT