Updated 2014-03-25 22:28:50 by AMG

2003-02-02, Svenn Are Bjerkem: The Yakumo Alpha PDA from http://www.yakumo.com is powered by a StrongArm 206MHz processor and has 64MB SDRAM and 32MB flash NVRAM. It runs Pocket PC 2002 and is ready for Tcl/Tk. After having read RS's description on his iPaq I decided to give it a try.


  • Yakumo Alpha running Pocket PC 2002. (Factory default installation)
  • Microsoft Active Sync. (On the CD or from Microsoft)
  • Windows operating system. (On the host computer)
  • USB cradle or cable. (Both included with the Alpha)
  • WinZip on host computer for unpacking the distributions.

Not necessary:

  • Compact Flash card
  • Multimedia card

What is not covered:

  • Installing when the host computer has a different operating system than Windows.
  • Installing when the PDA has a different operating system than Pocket PC 2002.
  • Installing using other sync program than Microsoft Active Sync.
  • Installing using other interface than USB.

If the Active Sync automatically synchronizes the PDA when you insert the PDA, it should be possible to install Tcl/Tk.

I downloaded the following files from the Windows/CE page:

These files can also be found individually in the file listing in [1] since it is to expect that they be updated in the future. Be careful to select the correct files for StrongARM as there are many to choose from. The list above give a good indication what filenames to look for.

Configure WinZip to disable the smart CR/LF conversion by opening the Options->Configure menu item in WinZip and then activate the Miscellaneous tab and disable the selection box in section other.

I unpack all the 4 downloaded tar.gz files to c:\temp, giving me the following structure:

plus more (for Yakumo Alpha) uninteresting wince* directories that got unpacked from celib-3.12-dll-bin-all-platforms.tar.gz

We now take a close look at the script data near the end of Windows/CE called wince_tcltk.bat:
   ::- Basic System Configuration
   REM Make changes here for your system
   set basepath=\Storage Card\Program Files
   set wish=%basepath%\Tcl\bin\wish84d.exe
   set tclsh=%basepath%\Tcl\bin\tclsh84d.exe
   set libdir=%basepath%\Tcl\lib
   set bindir=%basepath%\Tcl\bin
   set tcllibdir=%libdir%\tcl8.4
   set tklibdir=%libdir%\tk8.4
   ::- TclTk file associations
   cereg -k "HKCR\.tk" -n "" -v "tclfile"
   cereg -k "HKCR\.tcl" -n "" -v "tclfile"
   cereg -k "HKCR\tclfile" -n "" -v "TclTk Script"
   cereg -k "HKCR\tclfile\DefaultIcon" -n "" -v "%wish%,0"
   cereg -k "HKCR\tclfile\Shell\Open\Command" -n "" -v """"%wish%""" ""%%1"""
   ::- Tcl file associations
   cereg -k "HKCR\.tsh" -n "" -v "tshfile"
   cereg -k "HKCR\tshfile" -n "" -v "Tcl Script"
   cereg -k "HKCR\tshfile\DefaultIcon" -n "" -v "%tclsh%,0"
   cereg -k "HKCR\tshfile\Shell\Open\Command" -n "" -v """"%   tclsh%""" ""%%1"""
   ::- Environment Info
   cereg -k "HKLM\Environment" -n "TCL_LIBRARY" -v "%tcllibdir%"
   cereg -k "HKLM\Environment" -n "TK_LIBRARY" -v "%tklibdir%"
    REM Height of 10 is ok, 14 does almost full screen
   cereg -k "HKLM\Environment" -n "ROWS" -v "14"
    REM MAX Width for PPC is 29 Chars
   cereg -k "HKLM\Environment" -n "COLS" -v "29"
    REM Home
   cereg -k "HKLM\Environment" -n "HOME" -v "\\"
    REM Temp
   cereg -k "HKLM\Environment" -n "TEMP" -v "\Temp"
   cereg -k "HKLM\Environment" -n "TMP" -v "\Temp"
   cereg -k "HKLM\Environment" -n "TMPDIR" -v "\Temp"
   cereg -k "HKLM\Environment" -n "TEMPDIR" -v "\Temp"
    REM Path
   cereg -k "HKLM\Environment" -n "PATH" -v "%bindir%;"
    REM Username
   cereg -k "HKLM\Environment" -n "USER" -v "nobody"
    REM Debugging trace level (0 to 255)
   cereg -k "HKLM\Environment" -n "XCE_TRACE" -v "0"
    REM Debugging trace file output
   cereg -k "HKLM\Environment" -n "XCE_TRACE_FILE" -v "\xce_trace.txt"

Here the author has chosen to install Tcl/Tk to
 \Storage Card\Program Files\Tcl

which is on the PDA external storage card.

Now is the time to decide on where tcltk will have its home in the Yakumo PDA. As MPJ has yet to suggest a directory structure I chose to use

Later i discovered that I think I will suggest to use

instead, simply because you can then reuse the wince_tcltk.bat file with simple editing.

I chose to reuse the wince-reg2.bat file from the distribution, which I will explain in a moment. I will continue to use \tcltk for the rest of this tutorial.

Now I create a directory as the base directory. Feel free to name it otherwise.

on the host pc and copy the _contents_ of the directories (not the directories themselves) of


As suggested by Richard Suchenwirth, I also choose to copy


If I ever decide to remove tcl/tk from the PDA, I can remove the directory \tcltk and off it goes.

To upload Tcl/Tk to the PDA, press the Browse button in the Active Sync to open a file browser on the PDA.

Now drag the

directory and drop it into this window. If the Active Sync is connected it should now start copying the files down to the PDA. The copy process may take some minutes. Wait for it to finish.

We will now set the minimum required environment variables on the PDA.

On the host computer edit the file

and replace the word "unix" with the word "tcltk" in the two first "set" lines.

New wince-reg2.bat file:
 @echo off

 set wish=\tcltk\bin\wish84d.exe
 set libdir=/tcltk/usr/lib

 cereg -k "HKLM\Environment" -n "TCL_LIBRARY" -v "%libdir%\tcl"
 cereg -k "HKLM\Environment" -n "TK_LIBRARY" -v "%libdir%\tk"

 cereg -k "HKCR\.tcl" -n "" -v "tclfile"
 cereg -k "HKCR\tclfile" -n "" -v "TclTk Script"
 cereg -k "HKCR\tclfile\DefaultIcon" -n "" -v "%wish%,0"
 cereg -k "HKCR\tclfile\Shell\open\command" -n "" -v ""%wish%" "%%1""

On the host computer, copy the program


Now double click the wince-reg2.bat file on the host pc. You will get a black dos window showing up. Be patient, when the window is gone, configuration is finished.

The setting of the environment variables on the PDA is done from the host pc, not on the PDA. Pocket PC 2002 does not recognize bat files, and cereg.exe is compiled for Intel architecture.

If you have reach this far, then you can use the file browser on the PDA and enter \tcltk\samples and there should be a nice little icon in front of the tcl files here. If you tap one of them, say life.tcl, a small application show up which really load the StrongArm CPU. Tap the little X in the top right corner of the application window to close.

Some more of the recommended settings on the iPaq page must be done before I am really happy with my Yakumo Alpha Tcl/Tk design environment.

Nice work!