EMBEDDED CODER FOR C & C++
Presented By:-
Aditya Choudhury
What are MATLAB & Simulink?
Simulink Example
Automatic Code Generation
13
• C/C++, VHDL and PLC-Code Generation
from one model
• Support for Fixed Point Data Format
• Automatic scaling
• Supported in Simulation and Code-Generation
• Easy integration of legacy C/C++-Code
• System development independent
of the target
DSP FPGA ASIC
Embedded
Software
Digital
Electronics
C, C++ VHDL, Verilog
MCU
Embedded Coder
(C, C++)
DSP & µC FPGA &ASIC
HDL Coder
(VHDL, Verilog)
PLC
PLC Coder
(Structured Text)
Supporting Freescale Cup Teams
14
 Complimentary Software: 25 products
 Complimentary Learning Resources
 Freescale FRDM-KL25Z Board target
Complimentary Software
15
Complimentary Software from the MathWorks
16
 MathWorks sponsors the Freescale Cup
• MATLAB
• Simulink
• Stateflow
• Control System Toolbox
• DSP System Toolbox
• Embedded Coder
• Filter Design HDL Coder
• Fixed-Point Designer
• Global Optimization Toolbox
• MATLAB Coder
• Neural Network Toolbox
• Optimization Toolbox
• Signal Processing Toolbox
• SimDriveline
• SimElectronics
• SimMechanics
• SimPowerSystems
• Simscape
• Simulink Coder
• Simulink Control Design
• Simulink Design Optimization
• Simulink Design Verifier
• HDL Coder
• Simulink PLC Coder
• Simulink Verification and Validation
Getting Started Page
mathworks.com/academia/getting-started.html
 Discover resources for Freescale Cup
 Learn how MATLAB and Simulink are
used in academia
 Get software for your team
mathworks.com/freescale-software
mathworks.com/academia/
freescalecup@mathworks.com
Freedom Board Automatic Code Generation Target
21
Embedded Coder Support Package
for Freescale FRDM-KL25Z Board
22
 Integration of the GNU-ARM Toolchain
 Automatically:
1. Generates C code
2. Compiles code
3. Loads binary to hardware
 Now: Beta Phase.
Get via freescalecup@mathworks.com
 July: available as Target Support Package
Demo – Getting Started
23
Blink an LED
 Create a New Model
 Set it up for the Freescale Target
 Add Blocks
 Generate code
 Deploy to the hardware
Freescale Cup Blocks
24
Demo – Simulation to Deployment
25
 Analyze a simple Proportional Controller
 Test the algorithm without the hardware
 Generate and Compile C code
 Upload resulting binary onto the hardware
What about the code I have already written?
26
Class
Definitions
FunctionsMATLAB
Code
Simulink
Block

Emeded coder

  • 1.
    EMBEDDED CODER FORC & C++ Presented By:- Aditya Choudhury
  • 2.
    What are MATLAB& Simulink?
  • 3.
  • 4.
    Automatic Code Generation 13 •C/C++, VHDL and PLC-Code Generation from one model • Support for Fixed Point Data Format • Automatic scaling • Supported in Simulation and Code-Generation • Easy integration of legacy C/C++-Code • System development independent of the target DSP FPGA ASIC Embedded Software Digital Electronics C, C++ VHDL, Verilog MCU Embedded Coder (C, C++) DSP & µC FPGA &ASIC HDL Coder (VHDL, Verilog) PLC PLC Coder (Structured Text)
  • 5.
    Supporting Freescale CupTeams 14  Complimentary Software: 25 products  Complimentary Learning Resources  Freescale FRDM-KL25Z Board target
  • 6.
  • 7.
    Complimentary Software fromthe MathWorks 16  MathWorks sponsors the Freescale Cup • MATLAB • Simulink • Stateflow • Control System Toolbox • DSP System Toolbox • Embedded Coder • Filter Design HDL Coder • Fixed-Point Designer • Global Optimization Toolbox • MATLAB Coder • Neural Network Toolbox • Optimization Toolbox • Signal Processing Toolbox • SimDriveline • SimElectronics • SimMechanics • SimPowerSystems • Simscape • Simulink Coder • Simulink Control Design • Simulink Design Optimization • Simulink Design Verifier • HDL Coder • Simulink PLC Coder • Simulink Verification and Validation
  • 8.
    Getting Started Page mathworks.com/academia/getting-started.html Discover resources for Freescale Cup  Learn how MATLAB and Simulink are used in academia  Get software for your team mathworks.com/freescale-software mathworks.com/academia/ freescalecup@mathworks.com
  • 9.
    Freedom Board AutomaticCode Generation Target 21
  • 10.
    Embedded Coder SupportPackage for Freescale FRDM-KL25Z Board 22  Integration of the GNU-ARM Toolchain  Automatically: 1. Generates C code 2. Compiles code 3. Loads binary to hardware  Now: Beta Phase. Get via freescalecup@mathworks.com  July: available as Target Support Package
  • 11.
    Demo – GettingStarted 23 Blink an LED  Create a New Model  Set it up for the Freescale Target  Add Blocks  Generate code  Deploy to the hardware
  • 12.
  • 13.
    Demo – Simulationto Deployment 25  Analyze a simple Proportional Controller  Test the algorithm without the hardware  Generate and Compile C code  Upload resulting binary onto the hardware
  • 14.
    What about thecode I have already written? 26 Class Definitions FunctionsMATLAB Code Simulink Block