Transferred the simple build instructions into the README
[Mograsim.git] / README.md
1 # About
2
3 Mograsim is a modular, graphical simulator for teaching microprogramming, ISAs and 
4 circuit logic in a way that allows for a smooth transition between those levels. 
5
6 The aim is to give students a better understanding how these layers blend in a machine, 
7 and what the purpose of microprogramming is. In more detail, Mograsim allows:
8
9 * Programming and running simple assembler on the machine
10 * Defining an ISA (Instruction Set) to use in the assembler
11 * Microprogram the CPU to implement the specified ISA
12 * View the Circuit Logic operating and executing the microprogram in detail
13
14 Mograsim focuses especially on the AMD Am2900 Family microprocessors in a specific 
15 16-bit arrangement used by the Technical University of Munich as an example.  
16
17 # Building Mograsim
18
19 These are a very basic instructions for building Mograsim from source. 
20
21 It assumes you know nothing about Eclipse Plug-In development, Maven, or Git.
22
23 ## Prerequisites
24
25 1. [Java 11 JDK](http://jdk.java.net/java-se-ri/11) [(or Oracle Implementation)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
26 2. [Eclipse 2019-03 or later](https://www.eclipse.org/downloads/)
27 3. (optional) [Git](https://git-scm.com/downloads)
28
29 ## Install PDE (Plugin Development Environment)
30
31 1. In Eclipse, click on "Help" -> "Install New Software..."
32 2. Next to "Work With:", select "The Eclipse Project Updates"
33 3. Tick "Eclipse PDE Plug-in Developer Resources" (expand "Eclipse Plugin Development 
34    Tools" or type "PDE" in the search bar to see it)
35 4. Click on "Next >" two times, read and accept the license, and click on "Finish"
36 5. Wait for the installation to complete (may take a while). When prompted, restart 
37    Eclipse.
38
39 ## Clone the Git repository and import the projects
40
41 Can be done via Git or via EGit (Eclipse Git).
42
43 ### a) via EGit (Eclipse integration)
44
45 1. In Eclipse, click on "Window" -> "Show View" -> "Other..."
46 2. Select "Git Repositories" (expand "Git" to see it)
47 3. In the "Git Repositories" view, click on "Clone a Git repository"
48 4. Enter the repository URL ("Host", "Repository path", and "Protocol" should fill 
49    automatically); click on "Next >"
50 5. Select only "development"; click on "Next >"
51 6. Enter the directory you want the Mograsim projects to be saved in
52 7. Tick "Clone submodules" and "Import all existing Eclipse projects after clone 
53    finishes"; click on "Finish"
54
55 ### b) via Git (requires Git to be installed)
56
57 1. In a command prompt (Terminal on Linux; git-bash on Windows), execute `git clone 
58    --recurse-submodules --single-branch -b development <repository URL> <target directory>`
59 2. _(optional)_ Import the repository in Eclipse:
60     1. In Eclipse, open the "Git Repositories" view as described in the first two 
61        steps in **a)**
62     2. In the "Git Repositories" view, click on "Add an existing local Git repository"
63     3. Enter the directory of the repository and tick the repository you see in the 
64        list below; click on "Add". (If there is another repository ending with "SWTHelper", 
65        ignore it)
66 3. Import the projects into the workspace
67     1. Click on "File" -> "Import..."
68     2. Select "Existing Projects into Workspace" (expand "General" to see it); click 
69        on "Next >"
70     3. Tick "Select root directory:" and "Search for nested projects"
71     4. Next to "Select root directory:", enter the directory of the repository; click 
72        on "Finish"
73
74 Note: After importing the projects, probably an automatic workspace build will start. 
75 Wait for it to finish before continuing.
76
77 ## Do the Maven Tycho workaround:
78
79 In the project explorer or package explorer, right-click on "net.mograsim.tycho-download", 
80 click on "Run As" -> "Maven clean" and wait for it to finish.
81
82 ## Build the Update Site
83
84 1. In the project explorer or package explorer, right-click on "net.mograsim", click 
85    on "Run As" -> "Maven build..."
86 2. Next to "Goals", enter "clean verify"; click on "Run" and wait for it to finish 
87    (this will take a while)
88 3. Select all projects, right-click, and click on "Refresh"
89
90 The update site now should be built and is located in net.mograsim.plugin.updatesite/target/repository. 
91 In there you should see, among other files, a folder named "features", a folder named 
92 "plugins" containing some jar files, and two jar files called "artifacts.jar" and 
93 "content.jar".
94
95 More information about the build, structure and environment can be found in the [MAVEN-TYCHO-README.MD](MAVEN-TYCHO-README.MD).