coder.profile.StackDriver
Description
Specify a driver implementation that obtains stack usage data from the target hardware during processor-in-the-loop (PIL) execution
Creation
stackUsageDriver = coder.profile.StackDriver()
returns an object.
Specify the driver implementation by providing values for these properties:
PtrDataType
HeaderFile
SourceFile
IncludePaths
DriverFunction
Properties
Examples
Obtain Stack Usage Data From Target Hardware.
A PIL execution requires a driver implementation that obtains stack usage data from the target hardware.
When you set up PIL target connectivity, specify the driver through an
subclass. This
code provides an example.rtw.connectivity.Config
classdef overheadConnectivityConfig < rtw.connectivity.Config methods function this = customConnectivityConfig(componentArgs) % Create builder targetApplicationFramework = ... mypil.TargetApplicationFramework(componentArgs); builder = rtw.connectivity.MakefileBuilder(componentArgs, ... targetApplicationFramework, ''); % Create launcher launcher = mypil.Launcher(componentArgs, builder); % Set up communication hostCommunicator = rtw.connectivity.RtIOStreamHostCommunicator(... componentArgs, ... launcher, ... rtiostreamLibTCPIP); % Call super class constructor to register components this@rtw.connectivity.Config(componentArgs,... builder,... launcher,... hostCommunicator); % Specify driver implementation that obtains stack usage % data from the target hardware stackUsageDriver = coder.profile.StackDriver(); stackUsageDriver.PtrDataType = 'uint64'; stackUsageDriver.HeaderFile = 'myHeaderFile.h'; stackUsageDriver.SourceFile = 'mySourceFile.c'; stackUsageDriver.IncludePaths = {'path/To/myFolder1', ... 'path/To/myFolder2', ... 'path/To/myFolder3'}; stackUsageDriver.DriverFunction = 'myDriverFunction'; this.setStackDriver(stackUsageDriver); end end end
For more information about setting up PIL target connectivity, see:
Version History
Introduced in R2022a