Basics of Code Generation

preview_player
Показать описание
Spend more time on algorithm development and less time manually producing code. With the click of a button, you can bring algorithms to C/C++ code and hardware with code generation. Christoph Hahn and Application Engineer Andreas Uschold, both of MathWorks, walk through the basics of code generation and the tools available to simplify and speed up the process.

Code generation tools are a great alternative to manual coding, which is time consuming and error prone. There is a benefit to having the entire process in one tool chain where, for example, an electrical Formula Student team developing vehicle dynamics controllers, such as torque vectoring, can bring it to its CPU as quickly as possible.

Andreas depicts a typical industry workflow for code generation using the Design V, which is a design workflow used by many automotive companies. Looking at this in Simulink®, the example shown is a typical, closed-loop control system with a controller and a piece of hardware you want to control. To generate code out of the system, you simply press a button in MATLAB® and Simulink and get C/C++ code. The generated code complies with the ANSI ISO C standard and is as readable as good manual generated C code.

Having the code does not mean it is running on the hardware so Andreas then gives an overview of hardware support packages and their benefits. Hardware support packages are available for different hardware platforms and enable you to embed and deploy your code.
Ultimately, Model-Based Design helps detect bugs early and speeds up the development process. This is a great overview of code generation and we will go into the individual steps in more detail in future episodes.

Below are links to software and hardware products and services mentioned in the episode:

Рекомендации по теме
Комментарии
Автор

Can you show a simple example so that I can understand the workflow of simulink and embedded generation..?

deepakl
Автор

1:58 there's a laughing sound in the background, great work environment <3

TVbr
Автор

This was actually really helpful, thank you!!

SpaceSurferGod
Автор

Hi,
I am have to generate a Simulink model that uses inputs and informations of another Simulink model with Matlab Code.
Thanks in advance for your suggestions.

hogmasarra
Автор

Sadly none of this is available for Matlab's home license owners

prashkd
Автор

there is zero chemistry between these two guys :) a very beneficial presentation nonetheless.

bocckoka
Автор

hi great video, anyone knows how to get rsim.tlc? for doing rtwbuild(model), I do not have simulink coder or matlab coder, just matlab and simulink. thanks!

cbasile
Автор

I don't know why at 0:32 if that was suppose to be sarcastic lol

hothead
Автор

Hi, really it is very helpful and easy to understand video. could you please like to give me the answer of my question. when I using plot command, figure appear without line/plot. MATLAB 2015a my info is as:
>>opengl info
Version: '1.1.0'
Vendor: 'Microsoft Corporation'
Renderer: 'GDI Generic'
MaxTextureSize: 1024
Visual: 'Visual 0xc2, (RGB 24 bits (8 8 8), Z depth 16 bits, Software, Single buffer, Antia...'
Software: 'true'
SupportsGraphicsSmoothing: 0
0
SupportsAlignVertexCenters: 0
Extensions: {3x1 cell}
MaxFrameBufferSize: 0

dr.engr.shahzad
Автор

I hate how you all ruined the fun part of Embedded Systems. You automated writing Control Algorithms in C/C++ and interfacing it within the microcontroller, ruining everything for me. I wanted to do this myself yet you all had to take that away. Now that you’ve destroyed any sort of fun I would have had with this, there’s no point in getting a job in Embedded Systems/Robotics if you’re going to take everything that’s fun away from those who want to write those control algorithms themselves. Time to look into another career field now.

supersonicstyleatsonicspeed
Автор

ihr könnt deutsch sprechen, bin auch deutsch ;)

dionblaster