Inside Access – Porting Android Automotive to Toradex i.MX8 Platform
Android has been a popular choice of operating system to power connected devices and applications for more than 10 years. And with the introduction of Android Automotive, the familiarity, ease of use and exceptional performance offered by the Android platform can be filtered into in-vehicle infotainment systems effortlessly.
So, What is Android Automotive?
Android Automotive is an Android operating system that is capable of powering futuristic automotive IVI systems and digital cockpits. It can run pre-installed infotainment applications (Android based) and several third-party applications.
We have already touched upon the various benefits this platform offers in our previous articles.
In this article we will focus on an interesting infotainment project that our IoT team have been working on recently – Porting Android Automotive OS (AAOS) to Toradex i.MX8 and i.MX8X.
The Initial Stages
Toradex has a wide range of SOMs and we picked two of the most appropriate ones for our infotainment development project – Apalis, Colibri modules based on NXP’s most recent and advanced i.MX8 & i.MX8X SoCs, respectively.
Since the Colibri SOMs are pin compatible, applications developed on them are easily scalable, while also being cost-effective. Apart from being scalable, Apalis SOMs are suitable for developing robust products that offer supreme performance with a compact form factor.
Porting Android Automotive OS
NXP provides highly optimised Board Support Packages (BSPs), codecs and Middleware for product development that massively cut down on time to market. This is achieved through the integration of components such as Vehicle Hardware Abstraction Layer (HAL), Security and Device Connectivity. These BSPs are also tested extensively to pass the Android Compatibility Test Suite (CTS).
We found that in case we plan to go for the certification of our device in the future, we will be at an advantage if we port the base version of AAOS from NXP.
Hence, here are the steps we followed
- To start with we successfully ported Android Automotive 11.0.0_2.1.0 (Linux 5.10.35 Kernel) with FreeRTOS running on the M4, with communication well established between ARM and M4 cores. This is a very important step to handle critical use cases and follow the guidelines provided by governments of different countries.
- With M4 cores present within the SoC, various critical functionalities were integrated. This included:
- Early Rear View Camera (RVC) start up (<2s)
- Power management with interesting wakeup options such as CAN, GSM/GPS to facilitate huge number of telematics functionalities
- Utilize the Vehicle HAL (VHAL) of the AAOS using RPMSG communication with FreeRTOS .
- Audio support with minimum driver’s support, so that critical use cases such as playing different audio chimes can be achieved.
Note – VHAL is one of the several Hardware Abstraction Layers present in the recent Android specifically to handle the numerous vehicle parameters coming from the CAN bus. And the AAOS gives the handshake of the layer directly to FreeRTOS running in the M4, which results in saving time and power while improving overall efficiency.
Some of the interesting functionalities we covered in this project are as follows:
- We were able to incorporate increasing serializer deserializer requirements to expand the length of cables for essential components such as Displays and cameras in the car. On our platform it is possible to integrate as much as 8 cameras outside the car for RVC, SVC and 360-degree coverage.
- We validated various wireless modules including embedded stack within the chipset to assist Bluetooth headset for the user at times.
We are currently working on the validation aspects of Android Auto, CarPlay, Audio Video Bridging (AVB) and Automotive Audio Bus (A2B).
The Road Ahead
We intend to migrate to newer releases like AAOS 12 and 13 in the future. Our team is also working on the concept of creating a single Android Automotive solution that incorporates various automotive applications (automotive cockpit features, rear seat entertainment, etc.) on a single platform.
Why Android Automotive is Miles Ahead of its Competition
Android Automotive is a great platform for automotive OEMs developing vehicles ranging from large trucks to small cars, three-wheelers and two-wheelers. The platform enables the accelerated development of automotive applications.
Android Automotive can be customized to be used with all automotive protocols such as CAN, LIN, GPIO, etc. It has properly defined architecture to implement applications; so, there is no additional cost for selecting HMI frameworks. This also reduces the cost and time for licencing, support, and porting.
Here is a list of features that Android Automotive offers with minimum customization requirements:
- Vehicle Communication
- Radio and Media
- Dash Camera etc.
Audio system configuration for multiple zones is also possible with Android Automotive.
In a nutshell, Android Automotive is an inimitable platform for the development of next-gen connected vehicles.