Create Board Support Framework

A board support framework consists of a set of folders and files. The Simulink® environment uses these files to implement different aspects of the SoC Blockset™. The files and folders contain or reference tools, libraries, configuration files, source and header files that make up the board support for one or more hardware boards.

Additionally, SoC Blockset and MathWorks® code generation products, such as Embedded Coder® and HDL Coder™, use this framework to recognize the target and to tailor the code generation process.

The following table lists the folders created in the soc.sdk.BoardSupport folder as part of the framework.

File and FolderPurpose or Content
registryXML files that define your target. Do not edit or delete these files manually.
+matlabshared/+target/+foldernameMATLAB files that you write to implement target-specific utilities.
srcC/C++ source files that integrate with generated code.
includeC/C++ header files that integrate with generated code.
libLibraries that integrate with generated code.
rtwTargetInfo.mTarget information used to register and link the board support and features with Simulink.

To add a new board support framework, use the soc.sdk.BoardSupport class to create a new BoardSupport object. The BoardSupport object must be provided with a unique name, a reference to an existing board support, and the full folder path where the framework will be added to your host computer.

For example, the following code creates a new empty board support framework for a using Board Support for Xilinx Zynq UltraScale+ MPSoCas the reference board support.

boardSupportObj = soc.sdk.BoardSupport(...
    'My SoC Board Support',...                                % Board Support Name 
    'Board Support for Xilinx Zynq UltraScale+ MPSoC',...     % Reference
    fullfile('C:','mySoCBoardSupport')...                     % Folder
    );

The resulting BoardSupport object appears as follows.

boardSupportObj = 

  BoardSupport with properties:

                   Name: 'My SoC Board Support'
                 Folder: 'C:\mySoCBoardSupport'
       ReferenceTargets: {[1×1 soc.sdk.BoardSupport]}
              Deployers: {}
    BaremetalSchedulers: {}
       OperatingSystems: {}
                    PIL: {}
           ExternalMode: {}
              Profilers: {}
             AliasNames: {}

At any time during the development of a new board support framework, the soc.sdk.BoardSupport object can be saved to the host computer using the save method. To access a previously saved soc.sdk.BoardSupport object, use the soc.sdk.loadBoardSupport function. To remove a previously saved soc.sdk.BoardSupport object, use the remove method.

Related Topics

External Websites