Autosar interface for handwritten

1.6k views Asked by At

I'm new to Autosar.

I was asked to implement Autosar interface for hand written code, create RTE and ARXML files, and send Arxml file to other group.

I have two runnables in my code. Let's say for example interface variables (inputs) X and Y, and we have output as Z: here my code:

global X;
global Y;
global Z;

Runnable_Step()
{
    Z = X + Y;
}
Runnable_Init()
{
    X =0 ;
    Y =0;
    Z =0;
}

I guess, my question where and how to start? we have Autosar DaVinci Developer and Autosar DaVinci configurator.

1

There are 1 answers

4
Markus Brenner On

Your question is quite general in nature and can not be answered in a few lines. However, I try to give a general answer which may help other people to orient themselves in AUTOSAR development with Vector DaVinci.

Generally in DaVinci you have the following work split between tools:

  1. DaVinci Developer is used for modeling Application Component(s), Interfaces, Data Types etc. You also can run the RTE generator for generating "Contract Phase" artifacts.
  2. DaVinci Configurator is used for integrating/configuring the ECU (Electronic Controll Unit). In an Application Developer's scenario it is typically used for generating the RTE that will actually be built into the final image.

In practice, the transition between these two tools often is fluid: You enter some information in Configurator (for example signals in the CAN Stack), then switch over to Developer for mapping the signals to your component instance's ports, then switch back to Configurator in order to configure and generate the production RTE.

You should start with thinking about how the AUTOSAR model for your task will look like. This includes the following aspects:

  • Which Data Types will be used?
  • Which Interfaces will be used (SenderReceiverInterface, ClientServerInterface)
  • Which Software Components do you need? Add the required Port Prototypes, using the Port Interfaces you defined in the previous step
  • Which resources does you SW Component need from the RTE? You add these to the "Internal Behavior" of the Component. In particular, these are Runnable Entities, but there are also Read/Write dependencies to the ports that need to be considered.
  • Integrate your new Software Component into a top-level composition.

Creation/Editing of these elements is done in Developer. Based on the work done so far you should be able to generate the "contract phase" RTE header files and C-language implementation stubs. You then can proceed to implement your runnable entities by adding code to the provided stubs.

Next, you will probably need to switch over to Configurator in order to configure the ECU your application should run in. If your work is based on an existing ECU, you will just add to the existing model. If you do not have an ECU project yet, you need to create one and typically populate it with the communication aspects of the model. This can be done either by importing a communciation extract or a CANdb file (Vector's proprietary CAN configuration format).

Switching back to Developer, you may deploy your Software Component onto the ECU, and also map its ports to the signals known by the ECU.

Finally, return to Configurator, optionally configure Basic Software and generate the RTE. It may be a lengthy process to get all BSW modules and parameters right in order to pass the RTE generator's validation process.

Once you managed to generate the RTE, you start the build process, and off you go!

Be sure to consult the AUTOSAR documents at https://www.autosar.org/