メインコンテンツ

Product Stack for Raspberry Pi Blockset

This diagram provides a visual overview of how different MathWorks® products integrate to support various workflows with the Raspberry Pi® Blockset. Use the diagram to identify required dependencies for your application.

Raspberry Pi Blockset supports targeting of Raspberry Pi hardware using MATLAB® and Simulink®. You can add layers of coders to support different workflows in the Raspberry Pi Blockset.

The minimum product stack for MATLAB- and Simulink-based workflows enables basic connected I/O capabilities for rapid prototyping and simulation. Adding Embedded Coder® enables code generation, verification, and validation.

Choose a Product Stack

Which product stack you need depends on your workflow and application requirements. Raspberry Pi Blockset supports:

  • MATLAB-based workflows — For users who prefer script-based programming in MATLAB

  • Simulink-based workflows — For users who prefer model-based design in Simulink

MATLAB Workflows

Refer to this table to select a MATLAB-based workflow that suits your application.

GoalsWorkflowProduct StackDescription

  • Prototype and test algorithms without generating code.

  • Explore various Raspberry Pi peripherals interactively.

MATLAB I/O

  • MATLAB

  • Raspberry Pi Blockset

  • Communicate with hardware from MATLAB scripts, functions, or commands.

  • Access Raspberry Pi peripherals such as GPIO, I2C, SPI, UART, camera, and audio directly from MATLAB command line.

For more information, see Prototype and Test Algorithms Interactively with MATLAB I/O.

Deploy standalone algorithms on Raspberry Pi hardware.

MATLAB targeting

  • MATLAB

  • Raspberry Pi Blockset

  • Embedded Coder

Generate standalone C/C++ executables from MATLAB functions and deploy them directly to Raspberry Pi to run independently of MATLAB.

For more information, see Deploy Standalone Algorithms Using MATLAB Targeting.

Run parts of algorithm as generated code on Raspberry Pi while the rest runs in MATLAB.

MATLAB PIL simulation

  • MATLAB

  • Raspberry Pi Blockset

  • Embedded Coder

  • Validate generated C/C++ code by executing it on Raspberry Pi.

  • Compare results with MATLAB execution for accuracy and performance.

  • Check if the design works as intended on target hardware.

For more information, see Validate Code with Processor-in-the-Loop.

Deliver web-based interactive applications.

Deploy Web App on MATLAB Web App server

  • MATLAB

  • Raspberry Pi Blockset

  • MATLAB Compiler™

Package MATLAB applications and host them on MATLAB Web App server for browser-based access.

For more information, see Build Standalone Applications and Web Apps for Raspberry Pi.

Share applications with others.

Create standalone application using MATLAB Compiler

  • MATLAB

  • Raspberry Pi Blockset

  • MATLAB Compiler

Package MATLAB programs as standalone desktop applications that run without MATLAB.

For more information, see Build Standalone Applications and Web Apps for Raspberry Pi.

Simulink Workflows

Refer to this table to select a Simulink-based workflow that suits your application.

GoalsWorkflowProduct StackDescription

Build, simulate, and test models without code generation.

Connected I/O

  • MATLAB

  • Raspberry Pi Blockset

  • Simulink

  • Communication between Simulink models and hardware during simulation.

  • Test and prototype Simulink models with real hardware before deployment.

For more information, see Simulate and Test Models with Connected I/O.

Adjust parameters in Simulink model while it runs on Raspberry Pi hardware.

Real-time parameter tuning with monitor and tune

  • MATLAB

  • Raspberry Pi Blockset

  • Simulink

  • Embedded Coder

  • Test interactively by tuning parameters and monitoring signals in real-time while the model runs on Raspberry Pi.

  • Develop and validate your model using the actual data and hardware for which it is designed.

For more information, see Rapid Prototyping and Real Time Simulation.

Verify generated C/C++ code running on Raspberry Pi.

Simulink PIL simulation

  • MATLAB

  • Raspberry Pi Blockset

  • Simulink

  • Embedded Coder

  • Run generated code on Raspberry Pi and compares with Simulink simulation.

  • Validate functionality and performance.

For more information, see Validate Generated Code with Processor-in-the-Loop Simulation.

Deploy C/C++ code that runs as a standalone executable program on Raspberry Pi hardware.

Build and deploy code generated for a Simulink model on Raspberry Pi hardware

  • MATLAB

  • Raspberry Pi Blockset

  • Simulink

  • Embedded Coder

  • Generate C/C++ code from Simulink models and deploy to Raspberry Pi.

  • Generate standalone applications that run independently of the host computer.

For more information, see Deploy Standalone Applications from Models.

Analyze execution profile of deployed model.

Code execution profiling

  • MATLAB

  • Raspberry Pi Blockset

  • Simulink

  • Embedded Coder

  • Check whether generated code meets real-time performance requirements.

  • Use execution profiling results to enhance the design of your system.

  • Analyze execution time of deployed model running on Raspberry Pi to improve code for real-time and resource-constrained scenarios.

For more information, see Profile and Optimize Execution Performance.

See Also

|