| Contents | Index |
| On this page… |
|---|
Note Support for Green Hills MULTI IDE will be removed in a future release of your MathWorks software. |
Embedded Coder software provides an interface between MATLAB and the Green Hills MULTI IDE software. The software enables you to
Access the processor
Manipulate data on the processor
Manage projects within the IDE
while using the MATLAB numerical analysis and simulation functions.
Embedded Coder software connects MATLAB and Simulink with Green Hills MULTI integrated development and debugging environment from Green Hills. The software enables you to use MATLAB and Simulink to debug and verify embedded code running on many microprocessors that Green Hills MULTI software supports, such as the ARM, Freescale MPC7400, Blackfin, and NEC V850 families.
Using the software, you can perform the following tasks and others related to Model-Based Design:
Function calls — Write scripts in MATLAB to execute any function in the Green Hills MULTI IDE
Automation — Write automated tests in MATLAB to execute on your processor, including control and verification operations
Host-Processor Communication — Communicate with the processor directly from MATLAB, without going to the IDE
Verification and Validation
Load and execute projects into the Green Hills MULTI IDE software from the MATLAB command line
Build and compile code, and then use vectors of test data and parameters to test the code
Build and compile your code, and then download the code to the processor and execute it
Design models — Design models and algorithms in MATLAB and Simulink and run them on the processor
Generate code — Generate executable code for your processor directly from the models designed in Simulink, and execute it
Embedded Coder software includes an IDE Project Generator component. With the IDE Project Generator component, you can generate a complete project file for Green Hills MULTI software from Simulink models, using C code generated with Embedded Coder software. Thus, you can use both Simulink Coder and Embedded Coder software to generate generic ANSI C code projects for Green Hills MULTI from Simulink models. You can then build and run the code on supported processors.
The following list suggests some of the uses for Embedded Coder software:
Create test benches in MATLAB and Simulink for testing your manually written or automatically generated code running on a variety of DSPs
Generate code and project files for Green Hills MULTI software from Simulink models using both Simulink Coder and Embedded Coder software for rapid prototyping or deployment of a system or application
Build, debug, and verify embedded code on supported processors with MATLAB, Simulink, and Green Hills MULTI software
Perform processor-in-the-loop (PIL) testing of embedded code
Embedded Coder software comprises these components
IDE Automation Interface — Enables communication between MATLAB and Green Hills MULTI software.
IDE Project Generator — Uses Simulink to let you build models, simulate them, and generate code from the models directly to the processor.
Verification — Validate and verify your projects. You can simulate algorithms and processes in Simulink models and concurrently on your processor. Comparing the concurrent simulation results helps verify the fidelity of your model or algorithm code.
The IDE Automation Interface component enables you to use MATLAB functions and methods to communicate with the Green Hills MULTI IDE software. With the MATLAB functions, you can perform the following program development tasks:
Automate project management.
Debug projects by manipulating the data in the processor memory (internal and external) and registers.
Exercise functions from your project on the processor.
Communicate between the host and processor applications.
The IDE Automation Interface component provides the following functionality in the Debug component—methods and functions for project automation, debugging, and data manipulation.
The IDE Project Generator component is a collection of methods that use the Green Hills MULTI API to create projects in Green Hills MULTI and generate code. With the interface, you can do the following:
Automatic project-based build process — Automatically create and build projects for code generated by Embedded Coder.
Custom code generation — Use System Target Files (STF) to generate both processor-specific and optimized code.
Automatic downloading and debugging — Debug generated code in the Green Hills MULTI debugger, using either the instruction set simulator or real hardware.
Create and build projects for Green Hills MULTI from Simulink models — IDE Project Generator uses Simulink Coder or Embedded Coder to build projects that work with supported processors.
Generate custom code using the Configuration Parameters in your model with the system target files idelink_ert.tlc and idelink_grt.tlc.
Verifying your processes and algorithms is an essential part of developing applications. The components of Embedded Coder software provide the following verification tools.
Processor in the loop (PIL) simulation — Use simulation techniques to verify generated code running in an instruction set simulator or real hardware environment.
Execution profiling — Gather execution profiling measurements with Green Hills MULTI instruction set simulator to establish the timing requirements of your algorithm.
Embedded Coder software requires some information about your MULTI installation before you can use the software to develop projects in MULTI from MATLAB. To configure the interface between MATLAB and MULTI, provide the information in the following table. Embedded Coder software provides a GUI-based configuration utility to help you configure the software and interface.
| GUI Parameter | Configuration Information | Description |
|---|---|---|
| Directory | MULTI installation folder | Identifies the path to your Green Hills software. |
| Configuration | Primary processor | Identifies the processor on which you are developing. |
| Debug server | Debug server type | Specifies the type of debug server to use. |
| Host name | Host name | Specifies the name of the machine that runs your IDE Link service. |
| Port number | Port number | Specifies the port for communicating with the host and IDE Link service. The service listens on this port. |
Configuring Embedded Coder Software. You must configure your installation before you start working with the software and MULTI.
To generate code for Blackfin processors, the software supports only the Green Hills version of the Blackfin compiler.
Note The software does not support using Analog Devices Blackfin compiler. When you select your configuration during the configuration process, do not select bfadi_standalone.tgt from the Configuration list. bfadi_standalone.tgt uses the ADI compiler. |
Follow these steps to open the Embedded Coder configuration utility:
Enter ghsmulticonfig at the MATLAB prompt.
The Embedded Coder Configuration dialog box opens, as shown in the following figure.
![]()
In the Directory field, enter the path to the executable file multi.exe for your Green Hills® MULTI® installation. To search for the file, click Browse.
From the Configuration list, select your primary processor. Embedded Coder software supports a variety of processors. Choose one that matches your development platform. In many cases, the processor_standalone.tgt variants, such as ppc_standalone.tgt, work well. Refer to your Green Hills MULTI documentation for more information about the configuration options for processors.
Enter the debug server string in Debug server. The string you enter sets specific values for processors, such as the board support library and whether the processor is big or little endian.
The standard input string is debugconnection. To use a processor simulator, such as the MPC7448 simulator, enter the string
simppc -cpu=ppc7448 -fast -dec-rom_use_entry
Your MULTI documentation provides more information about the debug server options and how to use them. You can find more debug server string for simulators in the reference material for ghsmulticonfig.
In Host name, enter the name of the machine that is going to run the IDE Link service. When you construct a ghsmulti object, the ghsmulti function starts the IDE Link service. To launch the service, the function needs to know where the service will run. The Host name string identifies that location. The default value is localhost, meaning the service runs on the local machine. No other input is valid.
Enter the port number for the service in Port number.
Port number 4444 is the default port value. To change the port used, enter a different value in this field. Verify that the port you enter is available. If the port number you enter is not available, the IDE Link service does not start. Thus, you get an error message in MATLAB when you try to construct a ghsmulti object.
Select or clear Show server status window to specify whether the IDE Link service status appears in the task bar. The default value is to show the service status. Clearing Show server status window hides the status in the task bar. Select this option as a best practice. Keeping this option selected enables the software to shut down the communication services for Green Hills MULTI completely.
Click OK to complete the configuration process and close the dialog box.
When you install MULTI to use with the software, MULTI sets the Show Paths option to use relative file paths. So that projects and programs build accurately, configure MULTI to use full folder paths. Follow these steps to change the configuration in MULTI.
Start MULTI from your desktop.
Switch to the Project Manager tool.
Select View > Show Paths > Full Paths.
Note With Green Hills MULTI, Embedded Coder outputs the derived files in the <builddir> folder. For example, in model_ghsmulti. |
![]() | Working with Green Hills MULTI IDE | IDE Automation Interface | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |