Green Hills MULTI.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. Green Hills MULTI
  2. -----------------
  3. .. versionadded:: 3.3
  4. .. versionadded:: 3.15
  5. Linux support.
  6. Generates Green Hills MULTI project files (experimental, work-in-progress).
  7. The buildsystem has predetermined build-configuration settings that can be controlled
  8. via the :variable:`CMAKE_BUILD_TYPE` variable.
  9. Platform Selection
  10. ^^^^^^^^^^^^^^^^^^
  11. .. versionadded:: 3.13
  12. The variable ``GHS_PRIMARY_TARGET`` can be used to select the target platform.
  13. | Sets ``primaryTarget`` entry in project file.
  14. For example:
  15. * ``cmake -G "Green Hills MULTI" -D GHS_PRIMARY_TARGET=ppc_integrity.tgt``
  16. Otherwise the ``primaryTarget`` will be composed from the values of :variable:`CMAKE_GENERATOR_PLATFORM`
  17. and ``GHS_TARGET_PLATFORM``. Defaulting to the value of ``arm_integrity.tgt``
  18. * The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
  19. via the :manual:`cmake(1)` ``-A`` option.
  20. | Typical values of ``arm``, ``ppc``, ``86``, etcetera, are used.
  21. * The variable ``GHS_TARGET_PLATFORM`` may be set, perhaps via the :manual:`cmake(1)`
  22. ``-D`` option.
  23. | Defaults to ``integrity``.
  24. | Usual values are ``integrity``, ``threadx``, ``uvelosity``, ``velosity``,
  25. ``vxworks``, ``standalone``.
  26. For example:
  27. * ``cmake -G "Green Hills MULTI"`` for ``arm_integrity.tgt``.
  28. * ``cmake -G "Green Hills MULTI" -A 86`` for ``86_integrity.tgt``.
  29. * ``cmake -G "Green Hills MULTI" -D GHS_TARGET_PLATFORM=standalone`` for ``arm_standalone.tgt``.
  30. * ``cmake -G "Green Hills MULTI" -A ppc -D GHS_TARGET_PLATFORM=standalone`` for ``ppc_standalone.tgt``.
  31. Toolset Selection
  32. ^^^^^^^^^^^^^^^^^
  33. .. versionadded:: 3.13
  34. The generator searches for the latest compiler or can be given a location to use.
  35. ``GHS_TOOLSET_ROOT`` is the directory that is checked for the latest compiler.
  36. * The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
  37. via the :manual:`cmake(1)` ``-T`` option, to specify the location of the toolset.
  38. Both absolute and relative paths are valid. Paths are relative to ``GHS_TOOLSET_ROOT``.
  39. * The variable ``GHS_TOOLSET_ROOT`` may be set, perhaps via the :manual:`cmake(1)`
  40. ``-D`` option.
  41. | Root path for toolset searches and relative paths.
  42. | Defaults to ``C:/ghs`` in Windows or ``/usr/ghs`` in Linux.
  43. For example, setting a specific compiler:
  44. * ``cmake -G "Green Hills MULTI" -T comp_201754`` for ``/usr/ghs/comp_201754``.
  45. * ``cmake -G "Green Hills MULTI" -T comp_201754 -D GHS_TOOLSET_ROOT=/opt/ghs`` for ``/opt/ghs/comp_201754``.
  46. * ``cmake -G "Green Hills MULTI" -T /usr/ghs/comp_201554``
  47. * ``cmake -G "Green Hills MULTI" -T C:/ghs/comp_201754``
  48. For example, searching for latest compiler:
  49. * ``cmake -G "Green Hills MULTI"`` for searching ``/usr/ghs``.
  50. * ``cmake -G "Green Hills MULTI -D GHS_TOOLSET_ROOT=/opt/ghs"`` for searching ``/opt/ghs``.
  51. .. note::
  52. The :variable:`CMAKE_GENERATOR_TOOLSET` should use CMake style paths.
  53. OS and BSP Selection
  54. ^^^^^^^^^^^^^^^^^^^^
  55. .. versionadded:: 3.3
  56. Certain target platforms, like Integrity, require an OS. The RTOS directory path
  57. can be explicitly set using ``GHS_OS_DIR``. Otherwise ``GHS_OS_ROOT`` will be
  58. searched for the latest Integrity RTOS.
  59. If the target platform, like Integrity, requires a BSP name then it can be set via
  60. the ``GHS_BSP_NAME`` variable.
  61. * ``GHS_OS_DIR`` and ``GHS_OS_DIR_OPTION``
  62. | Sets ``-os_dir`` entry in project file.
  63. | ``GHS_OS_DIR_OPTION`` default value is ``-os_dir``.
  64. .. versionadded:: 3.15
  65. The ``GHS_OS_DIR_OPTION`` variable.
  66. For example:
  67. * ``cmake -G "Green Hills MULTI" -D GHS_OS_DIR=/usr/ghs/int1144``
  68. * ``GHS_OS_ROOT``
  69. | Root path for RTOS searches.
  70. | Defaults to ``C:/ghs`` in Windows or ``/usr/ghs`` in Linux.
  71. For example:
  72. * ``cmake -G "Green Hills MULTI" -D GHS_OS_ROOT=/opt/ghs``
  73. * ``GHS_BSP_NAME``
  74. | Sets ``-bsp`` entry in project file.
  75. | Defaults to ``sim<arch>`` for ``integrity`` platforms.
  76. For example:
  77. * ``cmake -G "Green Hills MULTI"`` for ``simarm`` on ``arm_integrity.tgt``.
  78. * ``cmake -G "Green Hills MULTI" -A 86`` for ``sim86`` on ``86_integrity.tgt``.
  79. * ``cmake -G "Green Hills MULTI" -A ppc -D GHS_BSP_NAME=sim800`` for ``sim800``
  80. on ``ppc_integrity.tgt``.
  81. * ``cmake -G "Green Hills MULTI" -D GHS_PRIMARY_TARGET=ppc_integrity.tgt -D GHS_BSP_NAME=fsl-t1040``
  82. for ``fsl-t1040`` on ``ppc_integrity.tgt``.
  83. Target Properties
  84. ^^^^^^^^^^^^^^^^^
  85. .. versionadded:: 3.14
  86. The following properties are available:
  87. * :prop_tgt:`GHS_INTEGRITY_APP`
  88. * :prop_tgt:`GHS_NO_SOURCE_GROUP_FILE`
  89. MULTI Project Variables
  90. ^^^^^^^^^^^^^^^^^^^^^^^
  91. .. versionadded:: 3.3
  92. Adding a Customization file and macros are available through the use of the following
  93. variables:
  94. * ``GHS_CUSTOMIZATION`` - CMake path name to Customization File.
  95. * ``GHS_GPJ_MACROS`` - CMake list of Macros.
  96. .. note::
  97. This generator is deemed experimental as of CMake |release|
  98. and is still a work in progress. Future versions of CMake
  99. may make breaking changes as the generator matures.