Draft 2000 April 10 Background: I'm using Windows NT 4.0 with SP5 at work. At home I use Win98, second release. My system has three logical hard disks: C, D, and E. My CDROM is drive F. We use NT Server and have a 10/100 MBit office network. At home it's flat 10 MBit. These instructions apply to NT4 and in general to Win98. I'll detail my Win98 saga in another document. I'm writing this document as I actually do what's described here. This gives us both the expectation that you can duplicate my results. Purpose: This tutorial will take you step-by-step through the process of starting up a TINI system, including acquiring and configuring the tools with which to communicate and program it. Why use JBuilder 3.5? A few reasons: It's free. It works, mostly. It's faster and overall better then Symantec Cafe Pro 3.X for which we paid $300. It's a nice GUI. (I don't know about you but going to command line tools seems like a step BACK about 10 years...) It's not a Microsoft product. I like it, but "your mileage may vary". Do you need the Sun JDK too? NO, JBuilder 3.5 is complete in itself. It IS the JDK with a user interface wrapped around it. You will need the Sun COMM API for JavaKit. You can use other widgets like the Sun Servlet kit with JBuilder, if you intend to use those functions. We'll get to the details of what you need in a moment. Assumptions: I assume you have little or no experience with Java or TINI, but are an experienced PC user. I assume you are familiar with using telnet, FTP, a browser, and IP configuration tools on your PC. You don't need to know anything about Java to get started. I assume you will use JBuilder3.5 and the MurkWorks TiniTools. If you want to use something else, that's fine, but you're in the wrong place for help. You need a reasonable PC, at LEAST: 200 MHz Pentium, Windows 95, 1024x768 screen, 96 Mbytes RAM, and 100 MBytes free disk space. Any less and you will be unhappy. JBuilder is a large, resource-hungry program. You will want to have multiple windows open, simultaneously running JavaKit, telnet, and ftp. Later on, when you are building applications, JBuilder and TiniTools will handle the telnet and ftp sessions for you, but they thrive on a fast CPU with lots of memory. Like the woman in the song "She's a big-boned girl from southern Alberta and you just couldn't call her small", Java can't be accused of being petite or speedy so the more CPU you can apply the quicker you'll be done. My NT system has a fast disk, 256 MBytes RAM, a PII350 CPU, and a fast graphics card with a 1280x1024 IBM 19" screen. This is a good system, but it's over a year old and you can do a lot better now. I spend 8+ hours a day in front of it. These are my business tools and they are worth the investment. OK, I'm getting off the soap box. Oops, another assumption: that you have Internet access configured and functioning on your PC, including TCP/IP as a protocol. You must have TCP/IP on your PC in order to properly communicate with TINI. You can do some of the initial steps over a serial port, but the only way to send TINI an application is via FTP. Be patient. I'm not, so do as I say, not as I do. This process is not trivial or particularly quick. My first attempts to use TINI failed. I just could NOT get JavaKit to run, then when it started up at last, it would not talk to TINI. When I finally got JavaKit and the Sun JDK going and tried to bring JBuilder into the picture, more headaches. So don't get discouraged if you don't have immediate success. Take a break and come back to the battle later. He who fights and runs away lives to fight another day, and gets more sleep in the interim. I'm a hardware guy, originally, with a degree in electrical engineering. I'm mostly a self-taught programmer so I don't claim to do everything 100% by the book as a "real" programmer would do. Forgive me if I mangle some software terminology or obfuscate some point of the Internet Protocols. Send me an email and I'll try to mend my ways, as well as correcting this document. Get a cable modem or DSL connection, and spend a few hours (or a couple of days in my case) getting all the wrinkles out of that. Why? It makes life a lot easier if you can grab a 5- or 30- MByte file off the internet in a few minutes, and if you get involved with TINI and Java you will want to do that. Often. A 256 kbit line is good enough. I have a DSL line with a Cisco 675 modem at the office and at home. Go for the external modem, since it will do other nice things such as Network Address Translation. Internal interface cards in my opinion are more limiting and add the additional confusion of funneling everything through a PC which adds another point of failure and confusion. I prefer things modular and self-contained if possible. You'll need Winzip or equivalent, with the options set to use the file path information included in the archive. You must recreate the paths used in the programs you will install. Path problems are one of the the most common and persistent nuisances of Java. It's part of the dark side of 'run anywhere'. Don't use spaces in paths. Many operating systems won't tolerate them, and many Java tools will fail when they encounter a space in a path. Plus, they are a bad idea, so just don't use them. Use underscores or mixed case to achieve the same result. Most, if not all, of the Java tools are case sensitive. To Java, 'javakit' and 'JavaKit' are not the same. Be prepared to get bitten by this. To make matters worse, Windows 95, 98 and NT are inconsistent in how they deal with case. You also need a web browser. I prefer Netscape, I use 4.7 with 128-bit security. Internet Exploder will work too. Download free JBuilder3.5 at http://www.inprise.com/jbuilder/. I downloaded the win_jb35foundation.zip (29 MB), win_jb35docs.zip (29 MB), win_jb35samples.zip (5 MB), and jb35_opentools.zip (1 MB). (This is why you got that fast internet connection.) You can also order a CDROM for under $10 and wait a couple of weeks for it. JBuilder is a graphical environment for the Sun Java 2 version 1.2.2 which is also called just Java 2 or JDK 1.2.2. (If anyone can explain the sense of these numbers and how they are equivalent, I'd like to hear it.) You don't need the SUN JDK too, it's included in JBuilder. Don't go to Sun's web site and download the SUN Java JDK! You already have it with JBuilder. Install JBuilder 3.5, in my case this was into the folder e:\JBuilder35 In JBuilder35\bin\ open the file config.jdk, look for some existing "addpath" lines and add the line: addpath e:/tinibeta2.2/tini.jar This is required to allow TiniTools to start up properly as part of the JB35 IDE. While the config.jdk file is open, look at the rest of the options. In particular this one: # +-----------------------------------------------------+ # | | # | Uncomment the following line if you are seeing | # | screen glitches while running JBuilder. This | # | problem is especially common under Windows 95/98. | # | | # +-----------------------------------------------------+ #vmparam -Dsun.java2d.noddraw On my NEC Versa 6233 notebook, uncommenting this line got rid of bad screen focus redraws. For example in JB35 when one window overlies another and is moved or closed, the underlying window now is properly redrawn. Install tinibeta2.2, in my case I used winzip and extracted to folder e:\tinibeta2.2, this is my TINI root folder. Create a batch file called JavaKit.bat in the TINI root folder, this is where tini.jar and tiniclasses.jar are located. In my case the JavaKit.bat file contains one line which may look like two separate lines, or otherwise odd due to word wrap in this document. NOTE: this batch file refers to comm.jar which we have not yet obtained or installed, so don't try to run the batch file yet. E:\JBuilder35\jdk1.2.2\bin\java -classpath E:\JBuilder35\jdk1.2.2\lib\comm.jar;E:\tinibeta2.2\tini.jar; JavaKit Explanation: this batch file invokes the java compiler in the JB35 jdk folder on JavaKit. It also sets up the classpaths needed to run JavaKit. Note, the .jar files must be listed in this order. I got mysterious Java "variable pool" error messages when the order was different. No, I don't know why. Optionally put this line in your C root folder, file autoexec.bat: path = e:\JBuilder35\jdk1.2.2\bin;%path% This will enable you to use the Sun JDK command line tools from a command prompt which you open at any time later, since your command prompt path will point to the JDK bin folder which contains java, javac, javadoc, jar, etc. Yes, autoexec.bat files can be used with NT and Win98 (I've been told otherwise). They are a perfectly acceptable way to do path and environment sorts of things. Optionally install the "tweakui" utilities from Microsoft. I didn't install them all, but did install the one which lets you right click on any folder in Explorer and create a DOS Window there. It creates a right menu option "command prompt here". This is a big time saver. Ensure your command prompt path includes the windows system folder, in my case it is C:\WINNT\system32 which contains such executables as telnet, ftp, ipconfig, ping, etc. You will want to be able to execute these from a command prompt in any folder on your hard disk. It just makes your life easier. Command prompt tips: in NT4, you can click on a command prompt's little MSDOS symbol in the upper left corner of the window and selct "properties". You can set command buffer size, window size, font and other useful things. Then when you close the properties setup you want to select "save properties for future windows with same title". If you then create a desktop shortcut for command prompts you will use often, these options are retained until you change them, persisting through system restarts. In my case then I can have a WINDUMP command window which is 140 chars wide and a screen buffer 1000 lines deep. This lets me scroll back through a lot of detailed traces. Go to http://java.sun.com/products/javacomm/ and download javacomm20-win32.zip (300 KBytes), this is needed for serial communications from your PC to TINI. Extract the files into the TINI folder. This will create a folder in my case e:\tinibeta2.2\commapi. Now in that folder (e:\tinibeta2.2\commapi for me) open the file PlatformSpecific.html, it has instructions for installing the commapi files. Here's the short version, edited for my case. Copy win32com.dll to folder e:\JBuilder35\jdk1.2.2\bin. Copy comm.jar to folder e:\JBuilder35\jdk1.2.2\lib. Copy javax.comm.properties to the e:\JBuilder35\jdk1.2.2\lib directory. Failure to do this will result in JavaKit's inability to enumerate your PC serial ports - instead of COM1, COM2 etc, you will see 'serial0' which are just the name placeholders, not real serial ports. You can't access 'serial0'. Add comm.jar to your classpath. We already did this above in the JavaKit.bat file. OK, you should be ready. Double click on the JavaKit.bat file or type 'JavaKit' at a command prompt in the e:\tinibeta2.2 folder. Baud rate should be 115 kbaud. Your TINI sockets board should be powered on. In the portname pull down list select the serial port on your PC which is connected to a TINI sockets board such as TILT or STEP. You want the "main" TINI serial port, which is the only serial port on TILT, and the serial port closest to the TINI simm on STEP. You want a straight through RS232 cable, NOT a null modem cable, to connect your PC to a Systronix or Dallas TINI socket board (other sockets boards may be different). In my case I choose COM1. Now click on Open Port. The DTR radio button will change to "set". This is resetting TINI if your sockets board supports a DTR reset (be sure jumper JP5 on STEP is installed, it's right next to the reset pushbutton). Now click on Reset, and the DTR radio button will change to "clear". You should see the TINI loader prompt: TINI loader 08-24-99 09:34 Copyright (C) 1999 Dallas Semiconductor. All rights reserved. > If you don't see this prompt, don't give up yet. Power off the TINI board, then power it on with the serial port still connected. As soon as power is applied, click on the JavaKit reset button. In some circumstances (such as bad heap corruption in earlier firmware versions) I have seen TINI require multiple power off-and-on cycles and multiple JavaKit resets in order to respond and give the loader prompt. When you click reset, the TINI CPU LED should flicker on, then go out. This LED is driven by the DS80C390 controller P3.5. All the DS80C390 port pins are pulled weakly high during a reset, and that high level drives the LED on. If you don't see the loader prompt, the first thing to verify is your PC serial port and the cable to the TINI socket board. From your PC, DTR, TXD and RXD must all be working. TINI does not use other flow control signals. DTR is used by TINI as a reset signal, never as serial communication flow control. If your PC drives DTR all the time (Hyperterminal does this for example, that's can't use it to load TINI) then TINI will be perpetually in a reset condition, unable to do anything. You can use lower baud rates if you suspect that is the problem (serial cable poor quality or longer than 10-15 feet), but the TINI flash loading will take longer. Note: Dallas ships TINIs with a factory test program in them. This program doesn't do us any good, so we need to erase it and install the TINI firmware. Don't be alarmed at the presence of this factory test program. At the loader prompt, type B18 F0 This will flush the heap and erase any existing file structure on TINI. We now want to erase any existing TINI programs or flash data (other than the boot loader, of course). At the loader prompt, type Z8 This attempts to zero out all the flash banks. Actually it zeros out banks 7,6,5,4,3,2, and 1, but when it comes to bank 0 the loader will not erase itself, so you see a normal error message: TINI loader 08-24-99 09:34 Copyright (C) 1999 Dallas Semiconductor. All rights reserved. >Z8 You sure? Y 76543210 *Err*  *Err*  > Now all the flash banks are empty, ready for you to load the TINI firmware. Use the JavaKit menu File->Load Hex File, and browse to the folder e:\tinibeta2.2\firmware\tini.hex. You should see something like this in JavaKit as the file loads into TINI's flash: Accessing bank number: 0 Bank is Flash ROM... Accessing bank number: 1 Accessing bank number: 2 Finished Loading file: E:\tinibeta2.2\firmware\tini.hex > Now use the same method to load e:\tinibeta2.2\firmware\tiniapi.hex. We're almost done. The last flash file to load is slush.hex. Slush is the command line shell for TINI, sort of like command.com for DOS PCs. Use the JavaKit menu File->Load Hex File, and browse to the folder e:\tinibeta2.2\examples\slush\slush.hex. At the loader command prompt you can type HELP for some terse help: >HELP B [bank] - select Bank C [range] - Crc range in selected bank D [range] - Dump hex from selected bank E - Exit to bank 1 F x [range] - Fill range in bank with value x G - Goto offset 0 in selected bank. Remain in paged mode. H or ? - Help L - Load into selected bank M - Move loader to selected bank S - Set comm Speed to 1/2 present T - invoke Tests V - Verify hex against memory X [offset] - eXecute code at specified offset in this segment Z n - Zap (erase) flash sector n (0-7). n = 8 for all sectors > Now that tini.hex, tiniapi.hex, and slush are in flash, we're ready to boot them and run slush to continue configuring TINI. To do this type 'E' at the loader prompt, This exits the loader and executes any program in bank 1, in our case this is TINI.HEX. You should see output similar to this: >E ×LXYYY™F-šZ2hÛ7dÏËËËËÃ…TINI OS Beta 2.2 API Version 8004 Copyright (C) 1999, 2000 Dallas Semiconductor Corporation 01000000 Doing First Birthday Memory Size: 07E800 Addresses: 181800,200000 Skip List MM L02 Waiting for reset button release KM_Init Passed Ethernet MAC Address Part Found TTS Revision: 129 , Date: 2/15/00 10:32a Thread_Init Passed CINIT External Serial Port Init External serial ports not enabled Memory Available: 077B00 Creating Task A 0100 01 Loading application at 0x070000 Application load complete Creating Task: 0200 02 [-= slush Version 1.0 Beta 2.2 =-] [ System coming up. ] [ Beginning initialization... ] [ Not generating log file. ] [Info] [ Initializing shell commands... ] [Done] [ Checking system files... ] [Done] [ Initializing and parsing .startup... ] [ Initializing network... ] [ Network configurations not set. ] [Skip] [ Network configuration ] [Done] [ System init routines ] [Done] [ slush initialization complete. ] Hit any key to login. Hit the enter key at the above prompt, then "root" for the username and "tini" for the password: Welcome to slush. (Version 1.0 Beta 2.2) TINI login: root TINI password: TINI /> Now you see the TINI prompt "TINI /> ", which is different from the boot loader prompt. Type HELP at the prompt and you get a list of TINI slush help topics: TINI /> help Available Commands: passwd ls nslookup chmod stopserver put ping hostname rm date clear ipconfig reboot startserver cat rd append sendmail mkdir source userdel pollmemory rmdir copy dir df echo history pwd move gc mv whoami wd kill useradd cp ps get stats del md wall help su downserver cd who java genlog touch setenv TINI /> You can type "help" followed by the command name for help on that topic. We want to use ipconfig, so type "help ipconfig", and you will see: TINI /> help ipconfig ipconfig [options] Configure or display the network settings. [-a xx.xx.xx.xx] Set IP address [-n domainname] Set domain name [-m xx.xx.xx.xx] Set subnet mask. Must be used with -g option. [-g xx.xx.xx.xx] Set gateway address. Must be used with -m option. [-p xx.xx.xx.xx] Set primary DNS address [-s xx.xx.xx.xx] Set secondary DNS address [-d] Use DHCP to lease an IP address [-r] Release currently held DHCP IP address [-e xx.xx.xx.xx.xx] Set Ethernet address [-h xx.xx.xx.xx] Set mailhost [-f] Don't prompt for confirmation TINI /> At this point, type "ipconfig" to see what TINI's current settings are. In my case: TINI /> ipconfig Hostname : TINI. Current IP : Default Gateway : Subnet Mask : Ethernet Address: 0.96.53.0.15.134 Primary DNS : Secondary DNS : DNS Timeout : 1000 (ms) DHCP Server : DHCP Enabled : false Mailhost : TINI /> OK, now TINI is up and running, slush is running, but TINI has no IP address. It needs one in order for you to send it files. If you want TINI to communicate outside on the internet, it will also need a gateway, and a subnet mask. First, however, TINI has to be connected to your PC via an ethernet connection, and your PC must be running TCP/IP as a protocol. (You can leave the serial link to TINI active during all of what follows.) TINI is only capable of 10 Mbit ethernet speed, so the ethernet hardware into which it will connect must either be 10 Mbit or 10/100 Mbit. TINI cannot be plugged into a fixed 100 Mbit ethernet. Assuming your ethernet speed is OK, there are two connection possibilities: 1) TINI connected directly to your PC's ethernet card. This requires a crossover (TX and RX swapped between ends like a serial null modem cable) ethernet cable. 2) TINI connected to a hub along with your PC, and possibly other PCs or servers, on an existing TCP/IP network. This requires a straight ethernet cable. The hub does the crossover for you in this case. It's easy to tell if TINI is correctly connected. The LINK LED (the silkscreen on my TINIs reads "LK") will light up if the ethernet link is OK. Your TINI is ehternet-enabled. Now at the TINI JavaKit prompt you need to set the IP address. You don't need a gateway to talk to tini over a local ethernet. If you want TINI to communicate with the internet, it needs a gateway and a subnet mask. Here's what I use: TINI /> ipconfig -a 166.70.144.45 -g 166.70.144.33 -m 255.255.255.0 Warning: This will disconnect any network users already connected and reset all network servers. OK to proceed? (Y/N): y Message from System: FTP server stopped. Message from System: Telnet server stopped. Message from System: Telnet server started. Message from System: FTP server started. TINI /> This sets TINI's IP address to 166.70.144.45, the gateway to 166.70.144.33 (our office server and DSL gateway), and the subnet mask to 255.255.255.0. This mask allocates the last portion of the IP address to our local network, with anything outside of that going to the gateway and thence to the internet. (At home I have a much simpler setup with just a DSL modem, it's completely different, more on that later). Now if I type "ipconfig" I see: TINI /> ipconfig Hostname : TINI. Current IP : 166.70.144.45 Default Gateway : 166.70.144.33 Subnet Mask : 255.255.255.0 Ethernet Address: 0.96.53.0.15.134 Primary DNS : Secondary DNS : DNS Timeout : 1000 (ms) DHCP Server : DHCP Enabled : false Mailhost : TINI /> OK, time to try to talk to TINI from your PC's ethernet. At a PC DOS command prompt, type "ping", here's what I see: E:\tinibeta2.2>ping The name specified is not recognized as an internal or external command, operable program or batch file. E:\tinibeta2.2> Oops! We need to set your command prompt path to include the folder where the IP utilities are located. In Windows explorer (not Internet Explorer), use the Find tool to search for "ping.exe". In my case this is in folder c:\winnt\system32. I need to make that part of my path. For now you can do this at the same DOS command prompt which gave you the "can't recognize the name" error: path=c:\winnt\system32\;%path% Now if I type "ping" followed by the enter key, I see: E:\tinibeta2.2>ping Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list Options: -t Ping the specifed host until interrupted. -a Resolve addresses to hostnames. -n count Number of echo requests to send. -l size Send buffer size. -f Set Don't Fragment flag in packet. -i TTL Time To Live. -v TOS Type Of Service. -r count Record route for count hops. -s count Timestamp for count hops. -j host-list Loose source route along host-list. -k host-list Strict source route along host-list. -w timeout Timeout in milliseconds to wait for each reply. E:\tinibeta2.2> OK, now try pinging TINI, in my case this is: E:\tinibeta2.2>ping 166.70.144.45 Pinging 166.70.144.45 with 32 bytes of data: Reply from 166.70.144.45: bytes=32 time<10ms TTL=64 Reply from 166.70.144.45: bytes=32 time=10ms TTL=64 Reply from 166.70.144.45: bytes=32 time<10ms TTL=64 Reply from 166.70.144.45: bytes=32 time<10ms TTL=64 E:\tinibeta2.2> Now find out your PC's IP address by typing "ipconfig" at your PC command prompt: E:\tinibeta2.2>ipconfig Windows NT IP Configuration Ethernet adapter E100B1: IP Address. . . . . . . . . : 166.70.144.35 Subnet Mask . . . . . . . . : 255.255.255.224 Default Gateway . . . . . . : 166.70.144.33 E:\tinibeta2.2> This works for Windows NT and 98. Windows 95 uses "winipcfg" if memory serves. At the TINI serial command prompt, try to ping your PC from TINI. In my case: TINI /> ping 166.70.144.35 Got a reply from node 166.70.144.35/166.70.144.35 Sent 1 request(s), got 1 reply(s) TINI /> Note that in order for TINI to access the internet, it also needs a DNS entry, in order to lookup URLs which are outside the local network space. We're almost there! A couple of more IP tools we need to test are telnet and ftp. From a PC command prompt, type (in my case) E:\tinibeta2.2>telnet 166.70.144.45 You should see a telnet window open, with a "welcome to slush" prompt. You can login the same as you did the serial TINI connection, username "root" and password "tini". At the telnet prompt, type "who" followed by the enter key, and you will see: Welcome to slush. (Version 1.0 Beta 2.2) TINI login: root TINI password: TINI /> who Serial ====== root Telnet ====== root FTP ====== None TINI /> This information tells us that user "root" is logged in on TINI's serial port and also the telnet port. No one is logged in on FTP. We're about to change that, however. At a PC command prompt, type "ftp 166.70.144.45" followed by the enter key, and you should see another login prompt. Go ahead and login as "root" with "tini" again, and type help. E:\tinibeta2.2>ftp 166.70.144.45 Connected to 166.70.144.45. 220 Welcome to slush. (Version 1.0 Beta 2.2) Ready for user login. User (166.70.144.45:(none)): root 331 root login allowed. Password required. Password: 230 User root logged in. ftp> help Commands may be abbreviated. Commands are: ! delete literal prompt send ? debug ls put status append dir mdelete pwd trace ascii disconnect mdir quit type bell get mget quote user binary glob mkdir recv verbose bye hash mls remotehelp cd help mput rename close lcd open rmdir ftp> This help is not from TINI but from your PC. Some commands such as "ls" for a directory list, are available both from ftp and telnet. Others, such as file "put" and "get" are available only from ftp. Now if we type "who" from the telnet window we see our ftp login, too: TINI /> who Serial ====== root Telnet ====== root FTP ====== root TINI /> At this point, spend a while trying the different telnet, ftp and serial commands. For example, at the ftp prompt, try "ls": ftp> ls 200 PORT Command successful. 150 Data connection open, listing / etc 226 Closing data connection. 5 bytes received in 0.18 seconds (0.03 Kbytes/sec) ftp> There is one folder on TINI, called "etc". You can get more details with the ls -l option at the telnet window: TINI /> ls -l etc Directory Listing For etc -rwxr-- root 28 04-10-00 16:13 .tininet -rwx--- root 225 04-10-00 16:13 .startup -rwxr-- root 101 04-10-00 16:13 passwd 3 file(s). 0 dir(s). Total size: 354 (bytes). TINI /> These are some default files created by slush. What about .startup? Use "cat" on it: TINI /> cat /etc/.startup ######## #Autogen'd slush startup file setenv FTPServer active setenv TelnetServer active setenv SerialServer active ## #Add user calls to setenv here: ## initializeNetwork ######## #Add other user additions here: TINI /> /etc/.startup is where you can put threads of your own which you want TINI to execute when it boots up. You've installed JB 35, and configured some of it, including TiniTools (note to me: double-check this) so fire it up and let's do our first Java app for TINI. A Simple Java App The TINI CPU LED is lit when the DS80C390 Port 3 pin 5 is high. A good first application is toggling this port pin. In my case I want to see how quickly it can be toggled from Java. Aim your browser at the TINI java docs, in my case this is e:\tinibeta2.2\TINIJavaDocs_Beta21\index.html, and in the All Classes pane click on the BitPort class. There is a Port3Bit5 field, and also fields for Port 3, bits 0-5, and Port 5, bits 0-3. Port3Bit3 is the DS80C390 external interrupt one, which is not used internally by TINI. It's available for your use. If you have a STEP board, you can clip lead a pin such as P3.3 to one of the user LEDs. For now, though, it's simpler to blink the LED which is already on TINI. Notice that BitPort is part of the com.dalsemi.system package. If you click on the 'package' link at the top of the javadoc detail pane, you can see the other classes in com.dalsemi.system: DataPort, ExternalInterrupt, and others. We'll use DataPort soon, but for now, back to toggling the CPU LED. First, set up some project defaults in JBuilder. These apply to any TINI project you will do. On the main JB task bar, select Project -> Default Project Properties. A tabbed list pops up. First, set the source file path to something useful. Click on the 'paths' tab and then within that, the 'source' tab to do this. In my case, I want e:\tinibeta2.2\systronix\tutorial. This folder doesn't exist, and I would expect to be able to create it within the JB browse box, but it's not obvious to me how you do this (and the JB online help doesn't). So out to Windows Explorer to create the path so we can use it in JB. e:\tinibeta2.2 \systronix \tutorial \src \bin Alternatively, you can create a new project with the new project wizard and JB will create the folders for you, you just can't create them from within the path setup browse dialogs. JBuilder wants to create subfolders by itself (and frankly I'm still a bit confused about how it wants to arrange things). Project files can be in the \tutorial folder. Source files will go in the \src folder and the output path in the \bin folder, but JBuilder will create subfolders with the project name within \src and \bin. To help maintain your sanity, keep your project source files (.java and .prj) and output (.class and .tini) files in separate folders from other projects. At the time of this writing, both JB and the TiniConvert utility (explained in a moment) get confused if they see unrelated files in the same folder. So save some needless frustration and keep them all separate. Set up the source path and output paths to these folders. Now set up the tini classes: click on the 'required libraries' tab, still in the 'paths' main tab. Click 'add' then 'new', and enter a name - I used "TINI API from Dallas", then in the classes tab click on 'add' and browse to your tini.jar and tiniclasses.jar files, in my case these are e:/tinibeta2.2/tiniclasses.jar and e:/tinibeta2.2/tini.jar, in that order. Click OK to close each dialog box. Now every JBuilder project you start will include the necessary tini jar files. "Jar" is an acronym for "Java Archive", it is just a convenient way to distribute and use a group of Java classes. The JDK in JBuilder includes a tool for manipulating jar files, called, logically enough "jar". Since you already set up a path to the JDK binary folder, you can see what's in tini.jar with the jar tool this way: open a command prompt in the same folder as your tini.jar and tiniclasses.jar. You can type just "jar" to get some help: E:\tinibeta2.2>jar Usage: jar {ctxu}[vfm0M] [jar-file] [manifest-file] [-C dir] files ... Options: -c create new archive -t list table of contents for archive -x extract named (or all) files from archive -u update existing archive -v generate verbose output on standard output -f specify archive file name -m include manifest information from specified manifest file -0 store only; use no ZIP compression -M Do not create a manifest file for the entries -C change to the specified directory and include the following file If any file is a directory then it is processed recursively. The manifest file name and the archive file name needs to be specified in the same order the 'm' and 'f' flags are specified. Example 1: to archive two class files into an archive called classes.jar: jar cvf classes.jar Foo.class Bar.class Example 2: use an existing manifest file 'mymanifest' and archive all the files in the foo/ directory into 'classes.jar': jar cvfm classes.jar mymanifest -C foo/ . E:\tinibeta2.2> So get a table of contents for tini.jar: E:\tinibeta2.2>jar tvf tini.jar 0 Tue Mar 28 01:50:34 MST 2000 META-INF/ 68 Tue Mar 28 01:50:36 MST 2000 META-INF/MANIFEST.MF 16992 Tue Mar 28 01:50:34 MST 2000 BuildTINIROM.class 12955 Tue Mar 28 01:50:34 MST 2000 TINIConvertor.class 0 Tue Mar 28 01:50:34 MST 2000 com/ 0 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/ 0 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/ 7095 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/AttributeInfo.class 9947 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/BinToHex.class 4547 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/BuildJiBDB.class 1146 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/ClassInfo.class 1346 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/ClassSort.class 18863 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/CodeAttribute.class 4951 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/ConstantPool.class 8584 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DBClassItem.class 572 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DBFieldItem.class 1214 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DBHash.class 1051 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DBItem.class 485 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DBLineNumber.class 706 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DBLocalVariable.class 3015 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DBMethodItem.class 1443 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DBTester.class 32916 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/Disassembler.class 757 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/DisassemblerException.class 1418 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/ExceptionsAttribute.class 1763 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/ExceptionTable.class 4291 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/FieldInfo.class 3709 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/GetOpt.class 22293 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/JiBDB.class 729 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/JiBDBException.class 13780 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/JiBDebugDB.class 750 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/JiBDebugDBException.class 9169 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/MethodInfo.class 1513 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/NameAndType.class 15743 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/PoolEntry.class 1980 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/RefInfo.class 1094 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/SourceFileAttribute.class 752 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/TINIConvertorException.class 1748 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/TINICRC.class 2477 Tue Mar 28 01:50:34 MST 2000 com/dalsemi/tiniconvertor/ToA51.class 3409 Tue Mar 28 01:50:34 MST 2000 ExtensionFileFilter.class 804 Tue Mar 28 01:50:34 MST 2000 JavaKit$1.class 1283 Tue Mar 28 01:50:34 MST 2000 JavaKit$2.class 953 Tue Mar 28 01:50:34 MST 2000 JavaKit$3.class 1804 Tue Mar 28 01:50:34 MST 2000 JavaKit$ChoiceListener.class 1009 Tue Mar 28 01:50:34 MST 2000 JavaKit$CloseHandler.class 1470 Tue Mar 28 01:50:34 MST 2000 JavaKit$HotKeyListener.class 1655 Tue Mar 28 01:50:34 MST 2000 JavaKit$InputHandler.class 5715 Tue Mar 28 01:50:34 MST 2000 JavaKit$LoadFile.class 1336 Tue Mar 28 01:50:34 MST 2000 JavaKit$MacroRunner.class 1570 Tue Mar 28 01:50:34 MST 2000 JavaKit$MListener.class 3801 Tue Mar 28 01:50:34 MST 2000 JavaKit$SerialEventListener.class 5074 Tue Mar 28 01:50:34 MST 2000 JavaKit$SpecialKeyListener.class 36227 Tue Mar 28 01:50:34 MST 2000 JavaKit.class E:\tinibeta2.2> Try tiniclasses.jar yourself. OK, JB35 has input and output paths set and required libraries set. Check that TiniTools are installed by clicking on the main JB Help menu. If you see "About TiniTools" near or at the bottom of the list, they are installed. Create a new project (File->New Project), browse to the systronix/tutorial folder you created earlier, and call the project "bit_test.jpr" Tutorial resumes online in HTML format.