
Recall first from ARA on Linux and determinism tools
- ARA defines application interfaces, while Linux enforces CPU scheduling and memory controls on a Linux-based deployment.
- CPU affinity restricts where a thread can run, while scheduling policy and priority govern when it can run.
- Memory locking keeps selected pages resident, and startup preparation can reduce page faults during timed work.
From system design to deployable software
3 min readThe last lesson placed ARA on top of Linux. This lesson answers how AUTOSAR models the system before code, and how ARXML expresses that model.
On Linux, a successful execve call shows that the operating system could load the selected program. For a native ELF executable, the ELF headers describe how to load that program. An integration team still has to decide which machine should run the program and whether the deployed configuration matches the application design. Those decisions matter even when the executable builds and starts successfully. AUTOSAR describes the development work behind them in its Methodology for Adaptive Platform.
The the AUTOSAR description of development activities and the work products they consume and produce gives teams a common way to describe that work. A work product can be a service interface description, a machine design, or a deployment description. Each can be reviewed and exchanged before a complete system is available. Model-based development means that tools can read these definitions and relationships directly, so a design decision can be checked against the configuration that uses it.
Consider a design with a temperature service and a monitor that consumes it. At system design time, the team identifies the function that supplies the data, the function that needs it, and the machines available to host the software. The service interface gives both teams a shared description of the interaction. Application design then describes how the monitor depends on that interface. The design can express that dependency before the integrator has selected the machine that will run the monitor.
Application development turns the design into software. Developers write the application behavior, and the build compiles and links the implementation and any generated code it uses. The result includes an executable for the target. The model continues to describe the application and its relationships during this work. A shared interface definition, for example, lets the teams review whether they agree about the service before they test the implementation on the vehicle.
Deployment integration adds the target-specific decisions. The integrator selects the application software and supplies the modeled configuration for the chosen machine and deployment. Manifest information describes those decisions in a form the Adaptive platform and its integration tooling can use. If the monitor is assigned to a different target, the integrator must revisit the deployment configuration and check that the built executable is compatible with the selected target. The service interface can retain its identity through that change.
Read the diagram as a dependency between work products. Development and integration can overlap. An application team can build against an agreed service interface while the system team refines the machine design. If integration reveals that an agreed definition must change, the team can revise the model and check the work products that depend on it. The methodology gives those teams a way to identify what to exchange and what to review at each step.
How to read an ARXML document
3 min readARXML is the XML representation of an AUTOSAR model. The document element is AUTOSAR. The default namespace in the example identifies the XML vocabulary. Under the root, AR-PACKAGES contains one or more AR-PACKAGE entries when packages are present. Each package has a SHORT-NAME. A package can place model definitions under ELEMENTS and can contain nested packages under its own AR-PACKAGES.
The entries beneath ELEMENTS are serialized with tags for their model types. For example, a service interface appears as SERVICE-INTERFACE, and an Adaptive application software component type appears as ADAPTIVE-APPLICATION-SW-COMPONENT-TYPE. An application type can contain ports, which are represented inside that definition. The XML tag tells you the kind of object you are reading. Its SHORT-NAME gives you the local model name assigned to that object.
Here is a teaching excerpt that shows the package structure and a reference. It omits the details of the temperature service contract.
<AUTOSAR xmlns="http://autosar.org/schema/r4.0">
<AR-PACKAGES>
<AR-PACKAGE>
<SHORT-NAME>Vehicle</SHORT-NAME>
<AR-PACKAGES>
<AR-PACKAGE>
<SHORT-NAME>Interfaces</SHORT-NAME>
<ELEMENTS>
<SERVICE-INTERFACE>
<SHORT-NAME>Temperature</SHORT-NAME>
</SERVICE-INTERFACE>
</ELEMENTS>
</AR-PACKAGE>
<AR-PACKAGE>
<SHORT-NAME>Applications</SHORT-NAME>
<ELEMENTS>
<ADAPTIVE-APPLICATION-SW-COMPONENT-TYPE>
<SHORT-NAME>Monitor</SHORT-NAME>
<PORTS>
<R-PORT-PROTOTYPE>
<SHORT-NAME>TemperatureInput</SHORT-NAME>
<REQUIRED-INTERFACE-TREF DEST="SERVICE-INTERFACE">/Vehicle/Interfaces/Temperature</REQUIRED-INTERFACE-TREF>
</R-PORT-PROTOTYPE>
</PORTS>
</ADAPTIVE-APPLICATION-SW-COMPONENT-TYPE>
</ELEMENTS>
</AR-PACKAGE>
</AR-PACKAGES>
</AR-PACKAGE>
</AR-PACKAGES>
</AUTOSAR>
Start at the target of the reference. Its local short name is Temperature. The full reference text is /Vehicle/Interfaces/Temperature. The leading slash makes this an absolute model path. Read it as the top-level package Vehicle, its child package Interfaces, and the service interface Temperature in that package. XML containers such as AR-PACKAGES and ELEMENTS contribute no path segments. The XML document root contributes no segment either. In the same way, the path to the port is /Vehicle/Applications/Monitor/TemperatureInput. The named application type contributes a segment, while PORTS simply groups the port definitions in XML.
Look next at the source. TemperatureInput is the short name of the required port. Its REQUIRED-INTERFACE-TREF identifies the interface used by that port. The path text gives the target's location in the model, and the DEST attribute gives its AUTOSAR type. For this reference, the resolver needs a service interface at the stated path. A different model object at that path would fail the type check. A second Temperature definition in another package would have a different absolute path and could be selected independently.
A useful review is to write the target's path from its containment, then compare that result character for character with the reference text. If you rename Interfaces to SharedInterfaces, the target path becomes /Vehicle/SharedInterfaces/Temperature. References to the former path need updating even though the target still has the same SHORT-NAME. Renaming the ARXML file that holds the definition has no effect on this model path when the content and imported model stay the same.
Compact and split ARXML exports
3 min readGoing deeperFile layout and model identity
An integration export can keep related manifest model content together in a compact ARXML file or distribute it across multiple ARXML documents. Here, compact means grouped into fewer files. Both layouts use the same AUTOSAR XML vocabulary. The file layout is a serialization choice, within the constraints of the AUTOSAR release and the toolchain. The manifest's role comes from the configuration it describes. Counting XML files alone cannot tell you which manifest information the export contains.
In a split-per-artifact workflow, a team can exchange separate ARXML files for interface definitions, application descriptions, and deployment configuration. Each file is an XML document with its own AUTOSAR root. In the example, an interface document can contain Vehicle/Interfaces, while an application document contains Vehicle/Applications. Both documents would include the enclosing Vehicle package. When the importer combines the package contents, Vehicle is one logical package with two child packages. The reference text in the application can remain /Vehicle/Interfaces/Temperature.
The importer resolves an absolute reference against the assembled model. The reference can cross into a different package in the same document or into a package supplied by another document. If the application document is imported without the interface document and the target is absent from the rest of the model, the reference is unresolved. If the interface document is included but its model content places Temperature in a different package, the old reference is still unresolved. The filename gives no information about which of those cases occurred. Check the actual package contents and the complete set of import inputs.
The AUTOSAR XML Serialization Rules describe how the model is represented in XML. Keep package merging separate from the rules for splitting model objects. Several documents can contribute different definitions to one logical package. Two exports that define the same object at the same path can instead produce a duplicate or a conflict. Combining fragments of an individual object requires the relevant AUTOSAR splitting rules and tool support. A split-per-artifact workflow can avoid that extra dependency by assigning each complete definition to one owning export and importing each required export once.
Validation also has distinct stages. An XML parser can check that each document is well formed. A schema validator can check the permitted tags, attributes, and structure for the selected schema. A tool that understands the AUTOSAR model must check whether a reference reaches an object of the expected type in the assembled model. A missing interface file can leave the application XML well formed while making its model incomplete. That distinction explains why an import can fail after a document passes its XML checks.
The next lesson, The Machine and Execution manifests, examines what those two manifests describe. The model hierarchy and reference rules you learned here will help you follow the definitions and see how the deployment configuration relates to the executable.
Key takeaways
- The AUTOSAR Methodology describes development activities and the work products they exchange.
- Adaptive deployment combines executable software with manifest information derived from the model.
- An absolute AUTOSAR reference uses model short names and identifies a target whose type must match the reference.
- The same logical package can span several ARXML files, and references are resolved against the imported model.
Reflect
- Explain to a colleague, in two sentences: trace the outputs of system design, application development, and deployment integration.
- Which objective are you least sure about? Re-read that section, then do its exercise in the practice pack.
- What surprised you when you ran the commands yourself?
On a real board
Repeat the key commands on your Raspberry Pi or lab board over SSH or the serial console. Note anything that behaves differently from your PC, such as missing tools, a BusyBox shell or a read-only filesystem.
References and further reading
- Man pageexecve(2): execute program
- Man pageelf(5): format of Executable and Linking Format files
- SpecificationAUTOSAR AP R24-11: Methodology for Adaptive Platform
Official documentation first. Links checked when the lesson was published.