Shop OBEX P1 Docs P2 Docs Learn Events
For the BS2 can the code be read once it has been programmed? — Parallax Forums

For the BS2 can the code be read once it has been programmed?

JJaimeJJaime Posts: 8
edited 2011-09-09 18:03 in BASIC Stamp
dear Sirs:

I have come across with the situation that I lent an equipment with a BS2 programmed to perform a certain function. My question is: is there anyway that pulling the BS2 out and putting it into the appropriate programmer kit can the code be read? Is there anyway that the code can be protected?
so that it cannot be read?

Appreciate your feedback about this situation

Comments

  • Jeff SteenckenJeff Steencken Posts: 32
    edited 2011-09-09 17:03
    Based on other responses to this question in other areas of the forum I would say No.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-09-09 17:26
    JJaime...
    '
    You can not up-load the code from the BS2 Stamp.
    '
    It is protected, since it can't be up-loaded.
    '
    The BS2 OEM kit is a little different. This is an all through hole design, and the eeprom could be removed and the binary image duplicated.
    '
    If your using the BS2Stamp your protected.
    '
    But remember nothing is totally hacker-prof.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-09 17:49
    The code in the Stamp's EEPROM is compiled. The variable names are gone. The labels are gone. Some of the program's structure may have changed in the process of compilation. The program is also compressed in a way that is not commonly known and tedious to decode. It's possible to read out part of the EEPROM without using external hardware, but you have to download a small program to the Stamp to do that and the small program will overstore part of the existing program.

    In summary ... It's possible to read part of the existing program in a Stamp, but not all of it and it's difficult to get something back that can be understood at all. With external hardware, it's possible to read out the whole EEPROM, but it's still difficult to make sense of what you've got. It's not a job for a casual hacker / thief.
  • bsnutbsnut Posts: 521
    edited 2011-09-09 18:03
    JJaime,
    I am going to answer your questions for you.
    is there anyway that pulling the BS2 out and putting it into the appropriate programmer kit can the code be read?
    No, once the BS1 or the BS2 is programmed they and you will not be able to see the code that you written or they have written. They will need the same code that you written and know the file name and the goes for them.
    Is there anyway that the code can be protected? so that it cannot be read?
    Yes, you will use your Basic Stamp Editor to release the code in form of a Object file. By, doing it this way allows you to release your program to someone else without giving them the code.

    The way you will do this is in the Basic Stamp Editor.
    1) Open the file you want to release to the person you don't want to have the code.
    2) Click on File
    3) Click on Generate Object Code
    4) Select how you want to generate this file from the following
    Object Code > This generates the Basic Stamp Object Code file only (Default)
    Object Code and Stamp Loader > This generates the Basic Stamp Object Code file and a separate Stamp Loader executable
    Single Executable > This generates a single executable that contains Stamp Object Code
    5) Select if you want a Name and Message to be sent to the end user
    Standard > No Name and Message will be sent to the end user (Default)
    Custom > This will allow you to set a Company name, Product name and a detail Message to the end user. The Firmware will display your file name that you are generating the Object code from.

    I hope this helps you out.
Sign In or Register to comment.