Shop OBEX P1 Docs P2 Docs Learn Events
EEPROM needed? — Parallax Forums

EEPROM needed?

I haven't followed the Propeller 2 or been on these forums in a good while, but I saw the P2 is out, and I assume that an external eeprom is needed? I have a project in the works, but wanted info if the P2 could protect my programs or if it worked just like the P1. Thanks

Comments

  • I don't use P2 yet, but for what I read before, you need a flash, not an eeprom.
  • The P2 can boot from a flash chip or a SD card. The RAM can be directly programmed over USB.
    I don't think there's a way to keep the code secure. The lines interfacing with the external memory could be monitored and the code captured with appropriate hardware.
  • evanhevanh Posts: 15,192
    Flash is a type of EEPROM.

  • If you include a flash you can use the flash unique ID as a serial number. What this would mean, though, is you'd have to power-up your board in production, grab that value, and then write it back to another location in the flash -- this would be used later to ensure the code hadn't run elsewhere and was copied to another board. Not that it's terribly secure, but you could obfuscate the saved serial number with the SEUSSF instruction. I played with it in Spin2 using inline PASM2. It will scramble/unscramble a long. If you scramble with 8, you unscramble with 24 (32 iterations through SEUSSF get you back to the original value).
    pub seuss(value, i) : result
    
    '' Scramble/unscramble value
    '' -- i is 0..31 to scramble
    '' -- i is 32 - previous i to unscramble
    
      org
                    and       i, #%11111                            ' truncate to 0..31     
                    tjz       i, #$+4                               ' skip mod if i == 0  
                    mov       result, value                         ' get value
                    rep       #1, i                                 ' repeat i times
                     seussf   result
      end
    

    What we need, of course, is a nice flash object so that we can use that the way we use the P1 EEPROM.

  • The code protection features on microcontrollers from much bigger companies are basically worthless (i.e. easily defeated by the kinds of people that'd just steal your code wholesale. There's a bit of a cottage industry around dumping protected code....), so anything Parallax could do would be a massive waste of time. On the other hand, the chip not having any nonvolatile state is feature to some.
  • Thanks for the replies, It looks like best option for me is P1 and just sand the info off the chip, and mess with the P2 when I have little extra cash to get new stuff to learn with.
  • I've always worked out what kind of chip it is even when it is rubbed out simply by noting the pinout, the crystal frequency, and the types of memory. The large capacity EEPROM is a giveaway and if you are using DIP40 then that certainly narrows the field and makes it even easier to work out that it is a Propeller. Anyway, I would read the EEPROM directly either way. The best protection is to keep moving and stay ahead.
  • Cluso99Cluso99 Posts: 18,069
    edited 2020-12-29 12:47
    If you don’t need all the P1 I/o pins you could use my 24/28/32 pin P1’s. No one is likely to guess what chip that would be ;)
  • Cluso99 wrote: »
    If you don’t need all the P1 I/o pins you could use my 24/28/32 pin P1’s. No one is likely to guess what chip that would be ;)
    The original “bit slice” processors! :)

Sign In or Register to comment.