MotoHawk-FAQ: Difference between revisions

From NewEagleWiki
Jump to navigation Jump to search
 
(100 intermediate revisions by 7 users not shown)
Line 16: Line 16:
:*Stateflow Coder (only for MATLAB 2010b and earlier)
:*Stateflow Coder (only for MATLAB 2010b and earlier)


===Side by Side Installer===
===Side-by-Side Installer===
Older versions of MotoHawk only allowed one version of MotoHawk to be installed at any one time. The MotoHawk Side-by-Side installer, new with MotoHawk2010a, allows for many versions of MotoHawk to be installed at one time along with one legacy MotoHawk (MotoHawk2009bSP0 or earlier). An example of this is having one project in the final stages of development or already in production using MotoHawk such as 2009a, and starting a new project and wanting to use the newest software. The Side-by-Side installer allows you to have the two working environments installed at the same time and switch between them easily. To allow this easy change, the Side-by-Side installer includes a MotoHawk Version Selector which allows you to select which version of MotoHawk will run with a specific version of MATLAB. <br /> <br />
Older versions of MotoHawk only allowed one version of MotoHawk to be installed at any given time. The MotoHawk Side-by-Side Installer, new with MotoHawk2010a, allows for many versions of MotoHawk to be installed at one time along with one legacy MotoHawk (MotoHawk2009bSP0 or earlier). Take, as an example, having one project in the final stages of development or already in production using MotoHawk 2009a and starting a new project and wanting to use the newest software. The Side-by-Side Installer allows you to have the two working environments installed at the same time and switch between them easily. To allow this easy change, the Side-by-Side Installer includes a MotoHawk Version Selector which allows you to select which version of MotoHawk will run with a specific version of MATLAB.


===Changes to Installation and Use Procedures===
===Changes to Installation and Use Procedures===
Line 25: Line 25:
:Old  
:Old  
::#Use Add/Remove programs to uninstall any previous versions of MotoHawk.
::#Use Add/Remove programs to uninstall any previous versions of MotoHawk.
::#Run Installer and select the versions of MATLAB with which to integrate MotoHawk.  
::#Run installer and select the versions of MATLAB with which to integrate MotoHawk.  
:New  
:New  
::#Run installer to install MotoHawk. At the end there is a prompt to launch the MotoHawk Version Selector.
::#Run installer to install MotoHawk. At the end, there is a prompt to launch the MotoHawk Version Selector.


====Use====
====Use====
:Old  
:Old  
::#Launch MATLAB and it will start MotoHawk if it was integrated at Installation.  
::#Launch MATLAB and it will start MotoHawk if it was integrated at installation.  
:New  
:New  
::#Use MotoHawk Version Selector to integrate a version of MATLAB with a version of MotoHawk.
::#Use MotoHawk Version Selector to integrate a version of MATLAB with a version of MotoHawk.
Line 38: Line 38:
===Using MotoHawk Version Selector===
===Using MotoHawk Version Selector===
[[Image:Side_by_Side2.JPG|right]]
[[Image:Side_by_Side2.JPG|right]]
The Side-by-Side installer also installs the MotoHawk Version Selector tool. To get to this program, go to start->All Programs->Woodward->MCS->MotoHawk->MotoHawk Version Selector. After you have selected MATLAB and MotoHawk versions, launching the selected versions of MATLAB will launch MotoHawk.  
The Side-by-Side Installer also installs the MotoHawk Version Selector tool. To get to this program, go to Start -> All Programs -> Woodward -> MCS -> MotoHawk -> MotoHawk Version Selector. After you have selected the MATLAB and MotoHawk versions, launching the selected versions of MATLAB will launch MotoHawk.  


====Select MATLAB version====
====Select MATLAB Version====
The top has a drop down list titled MATLAB Version. This drop down will list all versions of MATLAB on the machine. Select the version of MATLAB for which you want to change the MotoHawk Version or select the check-box below that is labeled "Use same MotoHawk Toolbox for all MATLAB versions." Note that all MotoHawk versions will not support all MATLABs, so the Side-by-Side installs may be grayed out if the check-box is used.
The top has a dropdown list titled "MATLAB Version." This dropdown will list all versions of MATLAB on the machine. Select the version of MATLAB for which you want to change the MotoHawk version or select the checkbox below labeled "Use same MotoHawk Toolbox for all MATLAB versions." Note that not all MotoHawk versions will support all MATLAB versions, so the Side-by-Side installs may be grayed out if the checkbox is used.


====Disabled====
====Disabled====
This radio button selection will allow MATLAB to launch without initializing any version of MotoHawk. It is also the default choice on MATLAB versions the most recent installer supports.
This radio button selection will allow MATLAB to launch without initializing any version of MotoHawk. It is also the default choice on MATLAB versions the most recent installer supports.
====Side-by-Side Installation====
====Side-by-Side Installation====
All of the Side-by-Side installations will be listed in radio buttons in the Select MotoHawk Toolbox Version panel. Select the radio button next to the version you want to use and it will integrate into the selected version of MATLAB.
All of the Side-by-Side installations will be listed in radio buttons in the Select MotoHawk Toolbox Version panel. Select the radio button next to the version you want to use, and it will integrate into the selected version of MATLAB.


====Using MOTOHAWK_DIR Environment Variable====
====Using Environment Variable MOTOHAWK_DIR====
This feature uses the Environment Variable MOTOHAWK_DIR to point to the installation location of the version of MotoHawk you want to run. To change the environment variable do the following based on OS version:
This feature uses the Environment Variable MOTOHAWK_DIR to point to the installation location of the version of MotoHawk you want to run. To change the environment variable, do the following:


:Windows XP  
:Windows XP  
#Right click on my computer and select properties
#Right click on "My Computer" and select properties
#Select the advanced tab
#Select the advanced tab
#Click the Environment Variables button at the bottom of the page
#Find MOTOHAWK_DIR and select the edit button or click the new button if MOTOHAWK_DIR does not already exist
#Change the Variable value to the directory MotoHawk is installed in (e.g., C:\Program Files\Woodward\MotoHawk)
<br>
:Windows Vista/Windows 7
#Right click on "My Computer" and select properties
#Select the Advanced System settings on the left side of the window
#Click the Environment Variables button at bottom of page
#Click the Environment Variables button at bottom of page
#Find MOTOHAWK_DIR and select edit button, or click the new button if MOTOHAWK_DIR does not already exist.
#Find MOTOHAWK_DIR and select the edit button or click the new button if MOTOHAWK_DIR does not already exist
#Change the Variable value to the directory MotoHawk is installed. (eg: "C:\Program Files\Woodward\MotoHawk" without the quotes)
#Change the Variable value to the directory MotoHawk is installed in (e.g., C:\Program Files\Woodward\MotoHawk)
<br />
:Windows Vista / Windows 7
#Right click on my computer and select properties
#Select the Advanced System settings text on the left side of the window
#Click the Environment Variables button at bottom of page
#Find MOTOHAWK_DIR and select edit button, or click the new button if MOTOHAWK_DIR does not already exist.
#Change the Variable value to the directory MotoHawk is installed. (e.g.: "C:\Program Files\Woodward\MotoHawk" without the quotes)


====Custom / Legacy MotoHawk Version====
====Custom/Legacy MotoHawk Version====
This radio button allows you to specify a path to the MotoHawk install directory.
This radio button allows you to specify a path to the MotoHawk install directory.


==Starting a New Project ==
==Starting a New Project ==
Use the command in the Matlab window "motohawk_project('insert_name_here')" to create a new project called "insert_name_here".
Use the command in the MATLAB window '''>>motohawk_project('insert_name_here')''' to create a new project called "insert_name_here".


== MotoHawk Blockset ==
== MotoHawk Blockset ==


The MotoHawk Blocks support many different behaviors including I/O, fault management, calibration, online viewing via calibration tools, and many more. <br />
The MotoHawk Blocks support many different behaviors including I/O, fault management, calibration, online viewing via calibration tools and many more. <br />
   
   
[[Image: MHBlock.JPG]] <br />
[[Image: MHBlock.JPG]] <br />
Line 117: Line 117:
||[[Build Blocks | MotoHawk Build Blocks]]
||[[Build Blocks | MotoHawk Build Blocks]]
|   
|   
|[[MotoHawk J1850 Blocks]]
|
|
|
|[[Serial I/O Blocks| MotoHawk Serial I/O Blocks]]
|[[Serial I/O Blocks| MotoHawk Serial I/O Blocks]]
Line 204: Line 204:
==Build Counter==
==Build Counter==


===How do I check the build version of a model ?===
===How do I check the build version of a model?===
 
At the MATLAB command prompt, type in motohawk_build_version('modelname') and it will return a 3 digit number which indicates the build version of that model.


At the MATLAB command prompt, type in motohawk_build_version('modelname') and it will return a three-digit number which indicates the build version of that model.


===How do I reset the motohawk_build_version counter?===
===How do I reset the motohawk_build_version counter?===


'''For instance, if I copy a model for a new project I’d like to reset the build counter?'''
'''For instance, if I copy a model for a new project, I’d like to reset the build counter?'''


:There is a MotoHawk command to update this value. To do this have the model open and go to the MATLAB command prompt and type in:
:There is a MotoHawk command to update this value. To do this, have the model open and go to the MATLAB command prompt and type in:
:number = ‘000’; %the value between the ticks can be any number you want motohawk_build_version(bdroot, number);
:#'''>>number = ‘000’''' The value between the ticks can be any number you want <br>
:#'''>>motohawk_build_version(bdroot, number)''' This will set the three-character build version to 000. You can also place the value directly into the expression; just remember to use the ticks(‘).
:You can also type '''>>help motohawk_build_version''' from the command line and get help for more advanced features.


:This will set the 3 character build version to 000. You can also place the value directly into the expression just remember to use the ticks().
==Using S Functions With MotoHawk==
:You can also type “help motohawk_build_version;” from the command line and get help for more advanced features.
S functions are a useful tool to make custom blocks. They can also be used to protect your code from an end user. S functions can be written using .m files, C code or Fortran, with C code being the most common way. S functions require practice and knowledge of C, masking blocks (including how masks can handle some of the I/O), TLC and embedded C. That information can be acquired by reading the Simulink help. To help you make S functions work with MotoHawk, here is an example model and document to explain how to use it: [https://wiki.neweagle.net/ProductDocumentation/MotoTron/MotoHawk/Track_2B_Basic_S-Functions_and_TLC.zip Help With S Functions]


==Using S Functions With MotoHawk==
Only inlined S functions as described in the presentation provided can be used with MotoHawk. If you wanted to use a non-inlined S function to protect IP, it is recommended that you use a component model, as component models have the ability to protect IP. Note: While it is possible to embed S functions into a MotoHawk model as the presentation shows, this is not, in general, supported or recommended by Woodward. The intent of MotoHawk is to allow the user to design in a model-based design environment. By using MotoHawk as a framework for embedding c-code, you are losing the power of the tool and of model-based design.  We would recommend that S functions are considered only to implement small chunks of code that aren’t easily described in Simulink or Stateflow.
S Functions are a useful tool to make custom blocks. They can also be used to protect your code from an end user. S Functions can be written using .m files, C code, or Fortran. However, C code is the most common way of writing S functions. S functions require practice and reading the Simulink help about them, because knowledge of C, masking blocks (including how masks can handle some of the I/O), TLC, and embedded C. To help you make S functions work with MotoHawk here is an example model and document to explain how to use it.  Also only inlined s-functions as described in the presentation provided can be used with MotoHawk. If you wanted to use a non-inlined S function to protect IP it is recommended that use a component model, as component models have the ability to protect IP.   As a note, while it is possible to embed s-functions into a MotoHawk model as the presentation shows, this is not in general supported or recommended by Woodward.   The intent of MotoHawk is to allow the user to design in a model based design environment. By using MotoHawk as a framework for embedding c-code, you are losing the power of the tool and of model based design.  We would recommend that s-functions are considered only to implement small chunks of code that aren’t easily described in Simulink or Stateflow. [http://www.neweagle.net/support/wiki/docs2/Track_2B_Basic_S-Functions_and_TLC.zip Help With S Functions]


==Common Errors==
==Common Errors==
Line 227: Line 227:


Dongle issues include but are not limited to:
Dongle issues include but are not limited to:
*  MotoTron License Viewer crashing or blank
*  MotoTron License Viewer is blank or crashing
*  MotoHawk/MotoTune licensing not registering
*  MotoHawk/MotoTune licensing is not registering
*  Light on the token now lighting up  
*  Light on the token now is lighting up  


'''Click below for the dongle troubleshooting guide:''' <br>
'''Click below for the dongle troubleshooting guide:''' <br>
Line 238: Line 238:
|-
|-
|style = "height:180px; width:450x;"|
|style = "height:180px; width:450x;"|
[[file:MH_DONGLE_PDF.png|400px|link=https://www.neweagle.net/ProductDocumentation/Support/MH_Dongle_Support.pdf]]         
[[file:MH_DONGLE_PDF.png|400px|link=https://www.neweagle.net/support/wiki/ProductDocumentation/Support/MH_Dongle_Support.pdf]]         
|}
|}


Line 246: Line 246:


* '''MotoHawk''' and '''MotoTron Licensing Viewer''' crash
* '''MotoHawk''' and '''MotoTron Licensing Viewer''' crash
** Please install the newest release of MotoHawk, '''[[MotoHawk#Download|click here for downloads]]'''.
** Please install the '''[[MotoHawk#Download|newest release]]''' of MotoHawk.
** This will install any newly released fixes for MotoHawk.
** This will install any newly released fixes for MotoHawk.
** After installing the newest release, use your normal MotoHawk version as normal.
** After installing the newest release, use your regular MotoHawk version as normal.


* All '''Moto''' Software is crashing, i.e. '''MotoHawk''', '''MotoTune''' etc.
* All '''Moto''' software is crashing, i.e., '''MotoHawk''', '''MotoTune''' etc.
** A full re-installation of the '''Moto-'''suite may be required.
** A full re-installation of the '''Moto''' suite may be required.
** Please follow '''[[MotoTune-FAQ#Installation_Procedure|these steps]]''' for proper installation.
** Please follow '''[[MotoTune-FAQ#Installation_Procedure|these steps]]''' for proper installation.


Line 261: Line 261:


===Build Errors===
===Build Errors===
If you get the error upon building of, Error using ==> motocoder_codegen at 78 and Error using ==> motohawk_make_rtw at 355 MotoCoder Build Failed, you probably have a path error. This error also throws up a warning in the build file that it is looking for a file and cannot find it. To fix this make sure the path is correct. The Matlab path is seen in the current folder window, located in the Matlab command window. You want to make sure you are located in the folder that your model is in. You also want to make sure you get to this folder by clicking on and entering the folder, not just using the expand arrows till you can see it. Also using the path is made easier by using the motohawk_project command which makes a new model with folders for libraries, CAN messaging, and m-files. Their is a setup and close .m file which then handles the path management during builds. This manages the path without the need for manually adding files to the path. Also make sure you never manually add the build folder to the path, this can cause build errors. Also make sure the path to the model does not contain spaces. For example if 'Dev area' is the folder your models will be in modify it to 'Dev_area' or 'DevArea' so there are no spaces. An example of a valid path to a model would be 'C:\DEV_AREA\test_lib'.  These errors will not normally be caught by compiling with Ctrl-D, but will appear upon building the model.
If you get the error message: '''Error using ==> motocoder_codegen at 78''' and/or '''Error using ==> motohawk_make_rtw at 355 MotoCoder Build Failed''', you probably have a path error. This error also throws up a warning in the build file that it is looking for a file and cannot find it. To fix this, make sure the path is correct. The MATLAB path is seen in the current folder window, located in the MATLAB command window. You want to make sure you are located in the folder that your model is in. You also want to make sure you get to this folder by clicking on and entering the folder, not just using the expand arrows until you can see it. Using the path is made easier by using the '''>>motohawk_project''' command which makes a new model with folders for libraries, CAN messaging, and .m files. There is a setup and close .m file which then handles the path management during builds. This manages the path without the need for manually adding files to the path. Also make sure you never manually add the build folder to the path; this can cause build errors. The path to the model cannot contain spaces. An example of a valid path to a model would be '''C:\DEV_AREA\test_lib'''.  These errors will not normally be caught by compiling with Ctrl-D but will appear upon building the model.


====Warning: OSS_VR_Input has an unsupported VR Interface selected in the design====
====Warning: OSS_VR_Input has an unsupported VR Interface selected in the design====
In previous versions of MotoHawk a build warning might appear when a '''[[Advanced Digital I/O Blocks#MotoHawk:Blocks:Frequency In|frequency in]]''' block with CNK pin and a VR interface is selected. This message is incorrect and should be ignored. This warning was removed in MotoHawk 2012a Beta 4.
In previous versions of MotoHawk, a build warning might appear when a '''[[Advanced Digital I/O Blocks#MotoHawk:Blocks:Frequency In|frequency in]]''' block with a CNK pin and a VR interface is selected. This message is incorrect and should be ignored. This warning was removed in MotoHawk 2012a Beta 4.


====Warning:  Calibratable I/O for PWMOutput NOT supported in MotoCoder yet====
====Warning:  Calibratable I/O for PWMOutput NOT supported in MotoCoder yet====
When building a model for an ECM-OH, ECM-5554-112-0902/0904, or any of the S12 modules a build warning may occur due to the "allow I/O pin to be calibrated option from MotoTune" option being selected. In this instance the build may complete but cause errors. deselecting the allow I/O pin calibration may solve the error. The warning stems from the fact that none of the mentioned controllers support the Calibratible IO function. The option to "allow I/O pin to be calibrated" has been removed from the block mask when these modules are selected in MotoHawk 2012b Beta 2 and higher.
When building a model for an ECM-OH, ECM-5554-112-0902/0904, or any of the S12 modules, a build warning may occur due to the "allow I/O pin to be calibrated" option from MotoTune being selected. In this instance, the build may complete but cause errors. Deselecting the option may solve the error. The warning stems from the fact that none of the mentioned controllers support the Calibratable IO function. The option to "allow I/O pin to be calibrated" has been removed from the block mask when these modules are selected in MotoHawk 2012b Beta 2 and higher.


===Programming Error: Code:(4,4,6,-1) ECU refused connection due to incorrect token security===
===Programming Error: Code:(4,4,6,-1) ECU refused connection due to incorrect token security===
[[Image:MotoTuneErrorCodeIncorrectTokenSecurity.png]]
[[Image:MotoTuneErrorCodeIncorrectTokenSecurity.png]]


This error may occur when you try to program a srz file that was built with a newer version of MotoHawk. Upgrading to a newer version of MotoTune and MotoServer may solve the problem.
This error may occur when you try to program an *.srz file that was built with a newer version of MotoHawk. Upgrading to a newer version of MotoTune and MotoServer may solve the problem.


==Target Definition Block==
==Target Definition Block==
Line 280: Line 280:
=== ECM5554-112 Target Definition===
=== ECM5554-112 Target Definition===
MotoHawk Target Definition Block target names to use:  
MotoHawk Target Definition Block target names to use:  
 
 
:Use these targets for ECM-5554-112-0902-F00 ("PROD") and ECM-5554-112-0902-CP0 ("DEV") modules:
::* ECM-5554-112-0902-kD:  PCM0902 module with knock development interface, DV release hardware  
::* ECM-5554-112-0902-kD:  PCM0902 module with knock development interface, DV release hardware  
::* ECM-5554-112-0902-kP:  PCM0902 module with knock development interface, PV release hardware  
::* ECM-5554-112-0902-kP:  PCM0902 module with knock development interface, PV release hardware  
::* ECM-5554-112-0902-xD:  PCM0902 module, DV release hardware  
::* ECM-5554-112-0902-xD:  PCM0902 module, DV release hardware  
::* ECM-5554-112-0902-xP:  PCM0902 module, PV release hardware
::* ECM-5554-112-0902-xP:  PCM0902 module, PV release hardware
Use this target for ECM-5554-112-0902-F00 ("PROD") and ECM-5554-112-0902-CP0 ("DEV") modules.
:Use this target for ECM-5554-112-0904-F00 ("PROD") and ECM-5554-112-0904-CP0 ("DEV") modules:
::* ECM-5554-112-0904-xD:  PCM0904 module, DV and PV release hardware
::* ECM-5554-112-0904-xD:  PCM0904 module, DV and PV release hardware
Use this target for ECM-5554-112-0904-F00 ("PROD") and ECM-5554-112-0904-CP0 ("DEV") modules.
 
Note: If you cannot find the module in the target list, make sure you have your licensing dongle plugged in.  This will unlock all of the modules to build to.


==Software==
==Software==


===[[http://www.mathworks.com/?requestedDomain=www.mathworks.com| MathWorks]]===
===[http://www.mathworks.com/?requestedDomain=www.mathworks.com| MathWorks]===
'''Recommended installations:'''
'''Recommended installations:'''


Line 308: Line 310:
::*With MotoHawk 2011aBeta1 and later, MotoServer/MotoTune 8.13.7.141 or later is required
::*With MotoHawk 2011aBeta1 and later, MotoServer/MotoTune 8.13.7.141 or later is required
::*With MotoHawk 2010aBeta6 and later, MotoServer/MotoTune 8.13.7.120 or later is required
::*With MotoHawk 2010aBeta6 and later, MotoServer/MotoTune 8.13.7.120 or later is required
::*With MotoHawk 2009bBeta1 and later, MotoServer/MotoTune 8.13.7.87 or later is required
::*With MotoHawk 2009bBeta1 and later, MotoServer/MotoTune 8.13.7.087 or later is required
 
===GCC (compiler)===


===GCC Compiler===
::'''[[MotoHawk-Compilers#GCC_Compiler|GCC Compiler]]'''
::*No license required
::*No license required
::*MotoHawk 2009bBeta2 or later is required
::*MotoHawk 2009bBeta2 or later is required
::*GCC 4.4 is used with MotoHawk 2009b to 2011a and is not supported on 64bit MATLAB installations 
::*GCC 4.6 is used with MotoHawk 2011b and on
::*GCC 4.6 is used with MotoHawk 20011b and on
::*GCC 4.4 is used with MotoHawk 2009b to 2011a and is not supported on 64-bit MATLAB installations 
::*GCC compilers work with 64 bit MATLAB for PowerPC targets. This includes the 40, 80, 112, and 128 pin modules.
::*GCC compilers work with 64-bit MATLAB for PowerPC targets. This includes the 40-, 80-, 112- and 128-pin modules.
:*'''downloads:[[Required_Files#Compilers|GCC Compiler]]'''


===CANKing===
===CANKing===
Line 324: Line 325:


===Latest Version of MotoHawk===
===Latest Version of MotoHawk===
The latest MotoHawk version is always available from [[Required Files]]. You must have an account on the New Eagle Wiki in order to download it.
The latest MotoHawk version is always available from '''[[Required Files]]'''. You must have an account on the New Eagle Wiki in order to download it.


=== Does Motohawk run on 64bit software? ===
=== Does Motohawk run on 64-bit software? ===
:*If the Operating System is 64-bit, then MotoHawk 2010a SP0 or later is required.
:*If the operating system is 64-bit, then MotoHawk 2010a SP0 or later is required.
:*If the MATLAB installation is 64-bit, then MotoHawk 2010b SP0 or later is required.
:*If the MATLAB installation is 64-bit, then MotoHawk 2010b SP0 or later is required.


Some customers are using MotoHawk and MotoTune on Windows Vista 64-bit with MATLAB 32-bit.  They report:
Some customers are using MotoHawk and MotoTune on Windows Vista 64-bit with MATLAB 32-bit.  They report:
 
--------------------------------------
' After installing MotoServerRuntime, MotoTune, and MotoHawk (using right-click install-as-administrator), copy the entire directory tree "C:\Program Files (x86)\MotoTron\..." to "C:\Program Files\MotoTron\..." (substitute "Woodward" for "MotoTron" for MotoHawk 2009b and later releases).  When it is time to uninstall, remember to delete the "C:\Program Files\MotoTron\..." copy before uninstalling with Add/Remove Programs. '
After installing MotoServerRuntime, MotoTune, and MotoHawk (using right-click install-as-administrator), copy the entire directory tree "C:\Program Files (x86)\MotoTron\..." to "C:\Program Files\MotoTron\..." (substitute "Woodward" for "MotoTron" for MotoHawk 2009b and later releases).  When it is time to uninstall, remember to delete the "C:\Program Files\MotoTron\..." copy before uninstalling with Add/Remove Programs.
-----------------------------------------------------


=== What are some known problems with running Motohawk on Windows Vista? ===
=== What are some known problems with running Motohawk on Windows Vista? ===
Line 341: Line 343:
====Error 1925 (insufficient privileges)====
====Error 1925 (insufficient privileges)====


This error occurs when the install process is not run as Administrator. In Windows Explorer, right click on MotoHawk_(Version) and select 'Run as Administrator' rather than 'Open' or simply double clicking.
This error occurs when the install process is not run as Administrator. In your web browser, right click on MotoHawk_[Version] and select 'Run as Administrator' rather than 'Open' or double-clicking.


===MotoHawk Compatibility Matrix===
===MotoHawk Compatibility Matrix===


{{MotoHawk Compatibility Matrix}}
{{MotoHawk Compatibility Matrix}}
*As of MotoHawk 2015a, the XCP slave blockset is located in MotoHawk and requires no additional license


=== Known Problems with Mathworks Software===
=== Known Problems with Mathworks Software===


There is a known MATLAB R2013b issue regarding how MATLAB handles info.xml files at startup.  As a workaround to this issue, please unzip the [http://www.neweagle.net/support/wiki/downloads/r2013b_patch.zip patch] in the MATLAB root directory. If you are unsure which directory this is, the directory is given as the output of the MATLABROOT command. Alternatively, you can delete any info.xml files in any directories on your path.
There is a known MATLAB R2013b issue regarding how MATLAB handles info.xml files at startup.  As a workaround to this issue, please unzip this '''[http://www.neweagle.net/support/wiki/downloads/r2013b_patch.zip patch]''' in the MATLAB root directory; the root directory is the directory given as the output of the '''MATLABROOT''' command. Alternatively, you can delete any info.xml files in any directories on your path.


=== MotoHawk and Windows 8 Compatibility===
=== MotoHawk and Windows 8 Compatibility===
Line 361: Line 365:
MotoHawk is compatible with Windows 10 starting with MotoHawk 2015b.  
MotoHawk is compatible with Windows 10 starting with MotoHawk 2015b.  


Known Issue
'''Known Issue'''


The MotoHawk installer will have an issue supporting multiple versions of MotoHawk on machines which do not previously have .NET 2.0 installed.  If multiple versions of MotoHawk are intended, it is recommended to ensure .NET 3.0 SP1 (includes .NET 2.0) is installed before installing the first MotoHawk version.
The MotoHawk installer will have an issue supporting multiple versions of MotoHawk on machines which do not previously have .NET 2.0 installed.  If multiple versions of MotoHawk are intended, it is recommended to ensure .NET 3.0 SP1 (includes .NET 2.0) is installed before installing the first MotoHawk version.
<!--


=== MotoHawk Dongle and USB 3.0 Compatibility ===
=== MotoHawk Dongle and USB 3.0 Compatibility ===
Line 370: Line 375:
   
   
However, independent from updates from Intel we are currently testing a new driver version for the CRYPTO-BOX with a workaround for this USB 3.0 problem.  
However, independent from updates from Intel we are currently testing a new driver version for the CRYPTO-BOX with a workaround for this USB 3.0 problem.  
If you want to test this driver, please download it here:
If you want to test this driver, please download it '''[www.marx.com/ftp/temp/USB3/CBU_Test_Drv_21Jan2013.zip here]'''.
www.marx.com/ftp/temp/USB3/CBU_Test_Drv_21Jan2013.zip
   
   
IMPORTANT:
'''IMPORTANT:'''<br>
The driver should work fine, but is currently not yet digitally signed! To install it under Windows 7 64Bit versions you have to restart the computer and hit the F8
The driver should work fine but is not yet digitally signed! To install it under Windows 7 64-bit versions, you have to restart the computer and hit the F8 key multiple times before Windows starts. Then choose "Disable Driver Signature Enforcement".  This has to be done each time Windows starts when using this driver. We will offer a WHQL certified version of the driver as soon as we have finished testing and passed certification procedure. Make sure that you have plugged in the CRYPTO-BOX. Unzip the driver package. Open the Device Manager, right-click on the "CBUSB ver 2.0" device and choose '''Update Driver Software''' -> '''Browse my computer for driver software''' -> '''Let me pick from a list of device drivers on my computer''' -> '''Have Disk'''. Now select the corresponding 32- or 64-bit .INF file from the driver package and click "OK". If Windows says that the driver is not signed, choose that you want to install the driver anyway.
key multiple times before Windows starts. Then choose "Disable Driver Signature Enforcement".  This has to be done each time Windows starts when using this driver. We will offer a WHQL certified version of the driver as soon as we have finished testing and passed certification procedure.
Make sure that you have plugged in the CRYPTO-BOX. Unzip the driver package. Open the Device Manager, right-click on the "CBUSB ver 2.0" device and choose "Update Driver Software" -> "Browse my computer for driver software" -> "Let me pick from a list of device drivers on my computer" -> "Have Disk". Now select the corresponding 32 or 64bit .INF file from the driver package and click "OK". If Windows says that the driver is not signed, choose that you want to install the driver anyway
 


==== Another USB 3.0 workaround ====
==== Another USB 3.0 Workaround ====
Turn off the xHCI mode in your computers BIOS settings. By this, the super-speed of the USB 3.0 interface will throttle down to high-speed (USB 2.0), in our tests it ran perfectly. Most motherboards allow to disable the xHCI mode in the BIOS selectively to individual USB 3.0 ports, so you can still use the other ports at full speed.
Turn off the xHCI mode in your computer's BIOS settings. Because of this, the super-speed of the USB 3.0 interface will throttle down to high-speed (USB 2.0). It ran perfectly in tests. Most motherboards allow you to disable the xHCI mode in the BIOS selectively to individual USB 3.0 ports, so you can still use the other ports at full speed.
-->


=== Can I speed up the build on the ECM5554-112?  ===
=== Can I speed up the build on the ECM5554-112?  ===
Line 389: Line 391:


{| border=1
{| border=1
!Module / Family  
!Module/Family  
!Green Hills Compiler 3.6
!Green Hills Compiler 3.6
!Green Hills Compiler 4.2.1
!Green Hills Compiler 4.2.1
Line 502: Line 504:


==== December 2010 compiler update from Woodward ====
==== December 2010 compiler update from Woodward ====
The GNU compiler is not supported for the S12 target modules.  The cost of the CodeWarrior compiler only (basic) is fairly inexpensive compared to our effort to support the GNU toolchain for S12.  Additionally, when we last looked into this the XGATE support was not available.
The GNU compiler is not supported for the S12 target modules.  The cost of the CodeWarrior compiler only (basic) is fairly inexpensive compared to our effort to support the GNU toolchain for S12.  Additionally, when we last looked into this, the XGATE support was not available.


=== MPC5XX / MPC55XX Compiler Options ===
=== MPC5XX/MPC55XX Compiler Options ===


==== Greenhills ====
==== Greenhills ====
The Greenhills PowerPC compiler is recommended for production programs. It can be purchased from New Eagle ('''[http://store.neweagle.net/products-by-tools/motohawk-tools/motohawk-kits-1/green-hills-c-compiler-node-lock-4-2-1.html Buy Now]''') in the form of a node-locked, dongle, or networked license.  GHS 3.6 and 4.2.1 on both the 5xx and 55xx MotoHawk controllers.
The Greenhills PowerPC compiler is recommended for production programs. GHS 3.6 and 4.2.1 is on both the 5xx and 55xx MotoHawk controllers. Information on this compiler can be found at '''[http://www.ghs.com/products/compiler.html Greenhills compiler]'''.   
 
Information on this compiler can be found at '''[http://www.ghs.com/products/compiler.html Greenhills compiler]'''.   


'''Greenhills Demo License'''
'''Greenhills Demo License'''


Greenhills compilers can be demonstrated for 30 days by downloading the software.  After installing,  go to Start/Multi…./Licensing/License request Generator.  It automatically takes you to the Green-Hills web site and requests the license.  Typical turn-around is 24 hrs.
Greenhills compilers can be demonstrated for 30 days by downloading the software.  After installing,  go to Start/Multi…./Licensing/License Request Generator.  It automatically takes you to the Greenhills website and requests the license.  Typical turnaround is 24 hrs.


'''International GHS License'''
'''International GHS License'''


All licenses sold outside the USA, including Canada, must be International Dongle type.
All licenses sold outside the USA, including Canada, must be International Dongle type. The Green Hills Compiler (GHS) is a compiler supported in MotoHawk for 5xx and 55xx processor targets. This is the recommended compiler.
The Green Hills Compiler (GHS) is a compiler supported in MotoHawk for 5xx and 55xx processor targets. This is the recomended compiler.


===== Green Hills Compiler Installation =====
===== Green Hills Compiler Installation =====
To install the GHS application from a CD:  
To install the GHS application from a CD:  


#Insert CD in drive. Click Start->Run and double-click Setup.exe. <BR>Follow on-screen instructions. (try to leave the default install directory) <BR><BR>
#Insert CD in drive. Click Start -> Run and double click on Setup.exe. <BR>Follow on-screen instructions. (Try to leave the default install directory.) <BR><BR>
#If you do not already have a license launch the License Request Generator:<BR>In Windows, select '''Start->All Programs->Multi2000, PowerPC v3.6->Licensing->License Request Generator'''<BR>You may want to request an evaluation license initially. This will help get you started faster.<BR><BR>
#If you do not already have a license, launch the License Request Generator:<BR>In Windows, select Start -> All Programs -> Multi2000, PowerPC v3.6 -> Licensing -> License Request Generator<BR>You may want to request an evaluation license initially. This will help get you started faster.<BR><BR>
#If you have a license run the License installer:<BR>In Windows, select '''Start->All Programs->Multi2000, PowerPC v3.6->Licensing->Install Licenses'''<BR>
#If you have a license, run the license installer:<BR>In Windows, select Start -> All Programs -> Multi2000, PowerPC v3.6 -> Licensing -> Install Licenses<BR><br>
#Select your .key file and then install all the licenses. <BR>
#Select your *.key file and then install all the licenses. <BR>


===== Using GHS =====
===== Using GHS =====


Before using GHS with MotoHawk, there are a few items to consider:  
Before using GHS with MotoHawk, there are a few items to consider:  
* If targeted, the 5xx-based processors default to using GHS 3.6, although they work with later versions(4.2.1).  
* If targeted, the 5xx-based processors default to using GHS 3.6, although they work with later versions (4.2.1).  
* The 55xx-based processors default to using GHS 4.2.1 and will work with later versions, but will not work with GHS 3.6.  
* The 55xx-based processors default to using GHS 4.2.1 and will work with later versions but will not work with GHS 3.6.  
* '''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."<BR> 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).
* '''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."<BR> 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.<BR><BR>
* There is also a Toolchain 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.<BR><BR>
'''Note:''' To set an environment variable:<BR>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.
'''Note:''' To set an environment variable:<BR>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 =====
===== Common GHS Issues =====
*Matlab returns an error ===Green Hills Compiler License Not Available===<BR>
*Matlab returns an error '''===Green Hills Compiler License Not Available===<BR>
#Check that GHS purple dongle is plugged in
#Check that the GHS purple dongle is plugged in
#Check that GHS_DIR is pointing to the correct compiler directory
#Check that GHS_DIR is pointing to the correct compiler directory
#Check that the license is installed correctly
#Check that the license is installed correctly
*GHS 4.2.1 may not link correctly with MotoHawk if MH is installed in a path with spaces in the name (Fix - Install MH in a path of desired drive without spaces)
*GHS 4.2.1 may not link correctly with MotoHawk if MH is installed in a path with spaces in the name
#Install MH in a path of desired drive without spaces


==== GCC (Free)====
==== GCC (Free)====
There is a GCC version of the license downloadable for the MPC5XX and MPC55XX modules.  Download the file from [[Required_Files]].  
There is a GCC version of the license downloadable for the MPC5XX and MPC55XX modules.  Download the file from '''[[Required_Files|Required Files]]'''.  


=====Using GCC with MotoHawk=====
=====Using GCC with MotoHawk=====
Be careful to select the correct version of GCC for your target and version of MotoHawk. Your program will not run correctly if the wrong compiler toolchain is selected.
Be careful to select the correct version of GCC for your target and version of MotoHawk. Your program will not run correctly if the wrong compiler toolchain is selected.
::*GCC PowerPC EABI SPE is for MPC55xx modules like the ECM-555x-112 module
::*GCC PowerPC EABI SPE is for MPC55xx modules like the ECM-555x-112 module
::*GCC PowerPC EABI (no SPE) is for MPC5xx modules such as the ECM565-128, ECM-555-80 and 48 pin modules for MotoHawk
::*GCC PowerPC EABI (no SPE) is for MPC5xx modules such as the ECM565-128, ECM-555-80 and 48-pin modules for MotoHawk


'''MPC5xx'''
'''MPC5xx'''


The MPC5XXX micro uses either the GCC eabi SPE 4.6, or GHS 4.2.1 and 4.2.4.
The MPC5XX micro uses either the GCC eabi SPE 4.6, or GHS 4.2.1 and 4.2.4.
 
GCC PowerPC EAB Version 4.6 works for MotoHawk 2011b and on


GCC PowerPC EABI Version 4.4.0 SP1 works for MotoHawk 2009b, 2010a - 2011a
GCC PowerPC EABI Version 4.4.0 SP1 works for MotoHawk 2009b, 2010a - 2011a
GCC PowerPC EAB Version 4.6 works for MotoHawk 2011b and on


'''MPC55xx'''
'''MPC55xx'''
   
   
GCC PowerPC EABI Version 4.3.3 works for 2009a
GCC PowerPC EABI Version 4.3.3 works for 2009a
GCC PowerPC EABI SPE Version 4.6 works for 2011b and on


GCC PowerPC EABI SPE Version 4.4.0 SP1 works for 2009b, 2010a - 2011a
GCC PowerPC EABI SPE Version 4.4.0 SP1 works for 2009b, 2010a - 2011a
GCC PowerPC EABI SPE Version 4.6 works for 2011b and on


=====GCC win32-pe and win64-pe=====
=====GCC win32-pe and win64-pe=====
The program's GCC win32-pe and GCC win64-pe are installed by MotoHawk. These two programs integrate with the GCC compilers the customer can install and allows them to work. The win32-pe is on all instaltions, and the win64-pe is installed on MotoHawk versions that can work on 64 bit machines. As such they should never be deleted.
The programs GCC win32-pe and GCC win64-pe are installed by MotoHawk. These two programs integrate with the GCC compilers the customer can install and allows them to work. The win32-pe is on all instaltions, and the win64-pe is installed on MotoHawk versions that can work on 64-bit machines. As such, they should never be deleted.


One common issue with these files is sometimes MotoHawk does not properly install/uninstall them. If that happens you will get an error saying that win32-pe is not found upon building a model, and the build will fail. If this happens on a Vista OS you can try installing this patch [http://www.neweagle.net/support/wiki/docs/RequiredFiles/MinGW_5_1_3.zip Vista Patch]. If you have a 64 bit OS, see [[Required Files#Compilers]]. Just note that you will need a password to login to the required files section. If neither of these solutions work, or you have a different OS than the patches provided, manually uninstall every program associated with MotoHawk (including MotoHawk, MotoHawk Licensing, GCC compilers, etc). Especially make sure to uninstall the GCC Win32-PE program. Then reinstall everything, first compilers then MotoHawk.
One common issue with these files is sometimes MotoHawk does not properly install/uninstall them. If that happens you will get an error saying that win32-pe is not found upon building a model, and the build will fail. If this happens on a Vista OS, you can try installing this '''[https://wiki.neweagle.net/ProductDocumentation/MotoTron/MotoHawk/MinGW_5_1_3.zip Vista Patch]'''. If you have a 64-bit OS, see '''[[Required Files#Compilers|Compilers]]'''. Note that you will need a password to login to the required files section. If neither of these solutions work, or you have a different OS than the patches provided, manually uninstall every program associated with MotoHawk (including MotoHawk, MotoHawk Licensing, GCC compilers, etc.), especially the GCC Win32-PE program. Then reinstall everything, first the compilers, then MotoHawk.


====CodeWarrior Compiler====
====CodeWarrior Compiler====
Line 578: Line 578:
=====CodeWarrior Installation=====  
=====CodeWarrior Installation=====  
To install the CodeWarrior application from a CD:
To install the CodeWarrior application from a CD:
# Insert CD in drive. Click Start > Run and double-click Setup.exe. Follow on-screen instructions. (Try to leave the default install directory)
# Insert CD in drive. Click Start -> Run and double click on Setup.exe. Follow on-screen instructions. (Try to leave the default install directory.)


=====Using CodeWarrior=====
=====Using CodeWarrior=====
Line 584: Line 584:


*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 uses 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).
*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 uses 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 '''[http://www.neweagle.net/support/wiki/index.php?title=Build_Blocks MotoHawk Tool Chain Definition]''' block that will allow you to choose which compiler to use, if necessary. Find it using Simulink Library Browser; it is located in the MotoHawk > Build library.
*There is also a '''[[Build_Blocks|MotoHawk Tool Chain Definition]]''' block that will allow you to choose which compiler to use, if necessary. Find it using Simulink Library Browser; it is located in MotoHawk -> Build library.


'''Notes''':  
'''Notes''':  
* 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.
* 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 your application model does not build because it cannot find the path for your CodeWarrior license, you may need to create a custom path in your '''[http://www.neweagle.net/support/wiki/index.php?title=Build_Blocks MotoHawk Tool Chain Definition]'''.  See CodeWarrior tool chain examples below:
* If your application model does not build because it cannot find the path for your CodeWarrior license, you may need to create a custom path in your '''[[Build_Blocks|MotoHawk Tool Chain Definition]]'''.  See CodeWarrior toolchain examples below:


{|
{|
Line 597: Line 597:


=== Mex File Compiler ===
=== Mex File Compiler ===
To work with component blocks you need to install a mex compiler. On most versions of 32 bit Matlab, that compiler already comes with the software but it must be selected. To select a mex compiler, or to make sure you have one, type "mex -setup”, without the quotes, into your Matlab command line. At that point you will be asked if you want to find and install a mex compiler. If the generic LCC-win32 compiler is already on your machine it will come up as an option. However, if the option that comes up is none, you will have to install a compiler. To do so search Mathworks website for the compatible compilers for the version of Matlab used. For each version of Matlab that needs a compiler they list compatible compilers, and give links to download them. If you run into errors will building the component model, after the compilers are installed, you might need a Mathworks software patch. This Mathworks page http://www.mathworks.com/support/tech-notes/1600/1605.html is a good starting point for installation and troubleshooting errors.
To work with component blocks, you need to install a mex compiler. On most versions of 32-bit MATLAB, that compiler already comes with the software, but it must be selected. To select a mex compiler, or to make sure you have one, type '''>>mex-setup''' into your MATLAB command line. At that point you will be asked if you want to find and install a mex compiler. If the generic LCC-win32 compiler is already on your machine it will come up as an option. However, if the option that comes up is none, you will have to install a compiler. To do so, search Mathworks' website for the compatible compilers for the version of MATLAB used. For each version of MATLAB that needs a compiler, they list compatible compilers and give links to download them. If you run into errors will building the component model, after the compilers are installed, you might need a Mathworks software patch. This '''[http://www.mathworks.com/support/tech-notes/1600/1605.html Mathworks page]''' is a good starting point for installation and troubleshooting errors.
 
==Maintenance and Support Policy ==
 
=== MotoHawk Maintenance ===
*A MotoHawk license is a perpetual, non-ending license to use the software, controlled via the dongle.  Maintenance is optional.
*New purchasers of MotoHawk are given the ability to upgrade their MotoHawk for 1 additional major release of MotoHawk apart from the one they purchase, and support to submit bug fixes / feature requests.
*The additional upgrade should be sequentially 'next' major release to the one purchased.
*All beta versions of a particular MotoHawk major release(e.g. 2010aBeta2, 2010aBeta3) are counted under a single major release i.e 2010a.
**For example, at the time of purchasing MotoHawk, I am given the current dongle (i.e. MotoHawk 2011a), and I am eligible to upgrade the dongle to 2011b and its Beta releases.  I am not eligible for a free upgrade to MotoHawk 2012a and must pay for the maintenance to do so. 
*Maintenance purchases come with the ability to extend the upgrades to two additional major releases. These additional versions should also be sequential to previous license.
*All license access is controlled via the USB dongle.
*If the original license or the Maintenance expires you are no longer eligible for software support.
 
====Webstore====
:'''[http://store.neweagle.net/motohawk-software-maintenance.html Buy Now: MotoHawk Software Maintenance]'''
 
===MotoHawk Support ===
*MotoHawk is a production software development environment, useful for prototyping or production.  It is intended to be used by an experienced engineer in mechatronics, controls and embedded engineering.  As such, the purchase of training and applications engineering is encouraged to use the tool.
*New purchases and maintenance purchases (licenses under maintenance) have the ability to submit problems and make feature requests of the product (defined as "standard support"), but are not entitled to applications consulting which is defined as extensive installation support, general troubleshooting, and general usage of Mathworks, MotoHawk, embedded hardware and software issues.  These items are provided in applications support contracts that are sold via monthly retainers, time and material consulting, or via a production supply agreement for modules.
*Current MotoHawk customers are entitled to the ability to download additional documentation, participating on forums for trouble shooting and applications support, and the wiki.
*MotoHawk customers are encouraged to attend a training class from New Eagle or a qualfied partner, or use the consulting contract as a means to gain experience with the product.  For information on the training course, visit '''[[MotoHawk_Control_Solutions#MotoHawk_Training|MotoHawk Training]]'''
*MotoHawk users are encouraged to participate in or watch the webinars that are open for training and learning of the product.
 
====Webstore====
:'''[https://store.neweagle.net/engineering-services.html Buy Now (in $1 USD Units): MotoHawk Support]'''

Latest revision as of 18:01, 7 March 2023

New Eagle > Products Wiki > MotoHawk Platform > MotoHawk > MotoHawk FAQ

Installing MotoHawk

Prerequisites

MathWorks required products:

  • MATLAB
  • Simulink
  • Stateflow (optional, but highly recommended - may be required for some MotoHawk libraries)
  • Embedded Coder (formerly Real Time Workshop Embedded Coder + others)
  • MATLAB Coder (new for MATLAB 2011a)
  • Simulink Coder (formerly Real Time Workshop + Stateflow Coder)
  • Stateflow Coder (only for MATLAB 2010b and earlier)

Side-by-Side Installer

Older versions of MotoHawk only allowed one version of MotoHawk to be installed at any given time. The MotoHawk Side-by-Side Installer, new with MotoHawk2010a, allows for many versions of MotoHawk to be installed at one time along with one legacy MotoHawk (MotoHawk2009bSP0 or earlier). Take, as an example, having one project in the final stages of development or already in production using MotoHawk 2009a and starting a new project and wanting to use the newest software. The Side-by-Side Installer allows you to have the two working environments installed at the same time and switch between them easily. To allow this easy change, the Side-by-Side Installer includes a MotoHawk Version Selector which allows you to select which version of MotoHawk will run with a specific version of MATLAB.

Changes to Installation and Use Procedures

Installation

Old
  1. Use Add/Remove programs to uninstall any previous versions of MotoHawk.
  2. Run installer and select the versions of MATLAB with which to integrate MotoHawk.
New
  1. Run installer to install MotoHawk. At the end, there is a prompt to launch the MotoHawk Version Selector.

Use

Old
  1. Launch MATLAB and it will start MotoHawk if it was integrated at installation.
New
  1. Use MotoHawk Version Selector to integrate a version of MATLAB with a version of MotoHawk.
  2. Launch MATLAB and it will start the version of MotoHawk with which it was integrated.

Using MotoHawk Version Selector

The Side-by-Side Installer also installs the MotoHawk Version Selector tool. To get to this program, go to Start -> All Programs -> Woodward -> MCS -> MotoHawk -> MotoHawk Version Selector. After you have selected the MATLAB and MotoHawk versions, launching the selected versions of MATLAB will launch MotoHawk.

Select MATLAB Version

The top has a dropdown list titled "MATLAB Version." This dropdown will list all versions of MATLAB on the machine. Select the version of MATLAB for which you want to change the MotoHawk version or select the checkbox below labeled "Use same MotoHawk Toolbox for all MATLAB versions." Note that not all MotoHawk versions will support all MATLAB versions, so the Side-by-Side installs may be grayed out if the checkbox is used.

Disabled

This radio button selection will allow MATLAB to launch without initializing any version of MotoHawk. It is also the default choice on MATLAB versions the most recent installer supports.

Side-by-Side Installation

All of the Side-by-Side installations will be listed in radio buttons in the Select MotoHawk Toolbox Version panel. Select the radio button next to the version you want to use, and it will integrate into the selected version of MATLAB.

Using Environment Variable MOTOHAWK_DIR

This feature uses the Environment Variable MOTOHAWK_DIR to point to the installation location of the version of MotoHawk you want to run. To change the environment variable, do the following:

Windows XP
  1. Right click on "My Computer" and select properties
  2. Select the advanced tab
  3. Click the Environment Variables button at the bottom of the page
  4. Find MOTOHAWK_DIR and select the edit button or click the new button if MOTOHAWK_DIR does not already exist
  5. Change the Variable value to the directory MotoHawk is installed in (e.g., C:\Program Files\Woodward\MotoHawk)


Windows Vista/Windows 7
  1. Right click on "My Computer" and select properties
  2. Select the Advanced System settings on the left side of the window
  3. Click the Environment Variables button at bottom of page
  4. Find MOTOHAWK_DIR and select the edit button or click the new button if MOTOHAWK_DIR does not already exist
  5. Change the Variable value to the directory MotoHawk is installed in (e.g., C:\Program Files\Woodward\MotoHawk)

Custom/Legacy MotoHawk Version

This radio button allows you to specify a path to the MotoHawk install directory.

Starting a New Project

Use the command in the MATLAB window >>motohawk_project('insert_name_here') to create a new project called "insert_name_here".

MotoHawk Blockset

The MotoHawk Blocks support many different behaviors including I/O, fault management, calibration, online viewing via calibration tools and many more.


MotoHawk Block Categories

A F O
MotoHawk Advanced Digital I/O Blocks MotoHawk Fault Management Blocks Motohawk OBD blocks
MotoHawk Analog I/O Blocks MotoHawk Free Running Timer
MotoHawk Annotation Blocks MotoHawk Fixed Point Blocks
MotoHawk Autodoc MotoHawk Flexible Encoder
B J S
MotoHawk Build Blocks MotoHawk Serial I/O Blocks
MotoHawk System Debug Blocks
C K T
MotoHawk Calibration & Probing Blocks MotoHawk Knock Blocks MotoHawk Target Definition Blocks
MotoHawk CAN Blocks MotoHawk Trigger Blocks
MotoHawk Component Blocks
MotoHawk CCP Slave Blocks
D L V
MotoHawk Data Storage Blocks MotoHawk Lookup Table Blocks MotoHawk VDO Gauge Blocks
MotoHawk Diagnostic Blocks
MotoHawk Digital I/O Blocks
E M
MotoHawk Encoder Blocks MotoHawk Module Configuration Blocks
MotoHawk Extra Development Blocks

Build Counter

How do I check the build version of a model?

At the MATLAB command prompt, type in motohawk_build_version('modelname') and it will return a three-digit number which indicates the build version of that model.

How do I reset the motohawk_build_version counter?

For instance, if I copy a model for a new project, I’d like to reset the build counter?

There is a MotoHawk command to update this value. To do this, have the model open and go to the MATLAB command prompt and type in:
  1. >>number = ‘000’ The value between the ticks can be any number you want
  2. >>motohawk_build_version(bdroot, number) This will set the three-character build version to 000. You can also place the value directly into the expression; just remember to use the ticks(‘).
You can also type >>help motohawk_build_version from the command line and get help for more advanced features.

Using S Functions With MotoHawk

S functions are a useful tool to make custom blocks. They can also be used to protect your code from an end user. S functions can be written using .m files, C code or Fortran, with C code being the most common way. S functions require practice and knowledge of C, masking blocks (including how masks can handle some of the I/O), TLC and embedded C. That information can be acquired by reading the Simulink help. To help you make S functions work with MotoHawk, here is an example model and document to explain how to use it: Help With S Functions

Only inlined S functions as described in the presentation provided can be used with MotoHawk. If you wanted to use a non-inlined S function to protect IP, it is recommended that you use a component model, as component models have the ability to protect IP. Note: While it is possible to embed S functions into a MotoHawk model as the presentation shows, this is not, in general, supported or recommended by Woodward. The intent of MotoHawk is to allow the user to design in a model-based design environment. By using MotoHawk as a framework for embedding c-code, you are losing the power of the tool and of model-based design. We would recommend that S functions are considered only to implement small chunks of code that aren’t easily described in Simulink or Stateflow.

Common Errors

Dongle Issues

Dongle issues include but are not limited to:

  • MotoTron License Viewer is blank or crashing
  • MotoHawk/MotoTune licensing is not registering
  • Light on the token now is lighting up

Click below for the dongle troubleshooting guide:

Dongle Troubleshooting Guide

Older Version Crashes

If you experience crashes when using newly installed older versions of MotoHawk, anything predating the most recent release, please follow these steps for troubleshooting:

  • MotoHawk and MotoTron Licensing Viewer crash
    • Please install the newest release of MotoHawk.
    • This will install any newly released fixes for MotoHawk.
    • After installing the newest release, use your regular MotoHawk version as normal.
  • All Moto software is crashing, i.e., MotoHawk, MotoTune etc.
    • A full re-installation of the Moto suite may be required.
    • Please follow these steps for proper installation.

Pre-compile Errors

Errors generated during pre-compile can point to a target mismatch in the slprj/sfprj directory. These directories are generated by Simulink during the build. If the user is receiving pre-complile errors like the one above, deleting the current slprj and/or sfprj folders will give MathWorks a fresh start to rebuild them.

Build Errors

If you get the error message: Error using ==> motocoder_codegen at 78 and/or Error using ==> motohawk_make_rtw at 355 MotoCoder Build Failed, you probably have a path error. This error also throws up a warning in the build file that it is looking for a file and cannot find it. To fix this, make sure the path is correct. The MATLAB path is seen in the current folder window, located in the MATLAB command window. You want to make sure you are located in the folder that your model is in. You also want to make sure you get to this folder by clicking on and entering the folder, not just using the expand arrows until you can see it. Using the path is made easier by using the >>motohawk_project command which makes a new model with folders for libraries, CAN messaging, and .m files. There is a setup and close .m file which then handles the path management during builds. This manages the path without the need for manually adding files to the path. Also make sure you never manually add the build folder to the path; this can cause build errors. The path to the model cannot contain spaces. An example of a valid path to a model would be C:\DEV_AREA\test_lib. These errors will not normally be caught by compiling with Ctrl-D but will appear upon building the model.

Warning: OSS_VR_Input has an unsupported VR Interface selected in the design

In previous versions of MotoHawk, a build warning might appear when a frequency in block with a CNK pin and a VR interface is selected. This message is incorrect and should be ignored. This warning was removed in MotoHawk 2012a Beta 4.

Warning: Calibratable I/O for PWMOutput NOT supported in MotoCoder yet

When building a model for an ECM-OH, ECM-5554-112-0902/0904, or any of the S12 modules, a build warning may occur due to the "allow I/O pin to be calibrated" option from MotoTune being selected. In this instance, the build may complete but cause errors. Deselecting the option may solve the error. The warning stems from the fact that none of the mentioned controllers support the Calibratable IO function. The option to "allow I/O pin to be calibrated" has been removed from the block mask when these modules are selected in MotoHawk 2012b Beta 2 and higher.

Programming Error: Code:(4,4,6,-1) ECU refused connection due to incorrect token security

This error may occur when you try to program an *.srz file that was built with a newer version of MotoHawk. Upgrading to a newer version of MotoTune and MotoServer may solve the problem.

Target Definition Block

Target Definition Block

ECM5554-112 Target Definition

MotoHawk Target Definition Block target names to use:

Use these targets for ECM-5554-112-0902-F00 ("PROD") and ECM-5554-112-0902-CP0 ("DEV") modules:
  • ECM-5554-112-0902-kD: PCM0902 module with knock development interface, DV release hardware
  • ECM-5554-112-0902-kP: PCM0902 module with knock development interface, PV release hardware
  • ECM-5554-112-0902-xD: PCM0902 module, DV release hardware
  • ECM-5554-112-0902-xP: PCM0902 module, PV release hardware
Use this target for ECM-5554-112-0904-F00 ("PROD") and ECM-5554-112-0904-CP0 ("DEV") modules:
  • ECM-5554-112-0904-xD: PCM0904 module, DV and PV release hardware

Note: If you cannot find the module in the target list, make sure you have your licensing dongle plugged in. This will unlock all of the modules to build to.

Software

MathWorks

Recommended installations:

  • MATLAB
  • Simulink
  • Stateflow (optional, but highly recommended)
  • MATLAB Coder (new for MATLAB2011a)
  • Simulink Coder (formerly Real Time Workshop + Stateflow Coder)
  • Embedded Coder (formerly Real Time Workshop Embedded Coder + others)

MotoServer/MotoTune

  • License required
  • With MotoHawk 2011aSP0 and later, MotoServer/MotoTune 8.13.7.145 or later is required
  • With MotoHawk 2011aBeta3 and later, MotoServer/MotoTune 8.13.7.144 or later is required
  • With MotoHawk 2011aBeta1 and later, MotoServer/MotoTune 8.13.7.141 or later is required
  • With MotoHawk 2010aBeta6 and later, MotoServer/MotoTune 8.13.7.120 or later is required
  • With MotoHawk 2009bBeta1 and later, MotoServer/MotoTune 8.13.7.087 or later is required

GCC Compiler

GCC Compiler
  • No license required
  • MotoHawk 2009bBeta2 or later is required
  • GCC 4.6 is used with MotoHawk 2011b and on
  • GCC 4.4 is used with MotoHawk 2009b to 2011a and is not supported on 64-bit MATLAB installations
  • GCC compilers work with 64-bit MATLAB for PowerPC targets. This includes the 40-, 80-, 112- and 128-pin modules.

CANKing

  • No license required

Latest Version of MotoHawk

The latest MotoHawk version is always available from Required Files. You must have an account on the New Eagle Wiki in order to download it.

Does Motohawk run on 64-bit software?

  • If the operating system is 64-bit, then MotoHawk 2010a SP0 or later is required.
  • If the MATLAB installation is 64-bit, then MotoHawk 2010b SP0 or later is required.

Some customers are using MotoHawk and MotoTune on Windows Vista 64-bit with MATLAB 32-bit. They report:


After installing MotoServerRuntime, MotoTune, and MotoHawk (using right-click install-as-administrator), copy the entire directory tree "C:\Program Files (x86)\MotoTron\..." to "C:\Program Files\MotoTron\..." (substitute "Woodward" for "MotoTron" for MotoHawk 2009b and later releases). When it is time to uninstall, remember to delete the "C:\Program Files\MotoTron\..." copy before uninstalling with Add/Remove Programs.


What are some known problems with running Motohawk on Windows Vista?

Dongle Driver

Windows Vista (32-bit) is known to have dongle driver problems.

Error 1925 (insufficient privileges)

This error occurs when the install process is not run as Administrator. In your web browser, right click on MotoHawk_[Version] and select 'Run as Administrator' rather than 'Open' or double-clicking.

MotoHawk Compatibility Matrix

MotoHawk Compatibility Matrix

MATLAB Version MotoHawk Version
2009a 2009b 2010a 2010b 2011a 2011b 2012a 2012b 2013a 2013b 2014a 2014b 2015a 2015b 2016a 2016b 2017a 2017b 2018a 2018b 2019a
7.4 (R2007a) Yes No No No No No No No No No No No No No No No No No No No No
7.5 (R2007b) Yes Yes Yes No No No No No No No No No No No No No No No No No No
7.6 (R2008a) Yes Yes Yes No No No No No No No No No No No No No No No No No No
7.7 (R2008b) Yes Yes Yes Yes No No No No No No No No No No No No No No No No No
7.8 (R2009a) Yes Yes Yes Yes Yes No No No No No No No No No No No No No No No No
7.9 (R2009b) Yes Yes Yes Yes Yes Yes No No No No No No No No No No No No No No No
7.9.1 (R2009bSP1) No No No No Yes Yes No No No No No No No No No No No No No No No
7.10 (R2010a) No No Yes Yes Yes Yes Yes No No No No No No No No No No No No No No
7.11 (R2010b) No No No Yes(*) Yes Yes Yes Yes No No No No No No No No No No No No No
7.11.1 (R2010bSP1) No No No Yes(*) Yes Yes Yes Yes No No No No No No No No No No No No No
7.11.2 (R2010bSP2) No No No No No No Yes Yes No No No No No No No No No No No No No
7.12 (R2011a) No No No No Yes Yes Yes Yes Yes No No No No No No No No No No No No
7.13 (R2011b) No No No No No Yes Yes Yes Yes Yes No No No No No No No No No No No
7.14 (R2012a) No No No No No No Yes Yes Yes Yes Yes No No No No No No No No No No
8.0 (R2012b) No No No No No No No Yes Yes Yes Yes Yes No No No No No No No No No
8.1 (R2013a) No No No No No No No No Yes Yes Yes Yes Yes No No No No No No No No
8.2 (R2013b) No No No No No No No No No Yes Yes Yes Yes Yes No No No No No No No
8.3 (R2014a) No No No No No No No No No No Yes Yes Yes Yes Yes No No No No No No
8.4 (R2014b) No No No No No No No No No No No Yes Yes Yes Yes Yes No No No No No
8.5.1 (R2015a) No No No No No No No No No No No No Yes Yes Yes Yes Yes No No No No
8.5 (R2015aSP1) No No No No No No No No No No No No Yes(*) Yes Yes Yes Yes No No No No
8.6 (R2015b) No No No No No No No No No No No No No Yes Yes Yes Yes Yes No No No
9.0 (R2016a) No No No No No No No No No No No No No No Yes Yes Yes Yes Yes No No
9.1 (R2016b) No No No No No No No No No No No No No No No Yes Yes Yes Yes Yes No
9.2 (R2017a) No No No No No No No No No No No No No No No No Yes Yes Yes Yes Yes
9.3 (R2017b) No No No No No No No No No No No No No No No No No Yes Yes Yes Yes
9.4 (R2018a) No No No No No No No No No No No No No No No No No No Yes Yes Yes
9.5 (R2018b) No No No No No No No No No No No No No No No No No No No Yes Yes
9.6 (R2019a) No No No No No No No No No No No No No No No No No No No No Yes
  • (*) in SP1 only
  • (A) in current beta
  • (B) planned in future beta or service pack
  • As of MotoHawk 2015a, the XCP slave blockset is located in MotoHawk and requires no additional license

Known Problems with Mathworks Software

There is a known MATLAB R2013b issue regarding how MATLAB handles info.xml files at startup. As a workaround to this issue, please unzip this patch in the MATLAB root directory; the root directory is the directory given as the output of the MATLABROOT command. Alternatively, you can delete any info.xml files in any directories on your path.

MotoHawk and Windows 8 Compatibility

Motohawk is compatible with Windows 8 starting with MotoHawk 2013b SP0. Older versions are not compatible.

Mototune and MotoService are compatible with Windows 8

MotoHawk and Windows 10 Compatibility

MotoHawk is compatible with Windows 10 starting with MotoHawk 2015b.

Known Issue

The MotoHawk installer will have an issue supporting multiple versions of MotoHawk on machines which do not previously have .NET 2.0 installed. If multiple versions of MotoHawk are intended, it is recommended to ensure .NET 3.0 SP1 (includes .NET 2.0) is installed before installing the first MotoHawk version.

Can I speed up the build on the ECM5554-112?

MotoHawk 2010a Beta 5 made improvements in this area to make the build times between 55xx and 5xx much closer.

Compilers

Module/Family Green Hills Compiler 3.6 Green Hills Compiler 4.2.1 Green Hills Compiler 4.2.4 GCC 4.4.0SP1 GCC 4.6.0 CodeWarrior 4.6
GCM-0S12-024 X
ECM-S12X-70 X
ECM-0S12-024 X
ECM-5554-112 X X X X
HCM-0563-48 X X X X X
GCM-0563-48 X X X X X
ECM-0563-48 X X X X X
GCM-0565-024 X X X X X
ECU-0565-128 X X X X X
ECU-0555-80 X X X X X
ECU-0555-48 X X X X X
ECM-3R X X X X X

HCS12X Metrowerks Compiler

There is a free version for the S12X compiler. We are looking for Beta testers to determine whether this will work or whether you need the professional version for $1995.
Freescale - HCS12X

December 2010 compiler update from Woodward

The GNU compiler is not supported for the S12 target modules. The cost of the CodeWarrior compiler only (basic) is fairly inexpensive compared to our effort to support the GNU toolchain for S12. Additionally, when we last looked into this, the XGATE support was not available.

MPC5XX/MPC55XX Compiler Options

Greenhills

The Greenhills PowerPC compiler is recommended for production programs. GHS 3.6 and 4.2.1 is on both the 5xx and 55xx MotoHawk controllers. Information on this compiler can be found at Greenhills compiler.

Greenhills Demo License

Greenhills compilers can be demonstrated for 30 days by downloading the software. After installing, go to Start/Multi…./Licensing/License Request Generator. It automatically takes you to the Greenhills website and requests the license. Typical turnaround is 24 hrs.

International GHS License

All licenses sold outside the USA, including Canada, must be International Dongle type. The Green Hills Compiler (GHS) is a compiler supported in MotoHawk for 5xx and 55xx processor targets. This is the recommended compiler.

Green Hills Compiler Installation

To install the GHS application from a CD:

  1. Insert CD in drive. Click Start -> Run and double click on 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 GHS with MotoHawk, there are a few items to consider:

  • If targeted, the 5xx-based processors default to using GHS 3.6, although they work with later versions (4.2.1).
  • The 55xx-based processors default to using GHS 4.2.1 and will work with later versions but will not work with GHS 3.6.
  • 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 Toolchain 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 the 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
  • GHS 4.2.1 may not link correctly with MotoHawk if MH is installed in a path with spaces in the name
  1. Install MH in a path of desired drive without spaces

GCC (Free)

There is a GCC version of the license downloadable for the MPC5XX and MPC55XX modules. Download the file from Required Files.

Using GCC with MotoHawk

Be careful to select the correct version of GCC for your target and version of MotoHawk. Your program will not run correctly if the wrong compiler toolchain is selected.

  • GCC PowerPC EABI SPE is for MPC55xx modules like the ECM-555x-112 module
  • GCC PowerPC EABI (no SPE) is for MPC5xx modules such as the ECM565-128, ECM-555-80 and 48-pin modules for MotoHawk

MPC5xx

The MPC5XX micro uses either the GCC eabi SPE 4.6, or GHS 4.2.1 and 4.2.4.

GCC PowerPC EAB Version 4.6 works for MotoHawk 2011b and on

GCC PowerPC EABI Version 4.4.0 SP1 works for MotoHawk 2009b, 2010a - 2011a

MPC55xx

GCC PowerPC EABI Version 4.3.3 works for 2009a

GCC PowerPC EABI SPE Version 4.6 works for 2011b and on

GCC PowerPC EABI SPE Version 4.4.0 SP1 works for 2009b, 2010a - 2011a

GCC win32-pe and win64-pe

The programs GCC win32-pe and GCC win64-pe are installed by MotoHawk. These two programs integrate with the GCC compilers the customer can install and allows them to work. The win32-pe is on all instaltions, and the win64-pe is installed on MotoHawk versions that can work on 64-bit machines. As such, they should never be deleted.

One common issue with these files is sometimes MotoHawk does not properly install/uninstall them. If that happens you will get an error saying that win32-pe is not found upon building a model, and the build will fail. If this happens on a Vista OS, you can try installing this Vista Patch. If you have a 64-bit OS, see Compilers. Note that you will need a password to login to the required files section. If neither of these solutions work, or you have a different OS than the patches provided, manually uninstall every program associated with MotoHawk (including MotoHawk, MotoHawk Licensing, GCC compilers, etc.), especially the GCC Win32-PE program. Then reinstall everything, first the compilers, then MotoHawk.

CodeWarrior Compiler

CodeWarrior is a compiler offered by Freescale that MotoHawk uses to compile S12x targets. This is currently the only supported compiler for S12x targets.

CodeWarrior Installation

To install the CodeWarrior application from a CD:

  1. Insert CD in drive. Click Start -> Run and double click on 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:

  • 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 uses 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 MotoHawk Tool Chain Definition block that will allow you to choose which compiler to use, if necessary. Find it using Simulink Library Browser; it is located in MotoHawk -> Build library.

Notes:

  • 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 your application model does not build because it cannot find the path for your CodeWarrior license, you may need to create a custom path in your MotoHawk Tool Chain Definition. See CodeWarrior toolchain examples below:

Mex File Compiler

To work with component blocks, you need to install a mex compiler. On most versions of 32-bit MATLAB, that compiler already comes with the software, but it must be selected. To select a mex compiler, or to make sure you have one, type >>mex-setup into your MATLAB command line. At that point you will be asked if you want to find and install a mex compiler. If the generic LCC-win32 compiler is already on your machine it will come up as an option. However, if the option that comes up is none, you will have to install a compiler. To do so, search Mathworks' website for the compatible compilers for the version of MATLAB used. For each version of MATLAB that needs a compiler, they list compatible compilers and give links to download them. If you run into errors will building the component model, after the compilers are installed, you might need a Mathworks software patch. This Mathworks page is a good starting point for installation and troubleshooting errors.