A large part of developing an AUTOSAR ECU is the configuration of the Basic Software (BSW, i.e. the AUTOSAR “operating system”). All the parameters that can be configured are defined in the so-called “AUTOSAR parameter definition”. This includes hundreds, if not thousands of parameters for the configuration of the basic software modules.
There are a number of editors for the actual configuration of the values. Some of these work by reading the parameter definition and providing a user interface dynamically based on the defined parameters. So the ECU configurator does have graphical tools for his work.
The parameter definition itself, however, is often written with XML editors. AUTOSAR XML however is very verbose and often not really suited for human editing and inspection. Creating a textual editor with Xtext is often a good solution to provide comfortable editing. So we did a prototype for the schema definition editor based on Xtext and ARTOP.
Here is a small example of a definition for non-volatile RAM:
Using Xtext and Artop we have a number of benefits:
- We work directly on the AUTOSAR model. We do not need a custom temporary model that we map to AUTOSAR
- With a few lines of code, we save the parameter definition in the Xtext notation above as well as in correct AUTOSAR .arxml
- We see the full parameter definition structure directly in Artop
<?xml version="1.0" encoding="UTF-8"?>
<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 autosar_4-0-3.xsd">
What are the use cases? Obviously, this could be used by teams that provide the parameter definitions for the basic software. In addition, projects might want to define their own parameter definitions that hold additional data for the development process and should be stored in an AUTOSAR-compliant way – e.g. for being editable by the generic editors mentioned above.