0

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.

np2807
  • 1,050
  • 15
  • 30
H. Gahni
  • 9
  • 2

1 Answers1

1

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/

  • Well, Thanks Markus Brenner, that is very helpful. I meant to make my question general to know where to start. Here some more details: my function is around 20,000 lines, and is called by another function created by different group. my code is a black box for the other group, I usually sending obj file with interface defined on header file, and they compile their code and link with my obj. Here an example: my_func () { read_interface_from_othergroup; my code .. write_interface_to_othergroup; } othergroup_func() { call func1(); ... call my_func (); .. call funcX(); } – H. Gahni Oct 22 '20 at 15:55
  • In this case, the other group has to deal with ECU interface, correct? I want to use Autosar interface on my function, to create RTE and ARxml files with interface (names, datatypes, scales, software component), and then send to othergroup OBJ file + ARxml files. on the their side, they will use my ARxml files to create RTE file. Then both sides to include this RTE file to get all interface variables connected. – H. Gahni Oct 22 '20 at 16:01
  • I already done this on other project but I was using Matlab Simulink model, changing to Autosar interface was easy using Simulink, it creates the RTE file and Arxml file for me with all receiver ports and sender ports, and send the obj file and ARxml files to the other group. it works fine, and I want to do same thing but on handwritten code. – H. Gahni Oct 22 '20 at 16:01
  • Please correct me if I'm wrong, In my case, I need to use DaVinci Developer only, correct? In the developer, need to add the SenderReceiverInterface ports with data type and define SWC, (not to use ClientServerInterface). I'm only using one SWC. based on this, Developer will build modeling Application Component. Then, generate "contract phase" RTE header files, and add my code to this model. – H. Gahni Oct 22 '20 at 16:02