MATLAB: Can I Generate AUTOSAR code for a specfic ECU

Embedded Coder

I am trying to generate AUTOSAR code for a software component.
Can I configure Simulink in such a way that the generated code is optimized for a particular ECU (similar to the Hardware Implementation pane in configuration parameters) ?
Are there pre-configured ECU hardware or bareboards that one can apply the ASWC directly to without the need to use 3rd part tools to configure?

Best Answer

In theory, AUTOSAR is a 3 layer framework that consists of an application layer, a Runtime Environment Layer and a Basic Software Layer and all 3 of these layers reside on top of the actual ECU Hardware layer.
In a sense, you are enquiring about ECU level optimization. However, MathWorks AUTOSAR Code Generation is applied to is the Application Layer where we can generate code for a Software Component. Please keep in mind that the Application layer is agnostic to the Board Specific (ECU based) features. Stating another way, Application Software components should be free of anything having to do with specific ECUs or Microprocessors or anything that resides at the chip / controller level (or ECU hardware layer).
The Basic Software layer is where this board, processor or ECU level specific functions would exist. Since MathWorks primarly generates code at the application layer, the Code is ISO / ANSI C generic code that does not have the ability to be optimized for the specific target at hand.
So the answer to this question is no, It is not possible to make the AUTOSAR code to be target specific at the application layer which is code that we generate for.
However, you can set the Hardware Implementation settings in the model to be any processor you would like. This does have some effect on math operations but since most of the data access is through get set functions and the application layer is relatively agnostic to the Basic Software layer, it may or may not make much difference.