Compilers

From MotoHawk
Jump to navigationJump to search

Supported Compilers

Module / Family Green Hills Compiler 4.2.1 Green Hills Compiler 4.2.4 Green Hills 2015.1.6 GCC 4.4.0SP1 GCC 4.6.0 CodeWarrior 4.6 CodeWarrior 5.2
GCM-0S12-024 X X
ECM-S12X-70 X X
ECM-0S12-024 X X
ECM-S12G-112 X X
ECM-5554-112 X X X X
ECM-564x-112 X X X X X
ECM-5634M-70 X X X X
ECM-5642A-70 X X X X X
HCM-0563-48 X X X X
GCM-0563-48 X X X X
ECM-0563-48 X X X X
ECU-0565-128 X X X X
ECU-0555-80 X X X X
ECU-0555-48 X X X X

GCC Compilers

GCC is a free open source GNU compiler that can be used with the MCS floating point PowerPC ECUs.

GCC Cannot be used with the S12/S12X modules. CodeWarrior is required.

MotoHawk Version Requirements: Support for the GCC compilers was added in MotoHawk 2009b SP0. MotoHawk versions lower than 2009b SP0 must use the Greenhills compiler. Motohawk 2009b through 2011a supports GCC 4.4.0 SP1 Beginning in 2011b, support for GCC 4.4.0 SP1 was replaced by GCC 4.6.0

The GCC compilers can be downloaded from the public Woodward Website here. Enter "GCC PowerPC" as the search item. This should then reveal the available GCC downloads.

eabi vs eabi SPE There are two GCC compilers.

  • GCC PowerPC eabi is for use with the MPC 5xx processors, such as the GCM/HCM/ECM-0563-48, ECM-555-080, ECM-555-48, and ECM-0565-128 modules.
  • GCC PowerPC eabi SPE is for use with the MPC 5xxx processors, such as the ECM-5554-112 module.

Green Hills Compiler

The Green Hills Compiler (GHS) is a part of the installed program requirements for using MotoHawk. GHC is used with MATLAB and MotoHawk for the purpose of helping compile the programs to be used with targeted MotoHawk ECMs. GHS is useful for compiling programs for the ECMs featuring the Freescale 5xx and 55xx processors.

Green Hills Compiler Installation

To install the GHC application from a CD:

  1. Insert CD in drive. Click Start->Run and double-click Setup.exe.
    Follow on-screen instructions. (try to leave the default install directory)

  2. If you do not already have a license launch the License Request Generator:
    In Windows, select Start->All Programs->Multi2000, PowerPC v3.6->Licensing->License Request Generator
    You may want to request an evaluation license initially. This will help get you started faster.

  3. If you have a license run the License installer:
    In Windows, select Start->All Programs->Multi2000, PowerPC v3.6->Licensing->Install Licenses
  4. Select your .key file and then install all the licenses.

Using GHS

Before using GHC with MotoHawk, there are a few items to consider:

  • If targeted, the 5xx-based processors default to using GHS 4.2.1, although they work with later versions(4.2.4).
  • The 55xx-based processors default to using GHS 4.2.1 and will work with later versions.
  • If you are using GHS version 4.2.1, you will need to specify the License Manager. To do this, you would create and set an environment variable GHS_LMWHICH and set its value to "elan."
    * If you are not going to use the default compiler version you will need to set an environment variable. Set GHS_DIR to the directory which has the compiler you want to use; the default for 4.2.1 is "C:\GHS\ppc421" (other versions follow this naming convention).
  • There is also a Tool Chain block in MotoHawk that will allow you to select which compiler to use, if necessary. Find it using Simulink Library Browser; it is located in the MotoHawk->Build library.

Note: To set an environment variable:
In Windows, select Start->(right-click)My Computer->Properties->Advanced tab->Environment Variables, then click on New, and fill in the Variable name and value, then click OK.

Common GHS Issues

  • Matlab returns an error ===Green Hills Compiler License Not Available===
  1. Check that GHS purple dongle is plugged in
  2. Check that GHS_DIR is pointing to the correct compiler directory
  3. Check that the license is installed correctly
  • At install of the license a warning box pops up saying Server Code Mismatch:
The license you specified were created for a different server code. Your server code has either changed since you requested your license, or you are trying to install them on the wrong machine. Please consult the documentation or contact the Green Hills license administrator for assistance.
  1. Verify that the USB or parallel port is working correctly.
  2. Log in as Administrator
  3. Unplug the key(s).
  4. Remove the old Sentinel Protection Server/Driver/Combo and reinstall the Sentinel Protection Installer. Go to Start > Settings > Control Panel > Add or Remove Programs (Vista is Programs and Features). Select both the Sentinel Protection Installer and Sentinel System Driver, and then click Remove.
  5. Shut Down and Restart the computer system
  6. Download and install the new Sentinel Protection Installer at http://www.safenet-inc.com/support/tech/latestdriver.asp. NOTE: If you are using Standalone applications, you can do the custom install and you can uncheck Server from the installation. The Sentinel Keys Server only needs to be installed on a SHK key server computer. The Sentinel Protection Server only needs to be installed on a SuperPro and/or UltraPro key server computer.
  7. Plug in the key(s).
  8. Download the Medic utility http://www.safenet-inc.com/support/files/SuperproMedic.exe or http://www.safenet-inc.com/support/files/sam1.2.exe and run it to make sure the key(s) is being detected correctly. Medic does not detect the 64-bit operating system version correctly. If Medic detects the key, then the computer, operating system, port, key and driver are working correctly.

CodeWarrior Installation

To install the CodeWarrior application from a CD:

  1. Insert CD in drive. Click Start->Run and double-click Setup.exe.
    Follow on-screen instructions. (try to leave the default install directory)

Using CodeWarrior

Before using CodeWarrior with MotoHawk, there are a few items to consider:

  • The S12 processors default to using CodeWarrior 4.6, which is a legacy compiler. The NXP legacy downloads page may provide an avenue to obtain CodeWarrior 4.6. An NXP Service Request could also be used to request this version.
  • S12 targets in MotoHawk 2017b onward also support CodeWarrior 5.2, which is an active product. CodeWarrior 5.2 NXP link
  • If you are not going to use the default compiler version you will need to set an environment variable. Set CW_DIR to the directory which has the compiler you want to use; the default for 4.7 is "C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7" (other versions follow this naming convention).
  • There is also a Tool Chain block in MotoHawk that will allow you to select which compiler to use, if necessary. Find it using Simulink Library Browser; it is located in the MotoHawk->Build library.

Note: To set an environment variable:
In Windows, select Start->(right-click)My Computer->Properties->Advanced tab->Environment Variables, then click on New, and fill in the Variable name and value, then click OK.

If you are using CodeWarrior on a 64-bit machine, select 'Custom' install and de-select to install Debugging.