Embedded Coder® allows an ASAP2 data definition file to be generated during the code generation process. This file can be used by a third-party tool to access data from the real-time application while it is executing.
ASAP2 is a data definition standard by the Association for Standardization of Automation and Measuring Systems (ASAM). ASAP2 is a standard description for data measurement, calibration, and diagnostic systems. Embedded Coder software lets you export an ASAP2 file containing information about your model during the code generation process.
Before you generate ASAP2 files with Embedded Coder software, see “Generating an ASAP2 File” in the Simulink® Coder™ help. The help describes how to define the signal and parameter information required by the ASAP2 file generation process.
Before the build process, select the ASAP2 option:
Select Simulation > Model Configuration Parameters.
The Configuration Parameters dialog box appears.
In the Configuration Parameters dialog box, select Code Generation > Interface pane.
From the Interface drop-down list, in
the Data exchange frame, select the
The build process creates an ASAM-compliant ASAP2 data definition file for the generated C code.
The standard ASAP2 file generation does not include the memory address attributes in the generated file. Instead, it leaves a placeholder that you must replace with the actual address by postprocessing the generated file.
The map file options in the project template has to be set up a certain way for this procedure to work. If you have created your own project templates, and you do not have the correct settings, you see the following instructions:
Warning: It was not possible to do ASAP2 processing on your .map file.This is because your IDE project template is not configured to generate a .map file in the correct format. To generate a .map file in the correct format you need to setup the following options in your IDE project template: Generate section map should be checked on Generate register map should be checked off Generate symbol table should be checked on Format list file into pages should be checked off Generate summary should be checked off Page width should be equal to 132 characters Symbol colums should be 1 You can change these options via Project -> Project Options -> Linker/Locator -> Map File -> Map File Format.
Embedded Coder software performs this postprocessing for you. To do the postprocessing, it first extracts the memory address information from the map file generated during the link process. Then, it replaces the placeholders in the ASAP2 file with the actual memory addresses. This postprocessing is performed automatically.