Problem using SIMULINK coder

3 views (last 30 days)
Mohammed Manna
Mohammed Manna on 16 Jul 2013
I have MATLAB and SIMULINK trial product with SIMULINK coder and cannot seem to get the SIMULINK coder to generate C/C++ code for me. I have a very simply model that I started with and tried to read the User Guide for SIMULINK coder. It is really confusing and not very clear and straightforward. Surely, I expected a step-by-step guide on how to use the features of SIMULINK code generation.
STEPS TO RECREATE MY SIMPLY MODEL FOR CODE GENERATION =====================================================
1. Use 3 input ports to an adder having 4 inputs.
2. Use the Sum as an input back to the 4th input of the adder.
3. Use an output port to the output of the adder.
MY ATTEMPT TO GENERATE C/C++ CODE FROM IT =========================================
1. Clicked Tools > Model Explorer.
2. Clicked on Configuratio (active) from "Model Hierarchy" pane.
3. On the right-hand pane, selected solver. Edited teh Type to be Fixed-Step, Solver to be discrete, and Fixed-Step Size to be .001.
4. Selected Hardware Implementation. Chosen Device Vendor to be Generic, Device Type to be 32-bit x86 compatible, Largest Atomic sizes to be compatible with Int and Float.
5. Selected Simulation Target. Chosen Incremental Build and clicked Execute.
NOTHING HAPPENED!
AND IF YOU GO AND SEE THE USER GUIDE, IT DOESN'T REALLY TELL YOU EXACTLY HOW TO GENERATE THE CODE!
I am using R2013a with SIMULINK coder 8.4. If anyone has a step-by-step tutorial on how to do it, please post it for me.
Thanks in advance,

Accepted Answer

Eshwar
Eshwar on 16 Jul 2013
Edited: Eshwar on 16 Jul 2013
You can find several examples in the documentation for using Simulink Coder to generated C code from your model. This one is a good start, and you can find more examples here.
You will also have to use a supported compiler with MATLAB. Be sure to run >> mex -setup after installing one of the supported compilers on your system.
If you are facing any specific error, please paste the entire message here.
  1 Comment
Mohammed Manna
Mohammed Manna on 22 Jul 2013
I did not get the MATLAB/SIMULINK/Embedded Coder products with my trial :p....consulted an application engineer in Mathworks UK

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!