Thursday, October 7, 2021

MCAL Integration

========================================================================================================
This blog is about understanding of MCAL definition, different modules, Configuration and Integration process
========================================================================================================

Table of contents
  1. What is MCAL?
  2. How to integrate MCAL in the vector product as 3rd Party software?
  3. Configuration and Code Generation for AUTOSAR MCAL Drivers
  4. AUTOSAR MCAL Driver Development
========================================================================================================

What is MCAL?

MicroController Abstraction Layer (MCAL) is a software module that enables direct access to on-chip MCU peripheral modules and makes the upper software layer independent of the MCU.
MCAL is located in the lowest layer in the AUTOSAR architecture. which makes the higher level software independent of a microcontroller.

Figure 1 : AUTOSAR architecture



Figure 2: MCAL Module detail


========================================================================================================

How to integrate MCAL in the vector product as 3rd Party software?

This is most important step for starting the Autosar project.  whoever working on the BSW configuration and Integration should know the MCAL integration because every new SIP (software -Integrated-Package) from vector needs the MCAL Integration. 

First Step: after the SIP installation, we should go to 
<installed drive C:\>Vector\<SIP-name>\Doc\TechnicalReferences 
search 'TechnicalReference_3rdParty-MCAL-Integration.pdf" document.

Second Step: in the Technical reference document  each and every steps mentioned.  
follow the steps before proceed further please install all the required microcontroller vendor packages in the local PC. such as MCAL/base packages', EB tool.

Third step:  Go to  C:\Vector\<SIP Name>\ThirdParty\Mcal_<MCU_Name>\VectorIntegration
Run the Script_MCAL_Prepare. bat file 
 Enter the command "--prepare" and Press "Enter"


Fourth step:  select the "MCAL\Base package" and select the path to be installed.  click "Start"
Fifth Step: select MCU derivatives  click "Copy files" and click "Ok"

in very simple steps we can complete the integration in the vector SIP. 


========================================================================================================

Configuration and Code Generation for AUTOSAR MCAL Drivers using EB tresos

Prerequisites:
  • Download MCAL modules SRS and SWS  from autosar.org and go through it.
  • SWS spec contains the requirements of driver. we can see SWS spec for each MCAL module such ADC, DIO, PWM ..etc.
  • Configuration of MCAL means we need to configure set of parameters in the driver module for example MCU  module configurations are McuClockSettingConfig,  McuClockSrcFailureNotification, or clock reference.
  • Tools used for MCAL configuration and code generation is EB tresos.
Step 1: Install EB tresos
Step 2: Install EB MCAL plugins
Step 3: Create a new EB tresos project for MCU,  File->New->Configuration Project


Step4:  Provide the Project name and location and click next


Step 5: Provide ECU Id and  Target 


Step 6: Select the modules and finish


Step 7: Double click on the required module and start configure the parameters


Step 8: Export the module. it will generate configured  .arxml files. these files can be used for MCAL code generation.


========================================================================================================

AUTOSAR MCAL Driver Development

MCAL Driver Development activity contains develop static code of the driver by using Autosar MCAL specification  and microcontroller user manual or any specifications related to microcontroller. 
for this activity microcontroller vendors can support for Hardware spec or pin diagram or peripheral details.

Below picture shows the TC2xx MCAL driver development.


========================================================================================================

References


========================================================================================================

Thanks for visiting the post..!!

========================================================================================================

No comments:

Post a Comment