 |
|  |
 |
| How to Start Programming the aJile-100 on the SaJe Board |
 |
 |
 |
 |
 |
 |
 |
| Hardware to the SaJe Board |
You shall use:
- a Systronix aJile euroboard (SaJe) with a aJile-100 native Java™ processor.
You can buy it at Systronix: www.systronix.com
- a PC to development of the programs.
|
 |
 |
 |
 |
 |
 |
 |
| Software to the SaJe Board |
You shall use:
- The software you get on a CD when you buy the Saje board, that is:
- aJile's Java class library
- JemBuilder - Charade.
- Java: JDK1.3.1 (if you use J2SDK1.4 you must use the option: "-target 1.1", when compiling).
|
 |
 |
 |
 |
 |
 |
 |
| Setting up the Hardware |
You shall do the following:
- Connect the PC parallel port to the JTAG port on the SaJe board :
- the DB25 to RJ45 adapter is plugged into the parallel port of the PC - the adapter and the JTAG pud (see the picture below) is connected with the ethernet cable - the JTAG pud and the JTAG port on the SaJe board is connected with a 10-conductor ribbon cable (5x2 header pinout).
- Install the swap memory jumper on the SaJe board. This means that SRAM is used.
- Make power connection to the power input stik on the SaJe board.
Some usefull links and pictures about the hardware and setting it up:
Systronix Rev2 SaJe Quick Reference
JStamp Tutorials - Plug it together and access with JTAG
A picture of the JTAG adapter kit A picture of the JTAG pod |
 |
 |
 |
 |
 |
 |
 |
| Installing and Setting up the Software |
You shall do the following:
- Install JDK1.3.1 as usual (it can be downloaded from java.sun.com).
Remember to add the path (for example: C:\jdk1.3.1_05\bin) under Environment Variables in Control Panel -> System -> Advanced -> Environment Variables.
- Control the parallel port on the PC:
Its mode shall be ECP (Enhanced Capabilities). You can (perhaps) see the mode in Control Panel -> System -> Hardware -> Device Manager -> Ports -> Printer Port. Otherwise: enter the BIOS, when you start up the PC. Select Config -> Parallel Port. Set the Parallel Port: [Enabled], Mode : [ECP]. The other settings of the parallel port will typically be: Base I/O address: [378], Interrupt: [IRQ 7], DMA: [DMA 0]. Save and Exit (F10). |
 |
 |
 |
 |
 |
 |
 |
| Programming the SaJe Board |
The Programming Cycle will typically be:
- Implementation:
write the source code with a suitable editor: JCreator, Emacs or the like.
- Compilation:
javac -bootclasspath C:\aJile\Runtime_cldc\Rts;C:\aJile\Runtime_cldc\classes.jar *.java
or if you use J2SDK1.4:
javac -target 1.1 -bootclasspath C:\aJile\Runtime_cldc\Rts;C:\aJile\Runtime_cldc\classes.jar *.java
I have presupposed that the aJile software is installed in C:\aJile You can make a bat file with the above content.
- Static linking og building the JVM:
use the JEM Builder.
- Loading and executing the JVM on the SaJe board:
use Charade. Usefull user guides about how to use JEM Builder and Charade:
- aJile Tools Users Guide
- aJ-100EVB Users Guide
If the aJile software is installed in C:\aJile, you can find these guides in C:\aJile\Tutorial.
|
 |
 |
 |
 |
 |
 |
 |
| Example 1: Hello aJile |
// ************************************************************
// File name : Hello_aJile.java // Start date : 11-10-2002.
// Programmer : Hans So.
// Java : Java 1.3.1_05
// Discription: Your first program on the aJile-100.
// ************************************************************
import com.ajile.jem.*;
public class Hello_aJile
{
public static void main(String args[])
{
// If the setting up, building, loading and executing goes well,
// and the following has been set in Charade:
// Setup -> Configuration: Text I/O enabled,
// then System.out.println should write the Hello-string on the console in Charade.
System.out.println("Hello from aJile-100");
}
}
|
 |
 |
 |
 |
 |
 |
 |
| Example 2: Raw Memory Write |
// ************************************************************
// File name : RawMem1.java
// Start date : 11-10-2002.
// Programmer : Hans So.
// Java : Java 1.3.1_05
// Description: The program will write the number 3 at
// address 0x7fff0, and a string on the console in Carade.
// To see the content on the address you can in Charade use:
// Options -> Poll or Options ->Memory
// ************************************************************
import com.ajile.jem.*;
public class RawMem1
{
public static void main(String args[])
{
// The address to write to:
int addr = 0x7FFF0;
rawJEM.set(addr, 3);
System.out.println("Raw memory access at 0x7fff0");
}
} |
 |
 |
 |
 |
 |
 |
 |
|
 |
|
|  |
|
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
 |
How to start programming the aJile-100 on the SaJe board |
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|