This file details my recent (July 2012) experiences building the calc.bin
file for my WP-34S from source, on a computer running 64-bit Windows 7. I found that when following the instructions in the earlier wikis on this site (HOWTO build the Windows emulator from source and HOWTO build a new flash load (calc.bin) from source) there were a number of things that didn't work correctly for me, probably due to changes in the project since those documents written. So I'm writing up what I did in case there is anyone else who wants to try this but has the same problems that I had in getting it to work.
What follows is completely based on those earlier wikis. I have tried to give a complete set of instructions here, but readers should certainly consult the other wikis as well.
svn co https://wp34s.svn.sourceforge.net/svnroot/wp34s wp34s
. This will download the WP-34s project files and install them in the directory wp34s
in your current folder. This may take a while.mingw-get-inst-20120426.exe
which was able to download and install both parts of the software for me. If you are intending to build calculator firmware, you should certainly install both parts. My installation directory was C:\MINGW
; yours may, of course, be different.c:\mingw\bin;c:\mingw\msys\1.0\bin;
to the start of the list of paths. touch<Enter>
and checking that you get an error message (touch - missing file operand
) from the touch
program.wp34s\trunk\create_revision.c
creates and deletes a temporary file. I found that, for some reason, the name being generated for the temporary file was invalid. To fix this problem, in the file create_revision.c
use a text editor (e.g., Notepad) to change34: char tmpname[ FILENAME_MAX ];
to
34: char tmpname[ FILENAME_MAX ] = "rev_tmp.txt";
and comment out lines 39-42 by adding double forward slashes to the start of each line, like this:
// if (tmpnam( tmpname ) == NULL) { // perror("Unable to create tempory file name"); // return 1; // }
wp34s\trunk\wp34s_asm.pl
. I changed line 186 frommy $preproc_fallback_dir = "";
to
my $preproc_fallback_dir = "C:/Users/nd/wp34s/trunk/tools/";
where the long path name is simply the full address of the tools
folder on my system. Change this to whatever is correct on your system.
So: you've successfully compiled the Windows emulator. However, since you can download this from the svn repository anyway you are probably intending to do more than this. You almost certainly want to explore the source code and perhaps change it, and ultimately to upload such changes to your calculator.
This section deals with producing the files calc.bin, calc_full.bin, and so on.
tools
directory to the Windows path environment variable. On my machine the full path to this directory is C:\users\nd\wp34s\wp34s\trunk\tools
; use the correct folder for your machine. Without this path entry the assembler for the WP-34s cannot find its preprocessor.wp34s
top level directory. This should contain a file called flash.cmd
. Run this file by typing flash
at the command prompt command line. Everything should now work. The files calc.bin
, calc_full.bin
, etc., should all be built and should appear in wp34s\trunk\realbuild\
. MySamba
). See HOWTO build a new flash load from source for details.Having done all of this you are free to try making changes to the calculator source code. You should try out any changes on the emulator first, so that you can debug them (and to avoid draining your calculator batteries!). Good luck!