Shop OBEX P1 Docs P2 Docs Learn Events
Emergency - system shut down before my code is saved — Parallax Forums

Emergency - system shut down before my code is saved

CncjerryCncjerry Posts: 64
edited 2012-08-09 14:47 in Propeller 1
I made a bunch of changes, compiled, loaded eprom, tested and didn't save the code before the system shutdown. So the working code is on the chip.

1) Before I launch the prop tool, are the files autosaved in a work area, temp file, etc?

2) I see there is a disassembler but it doesn't do spin. Are there any options to recover the files from the chip?

Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-08-09 09:14
    #2 - No. The compiled Spin code is stored on the EEPROM and that can be recovered. I believe there's a disassembler for the Spin bytecodes, but that's just intended to help people understand the Spin bytecodes. It won't get you back to Spin source code.
  • Heater.Heater. Posts: 21,230
    edited 2012-08-09 09:14
    If you have lost the code from your PC you are pretty much hosed.

    Recreating any high level language source from the instructions it compiles to is very hard. I don't recall that any one has even tried with Spin.
  • CncjerryCncjerry Posts: 64
    edited 2012-08-09 09:20
    so no temp files, etc?

    Something is going on with this pc. It has hung a few times in the past few days and the only difference is that I am developing using the prop tool. Could be something with USB but all the lights stayed on. Go figure.

    Can I get the assembler? There were two assembler modules one in the spin module dat section and a second module.

    About 50 lines of code in assembler for both.
  • CncjerryCncjerry Posts: 64
    edited 2012-08-09 09:25
    hey, wait a minute. the file was auto recovered. when did that start???
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-08-09 09:36
    On some of my compilers there is an option to automatically save the script before compiling, perhaps this could be added to the Prop Tool etc.

    I lost a HD recently, I know, it was my fault that that I didn't back that lot up.Despite being only a few miles from an enormous power station the mains to the village is far from solid and I have lost a fair bit of stuff before getting to save it.

    Long live pencil and paper.
  • PublisonPublison Posts: 12,366
    edited 2012-08-09 09:44
    Cncjerry wrote: »
    hey, wait a minute. the file was auto recovered. when did that start???

    I know it's been there since ver 1.2.7.

    It's in Preferences, and is enabled by default IIRC.

    Now, thank Parallax for putting that in. :) They got your back.
  • David CarrierDavid Carrier Posts: 294
    edited 2012-08-09 11:05
    The Propeller Tool does make backups. If it wasn't closed properly, and you had previously saved and compiled your file, it should automatically open the most recent version of the file with a header similar to this one:
    .{
     ************************************************************************************************************
     *                                                                                                          *
     *  AUTO-RECOVER NOTICE: This file was automatically recovered from an earlier Propeller Tool session.      *
     *                                                                                                          *
     *  ORIGINAL FOLDER:     [File location]                                                                    *
     *  TIME AUTO-SAVED:     X minutes ago ([Date] [Time])                                                      *
     *                                                                                                          *
     *  OPTIONS:             1)  RESTORE THIS FILE by deleting these comments and selecting File -> Save.       *
     *                           The existing file in the original folder will be replaced by this one.         *
     *                                                                                                          *
     *                           -- OR --                                                                       *
     *                                                                                                          *
     *                       2)  IGNORE THIS FILE by closing it without saving.                                 *
     *                           This file will be discarded and the original will be left intact.              *
     *                                                                                                          *
     ************************************************************************************************************
    .}
    
    The backup files are stored in your %USERPROFILE%\Local Settings\Application Data\Parallax\Propeller Tool\ folder in Windows XP, or %USERPROFILE%\AppData\Local\Parallax\Propeller Tool\Parallax\Propeller Tool\ folder in Windows Vista or later. They are in a different sub folder for each version of the Propeller Tool.

    — David Carrier
    Parallax Inc.
  • jmgjmg Posts: 15,183
    edited 2012-08-09 14:47
    Cncjerry wrote: »
    I made a bunch of changes, compiled, loaded eprom, tested......

    As a general note, I do not know of any systems that compile purely in PC Memory.

    They all save, and work on text files - sometimes those may not be so obvious, but #8 explains how the Prop does it.

    Personally, I do not like tools that hide stuff over in "\WindowsFluff\Application Data\blah", and prefer a single working directory that I name, and I can save and backup and move.
Sign In or Register to comment.