Overview of Workflows | Deploy C Code to STM32 Nucleo Using Embedded Coder - MATLAB & Simulink
Video Player is loading.
Current Time 0:00
Duration 3:23
Loaded: 4.86%
Stream Type LIVE
Remaining Time 3:23
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected
    Video length is 3:23

    Overview of Workflows | Deploy C Code to STM32 Nucleo Using Embedded Coder

    From the series: Deploy C Code to STM32 Nucleo Using Embedded Coder

    Learn the benefits and typical applications for using a rapid prototyping workflow or an algorithm export workflow in your R&D or production project.

    Published: 12 Sep 2021

    This video will demonstrate deploying C code to the STMicroelectronics STM32 with MathWorks Embedded Coder and the Nucleo Board Support package. Thanks for joining us. First I'll explain to workflows to deploy C code on the STM 32. And then we'll do a quick demo of each of these workflows that both implement similar functionality on the board. The first workflow is Rapid Prototyping, which allows you to go from Simulink model to code running on the STM 32 hardware, including peripheral drivers and scheduler, in one click. The other workflow is Algorithm Export, which lets you generate customizable C code and import it into the tool chain of your choice for use with your existing peripheral drivers and software infrastructure.

    These two workflows are best suited for different situations. Rapid Prototyping is great for projects in the R&D phase where a controls engineer wants to run an algorithm on real hardware as easily as possible and collect data to evaluate its performance. This method can even be suitable for low-volume production projects. We'll show this with the Nucleo Board Support package. The other option, Algorithm Export, caters to high-volume production projects or ones with significant hand code infrastructure that will integrate the exported Simulink algorithm code. Now, this option takes advantage of Embedded Coder's flexibility to produce code that conforms to your interface, data storage, and style preferences.

    In addition, MathWorks offers several other related features that we won't discuss in this video but we wanted to point out, such as processor-specific optimizations and processor in a loop capabilities. Also, beyond the Nucleo Board Support package, we also offer one for the ST Discovery, another for any ARM Cortex-M without peripheral support, as well as numerous other hardware support packages discussed on our website.

    Now, when we talk about Rapid Prototyping, we mean taking a Simulink algorithm model, adding blocks which correspond to peripherals on the target board, and using the one-click Build and Deploy feature to run it on the board with live tuning and data collection in MATLAB and Simulink. The Algorithm Export option uses the same Simulink algorithm model, but instead of peripheral blocks, input and output port blocks are used to pass data in and out of the generated C function. The automated build process results in C and H files that can then be included in the existing hand code and deployed to any STM32 processor using a standard tool chain, such as CubeMX and IAR Embedded Workbench. We'll show you how this works in the two videos that follow.

    Now, in summary, Rapid Prototyping simplifies and speeds up your algorithm design and testing on hardware, while Algorithm Export allows you to flexibly deploy your algorithm to any STM32 processor using your existing toolchain. In both cases, though, you can reuse the same algorithm you developed in Simulink. There are some helpful additional links noted here, and as always, you can reach out to the MathWorks sales and application engineering team for more information. Thanks for watching.

    Up Next:

    View full series (3 Videos)

    View more related videos