MATLAB Answers

regarding .bin file generation

2 views (last 30 days)
Sriharsha on 24 Feb 2012
I want to generate a .bin file from a simulink model.
Can any one help me in doing so?

Answers (1)

Kaustubha Govind
Kaustubha Govind on 24 Feb 2012
I'm not sure what compiler tools are needed to produce the .bin format that you require, but you can generate standalone C/C++ code from your model using Simulink Coder and then use one of two techniques:
  1. If this only needs to be done for one model, manually grab all the header, source and library files needed for standalone compilation using the packNGo utility. You can them manually compile the code in whatever IDE you chose to produce the required binary format.
  2. If you need to automate the process for multiple models, you may need to customize the code-generation of build process. If your binary is only meant for execution on the same platform as where the code was generation from the model, you probably need minimal modification of the generated code, so you can customize the build rules used by Simulink Coder to have it generate a .bin instead. See Customizing Template Makefiles and select the customized TMF on the Code Generation pane of the Configuration Parameters window of the model before you generate code.
Also, I recommend that you first try #1 before attempting #2, so that you get a good idea of what needs to be automated.

Community Treasure Hunt

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

Start Hunting!