aboutsummaryrefslogtreecommitdiffstats
blob: a9750422763a667dc2919f98a3c17e07a391985e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Create a new model from scratch</title>
<link href="book.css" rel="stylesheet" type="text/css">
<meta content="DocBook XSL Stylesheets V1.75.1" name="generator">
<link rel="home" href="index.html" title="eTrice User Guide">
<link rel="up" href="TutorialHelloWorldforC.html" title="Tutorial HelloWorld for C">
<link rel="prev" href="TutorialHelloWorldforC.html" title="Tutorial HelloWorld for C">
<link rel="next" href="CreatetheHelloWorldmodel.html" title="Create the HelloWorld model">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Create a new model from scratch</h1>
<div class="section" title="Create a new model from scratch">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a name="Createanewmodelfromscratch4"></a>Create a new model from scratch</h2>
</div>
</div>
</div>
<p>Before you can create a new C-model, you have to create a new C project as described in 
				<span class="emphasis"><em>Setting up the Workspace for C Projects</em></span>.
				Remember:
				- select the 
				<span class="emphasis"><em>C/C++</em></span> perspective
				- From the main menue select 
				<span class="emphasis"><em>File-&gt;New-&gt;C Project</em></span>
				- Name the project 
				<span class="emphasis"><em>HelloWorldC</em></span>
				- Project type is 
				<span class="emphasis"><em>Executable / Empty C Project</em></span>
				- Toolchain is 
				<span class="emphasis"><em>MinGW</em></span>
			
</p>
<p>The workspace should look like this:</p>
<p>
				
</p>
<div class="mediaobject">
<img src="images/034-HelloWorldC01.png"></div>
<p>
			
</p>
<p>The next step is to add the model folder:
				Right click on the new project. Select 
				<span class="emphasis"><em>New-&gt;Folder</em></span> and name it 
				<span class="emphasis"><em>model</em></span>.
			</p>
<p>
				
</p>
<div class="mediaobject">
<img src="images/034-HelloWorldC02.png"></div>
<p>
			
</p>
<p>Add the model file to the folder. Right click on the new folder. Select 
				<span class="emphasis"><em>New-&gt;file</em></span> and name it 
				<span class="emphasis"><em>HelloWorldC.room</em></span>.
			</p>
<p>
				
</p>
<div class="mediaobject">
<img src="images/034-HelloWorldC03.png"></div>
<p>
			
</p>
<p>Due to the file ending 
				<span class="emphasis"><em>.room</em></span>, the tool will ask you to add the Xtext nature. Answer with 
				<span class="emphasis"><em>Yes</em></span>. 
			</p>
<p>
				
</p>
<div class="mediaobject">
<img src="images/034-HelloWorldC04.png"></div>
<p>
			
</p>
<p>The workspace should look like this:</p>
<p>
				
</p>
<div class="mediaobject">
<img src="images/034-HelloWorldC05.png"></div>
<p>
			
</p>
</div>
</body>
</html>