summaryrefslogtreecommitdiffstats
path: root/Help/generator/Green Hills MULTI.rst
blob: 7a5993a850a4dc1c212831a85419a672f0c073d4 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
Green Hills MULTI
-----------------

.. versionadded:: 3.3

.. versionadded:: 3.15
  Linux support.

Generates Green Hills MULTI project files (experimental, work-in-progress).

  The buildsystem has predetermined build-configuration settings that can be controlled
  via the :variable:`CMAKE_BUILD_TYPE` variable.

Platform Selection
^^^^^^^^^^^^^^^^^^

.. versionadded:: 3.13

The variable ``GHS_PRIMARY_TARGET`` can be used to select the target platform.

  | Sets ``primaryTarget`` entry in project file.

For example:

* ``cmake -G "Green Hills MULTI" -D GHS_PRIMARY_TARGET=ppc_integrity.tgt``

Otherwise the ``primaryTarget`` will be composed from the values of :variable:`CMAKE_GENERATOR_PLATFORM`
and ``GHS_TARGET_PLATFORM``. Defaulting to the value of ``arm_integrity.tgt``

* The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
  via the :option:`cmake -A` option.

  | Typical values of ``arm``, ``ppc``, ``86``, etcetera, are used.

* The variable ``GHS_TARGET_PLATFORM`` may be set, perhaps via the :option:`cmake -D`
  option.

  | Defaults to ``integrity``.
  | Usual values are ``integrity``, ``threadx``, ``uvelosity``, ``velosity``,
    ``vxworks``, ``standalone``.

For example:

* ``cmake -G "Green Hills MULTI"`` for ``arm_integrity.tgt``.
* ``cmake -G "Green Hills MULTI" -A 86`` for ``86_integrity.tgt``.
* ``cmake -G "Green Hills MULTI" -D GHS_TARGET_PLATFORM=standalone`` for ``arm_standalone.tgt``.
* ``cmake -G "Green Hills MULTI" -A ppc -D GHS_TARGET_PLATFORM=standalone`` for ``ppc_standalone.tgt``.

Toolset Selection
^^^^^^^^^^^^^^^^^

.. versionadded:: 3.13

The generator searches for the latest compiler or can be given a location to use.
``GHS_TOOLSET_ROOT`` is the directory that is checked for the latest compiler.

* The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
  via the :option:`cmake -T` option, to specify the location of the toolset.
  Both absolute and relative paths are valid. Paths are relative to ``GHS_TOOLSET_ROOT``.

* The variable ``GHS_TOOLSET_ROOT`` may be set, perhaps via the :option:`cmake -D`
  option.

  | Root path for toolset searches and relative paths.
  | Defaults to ``C:/ghs`` in Windows or ``/usr/ghs`` in Linux.

For example, setting a specific compiler:

* ``cmake -G "Green Hills MULTI" -T comp_201754`` for ``/usr/ghs/comp_201754``.
* ``cmake -G "Green Hills MULTI" -T comp_201754 -D GHS_TOOLSET_ROOT=/opt/ghs`` for ``/opt/ghs/comp_201754``.
* ``cmake -G "Green Hills MULTI" -T /usr/ghs/comp_201554``
* ``cmake -G "Green Hills MULTI" -T C:/ghs/comp_201754``

For example, searching for latest compiler:

* ``cmake -G "Green Hills MULTI"`` for searching ``/usr/ghs``.
* ``cmake -G "Green Hills MULTI -D GHS_TOOLSET_ROOT=/opt/ghs"`` for searching ``/opt/ghs``.

.. note::
  The :variable:`CMAKE_GENERATOR_TOOLSET` should use CMake style paths.

OS and BSP Selection
^^^^^^^^^^^^^^^^^^^^

.. versionadded:: 3.3

Certain target platforms, like Integrity, require an OS.  The RTOS directory path
can be explicitly set using ``GHS_OS_DIR``.  Otherwise ``GHS_OS_ROOT`` will be
searched for the latest Integrity RTOS.

If the target platform, like Integrity, requires a BSP name then it can be set via
the ``GHS_BSP_NAME`` variable.

* ``GHS_OS_DIR`` and ``GHS_OS_DIR_OPTION``

  | Sets ``-os_dir`` entry in project file.

  | ``GHS_OS_DIR_OPTION`` default value is ``-os_dir``.

  .. versionadded:: 3.15
    The ``GHS_OS_DIR_OPTION`` variable.

  For example:

  * ``cmake -G "Green Hills MULTI" -D GHS_OS_DIR=/usr/ghs/int1144``

* ``GHS_OS_ROOT``

  | Root path for RTOS searches.
  | Defaults to ``C:/ghs`` in Windows or ``/usr/ghs`` in Linux.

  For example:

  * ``cmake -G "Green Hills MULTI" -D GHS_OS_ROOT=/opt/ghs``

* ``GHS_BSP_NAME``

  | Sets ``-bsp`` entry in project file.
  | Defaults to ``sim<arch>`` for ``integrity`` platforms.

  For example:

  * ``cmake -G "Green Hills MULTI"`` for ``simarm`` on ``arm_integrity.tgt``.
  * ``cmake -G "Green Hills MULTI" -A 86`` for ``sim86`` on ``86_integrity.tgt``.
  * ``cmake -G "Green Hills MULTI" -A ppc -D GHS_BSP_NAME=sim800`` for ``sim800``
    on ``ppc_integrity.tgt``.
  * ``cmake -G "Green Hills MULTI" -D GHS_PRIMARY_TARGET=ppc_integrity.tgt -D GHS_BSP_NAME=fsl-t1040``
    for ``fsl-t1040`` on ``ppc_integrity.tgt``.

Target Properties
^^^^^^^^^^^^^^^^^

.. versionadded:: 3.14

The following properties are available:

* :prop_tgt:`GHS_INTEGRITY_APP`
* :prop_tgt:`GHS_NO_SOURCE_GROUP_FILE`

MULTI Project Variables
^^^^^^^^^^^^^^^^^^^^^^^

.. versionadded:: 3.3

Adding a Customization file and macros are available through the use of the following
variables:

* ``GHS_CUSTOMIZATION`` - CMake path name to Customization File.
* ``GHS_GPJ_MACROS`` - CMake list of Macros.

.. note::
  This generator is deemed experimental as of CMake |release|
  and is still a work in progress.  Future versions of CMake
  may make breaking changes as the generator matures.