upload code from eeprom
mikea
Posts: 283
in Propeller 1
Is it possible to recover code back to the prop ide from the propeller chip eeprom?
Comments
Edit: As Dave points out... not easily.
If it's the former then there have been routines to save the eeprom to a file. Before we go chasing will this do the job?
When I have had to "start-over" on projects, I've found that the next generation was much better than the first. YMMV, it all depends on how long ago it was when you last worked on the project...
I save and backup my code regularly. This means that when I'm working on my code I save often, particularly when I get a part working. I use filenames with -nnn where nnn is an incrementing number. Sometimes I even add and alpha to that if the changes are more incremental. This then needs to be archived off onto another medium (ie external HDD) regularly too as you never know when that corruption event (can also be a virus) may happen, and you can guarantee it will be at the most in-opportune time. This is something I've done since the early 70's so it is habit. If I introduce a bug I can go back and compare various versions to see where the change was done - Notepad++ is a great comparison tool and while I haven't used it, I believe Visual Studio Code also has a comparison tool too. I use VSC to edit my prop (P1 & P2) code nowadays.
I've found git to be much more convenient and hassle-free than constantly having to remember to save-as with a new name and then having the clutter of many visible versioned files. On top of that, Git makes it easy to compare versions against each other and has semi-automated (or fully automated, if you write a helper script) tools for finding where a bug was introduced. I couldn't imagine going back to manual versioning. I really recommend everyone to try Git or Mercurial or something similar - they make life so much easier.
Of course it will be. It's open source and widely used.
And, besides, because of how simple Git is by design, it will be possible for someone thousands of years from now without a working copy of Git to extract files from it with nothing more than a zlib decoder (which uses the same compression algorithm that zip files use) and a couple lines of shell script that I wrote once and have probably since lost but that should be pretty trivial to reproduce if needed.
But there's probably not any realistic danger of that becoming necessary, considering that Github has store snapshots of most of the open-source software they host, surely including Git since it's what their company is built upon, in the Github Archive Program's Arctic Vault.
Just kidding of course although the compressed .sit files I have in a zip backup and I did find a Stuffit decompression tool. The MacDraw I used to draw the pcb and schematics can be read by LibreOffice (mostly).
Backups are only just backups in case you need them so I use several pocket USB HDDs that rotate being left in the car or some place other than all together. But USB Flash drives are handy too and I have a couple of the small ones on my keyring with backups as well as one with a live Linux boot.
Back to the EEPROM. If I need to backup a EEPROM I download a Tachyon binary to the RAM and from there I do a Intel hex dump of the EEPROM back to the PC.
Yes, of course. I keep remote copies of any git repositories I don't want to put on Github on my VPS. My point is that Git is good both for managing local revisions and for keeping track of archives. Git also has a pack feature that's probably good for offline backups, too.
In regards to that avenue just remember that BST generates a proper listing and this can also give you a better idea as to how compiled code can be mapped etc. Here's part of the listing from the old coil demo showing the Spin bytecodes.