▼
Posts: 1,368
Threads: 212
Joined: Dec 2006
I am aware that it is recommended to flash with the calc_full.bin binary provided with each release so that the user has all of the extra programs in flash memory on the calculator. I haven't been doing that since I really like to work with a "clean" machine to start.
However, in experimenting with how to get my programs back onto to my calc after erasing it with each new firmware update, I have found that concatenating files using the Unix cat function on Mac OS X works just fine. I guessed this was the analogy to the DOS/Windows copy /b command used in the the join.cmd file provided with the various releases. I had tried to concatenate my own binaries with copy /b when I was using v. 2.2, but could never seem to get it right so I eventually gave up.
If all of my programs are in programs.txt, I first create a flash library in the appropriate format:
$ wp34s_lib.pl -olib wp34s-lib.dat programs.txt
That done I concatenate this with the exist calc.bin file:
$ cat calc.bin wp34s-lib.dat > my_calc_full.bin
I then go over to MySamba in my Windows XP installation under Fusion, and flash the calc with my_calc_full.bin, and on resetting the calc from the flash cable and turning it on my programs are all there in the flash library.
This was easy enough to figure out but I don't recall seeing it documented explicitly anywhere. Should it be? Learning to do this saves me several steps and lots of time when restoring the calc's programs after a new firmware flashing. Of course, I will still need to use the emulator and calc serial transfer commands to move other RAM contents like registers and settings, but this seems to be the best way to move programs, especially when the size of one's library grows larger than the maximum allowable size of RAM.
Comments welcome!
Les
Edited: 3 Apr 2012, 1:45 a.m.
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Hi Les,
Thanks for your post describing your experience. The part of the manual dealing with the topics you covered eventually became the oldest one now and obviously needs some rework. Will be done in due course and may use - with your permission - some parts of your text. If you want something added, feel free to send me an update.
Walter
Posts: 3,283
Threads: 104
Joined: Jul 2005
I was always thinking that Unix users were much more proficient with command line utilities then their Windows counterparts, so I wrote the first drafts of the chapter in the documentation for this clientèle. Your approach is perfectly correct.
Just moving a single program to the calculator over the wire is easy unless it's larger then the maximum number of program steps in RAM (with zero registers allocated). A single program should never reach this size. That's what the END statement is designed for: Divide your work in manageable units which can be easily moved between RAM and the library with PSTO and PRCL.
▼
Posts: 882
Threads: 23
Joined: Jan 2005
Quote:
I was always thinking that Unix users were much more proficient with command line utilities then their Windows counterparts
Please, don't generalize... ;)
Massimo
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Quote:
I was always thinking that Unix users were much more proficient with command line utilities then their Windows counterparts
Please, don't generalize... ;)
Yes, especially Windows users coming from the good old DOS times are definitely experts in command line utilities! :-)
Franz
▼
Posts: 756
Threads: 31
Joined: Aug 2010
My coworkers find my reliance on the command line somewhere between odd and irritating. The funny thing is that one of those individuals comes from a UNIX background so I am surprised by *his* reliance on GUI tools.
Cheers,
-Marwan
▼
Posts: 2,448
Threads: 90
Joined: Jul 2005
In '98, I was working in Deutschland for a few months and the yard was on a Unix mainframe. The GUI of that UNIX system blew away anything either W$ or Apple had ever done.
Only a few years earlier in grad school, the unix mainframe was completely command line.
Posts: 1,368
Threads: 212
Joined: Dec 2006
Walter and Marcus,
Should it be possible as well to concatenate state files wp34s.dat or wp34s-backup.dat with calc.bin. The v. 2.2 manual gives instructions for doing this with copy /b, but when I attempt to concatenate with
$ cat calc.bin wp34s-lib.dat wp34s-backup.dat > my_calc_full.bin
or variations on this (library file comes second rather than first, wp34s.dat used as state file rather than the backup file), the library contents may or may not go over (depending whether I concatenate it first or second to calc_bin), but the state file contents don't write at all to the catalogue.
Keep in mind that I use MySamba, so in the event that the state file is written to RAM rather than flash memory in the back-up addresses, it will be erased when I hit the reset button and turn the calc back on.
Any thoughts on this? I probably won't do this sort of flashing as a steady diet, but it will be nice to see if it is possible.
Les
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
You need to use DD to fill the flash file to 126KB size before you can append wp34s.dat. Can't think of an automated syntax (independent of actual flash file size) to do this.
BTW, your bin files look ok. I need to check on the hardware. It might be a checksum error. Can you send me the wp34s-lib.file you are appending?
▼
Posts: 1,368
Threads: 212
Joined: Dec 2006
▼
Posts: 1,368
Threads: 212
Joined: Dec 2006
Never mind. Google is my friend. Looks sophisticated. Could be fun to play with, but I do fear bricking my calc...
▼
Posts: 225
Threads: 13
Joined: Jun 2011
DD means "Copy & Convert" but CC was already taken.
Posts: 3,283
Threads: 104
Joined: Jul 2005
The ERASE button will always bring your calc back to SAM-BA boot mode so don't be afraid.
▼
Posts: 1,368
Threads: 212
Joined: Dec 2006
Good to know.
I will note that I tried to manipulate the size of my calc_full.bin by appending multiple copies of wp34s-lib.dat plus wp34s.dat to bring it to a total file size of 128KB. No dice. I the flashing goes well, but all I get is a single copy of the library programs.
I won't worry about this now. It would be great to get this to work, but for the time being I am happy that I can build a wp34s-lib.dat file of my choosing, concatenate it with calc.bin, and move it over. If I wish to move over RAM contents or settings from the emulator, SENDA, SENDP, SENDR, etc., work very well indeed, even on the Mac.
Les
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
Quote:
I will note that I tried to manipulate the size of my calc_full.bin by appending multiple copies of wp34s-lib.dat plus wp34s.dat to bring it to a total file size of 128KB. No dice. I the flashing goes well, but all I get is a single copy of the library programs.
That explains it! The software looks in exactly one place for the library header, that is at the end of the code, rounded up to a 256 byte boundary. The header contains a checksum and the number of steps. The lib tool is responsible to add programs and update the header. Any further copies of this data block aren't recognized at all, they are just invisible to the software.
|