target.XCPPlatformAbstraction - Specify XCP platform abstraction layer for target hardware - MATLAB (original) (raw)
Namespace: target
Specify XCP platform abstraction layer for target hardware
Since R2021a
Description
Use the target.XCPPlatformAbstraction
class to specify the implementation of the XCP Platform Abstraction Layer for your target hardware. The layer provides:
- The implementation of a static memory allocator –– see Memory Allocator.
- Other target hardware-specific functionality –– see Other Platform Abstraction Layer Functionality.
To create a target.XCPPlatformAbstraction
object, use the target.create function. Create the object and then use separate steps to specify properties. Or, using name-value arguments, create the object and specify properties in a single step.
If you do not create a target.XCPPlatformAbstraction
object, the software uses the default platform abstraction layer, which supports Linux®, Windows®, and Mac platforms.
Properties
Specify preprocessor directives, source files, and header files that are required for the implementation of the XCP platform abstraction layer.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Examples
This code snippet from Customize Connectivity for XCP External Mode Simulations shows how to specify and use a custom implementation of the XCP platform abstraction layer.
xcpPlatformAbstraction = target.create('XCPPlatformAbstraction', ... 'Name', 'XCP Platform Abstraction');
customPlatformAbstractionPath = 'pathToImplementationFolder'; xcpPlatformAbstraction.BuildDependencies.SourceFiles = ... {fullfile(customPlatformAbstractionPath, 'myXCPPlatform.c')}; xcpPlatformAbstraction.BuildDependencies.IncludePaths = ... {customPlatformAbstractionPath};
xcpTCPIPTransport = target.create('XCPTCPIPTransport', ... 'Name', 'XCP TCPIP Transport');
xcpTCPIPConfiguration = target.create('XCP', ... 'Name', 'XCP TCP/IP Configuration', ... 'XCPTransport', xcpTCPIPTransport, ... 'XCPPlatformAbstraction', xcpPlatformAbstraction);
Note
You can create the target.XCPPlatformAbstraction
object in a single step.
xcpPlatformAbstraction = target.create('XCPPlatformAbstraction', ... 'Name', 'XCP Platform Abstraction', ... 'SourceFiles', {fullfile('pathToImplementationFolder', 'myXCPPlatform.c'}, ... 'IncludePaths', {'pathToImplementationFolder'});
Version History
Introduced in R2021a