Embedded Coder generates portable ANSI/ISO C/C++ code by default and thus works on any processor or board. The end user simply needs to specify the processor’s word sizes since ANSI/ISO C does not define this, generate portable code for their algorithms with an appropriate function call interface, and integrate that code into their basic software framework. Embedded Coder also offers a variety of features and APIs that end users can leverage to customize and optimize the generated code for their particular embedded hardware and software environment (see example 1 below). For some hardware devices, MathWorks and Third-Parties leveraged these features and APIs to create turnkey solutions that can be downloaded as hardware support packages (see example 2 below).
Example 1: Supporting any hardware through algorithmic code generation
1. Specify your processor’s word sizes:
2. Optimize Generated Code Using Code Replacement Libraries (optional step)
3. Integrate the generated code with your hand coded custom software framework
Example 2: Supporting any hardware through full executable code generation
1. Check for existing developed hardware support packages from MathWorks and third-parties
2. If none exists, build you are own using ARM Cortex Target guide or general targeting approach, build your own support package
Example 3: Use MathWorks services as means to develop a customized solution for you hardware