Ground Embedded KO Subscribe

Notes / Automotive Software

AUTOSAR overview: BSW, RTE, SWC

The standard structure of automotive software. The RTE connects the BSW, close to the hardware, with the SWCs that hold the functions.

GROUND EMBEDDED · NOTEAutomotive Software 03AUTOSAR overviewCAN_HCAN_LEngineABSBMSClusterGateway

Layers

SWCapplication softwareRTEthe connecting layerBSWcomms, diagnostics, memoryMCALMCU
The layers of AUTOSAR Classic. Application software sees only the RTE and knows nothing of the hardware.
Layer Contents
SWC (application) Function logic. Knows nothing about the hardware
RTE Connects SWC to SWC and SWC to BSW with generated code
BSW services Communication (COM, PduR), diagnostics (DCM, DEM), memory (NvM), OS
ECU abstraction Hides the board configuration
MCAL MCU drivers (DIO, ADC, PWM, CAN)

How the work goes

  1. In system design, define the SWCs and their ports (the data they exchange) in ARXML
  2. Configure the BSW modules with tools (Vector DaVinci, EB tresos)
  3. Generate the RTE and BSW code
  4. The developer writes logic inside the SWC's runnables (functions called periodically)
void SpeedCtrl_Run10ms(void) {
    uint16 spd;
    Rte_Read_VehSpd_Value(&spd);
    Rte_Write_TrqReq_Value(calc_torque(spd));
}

Classic and Adaptive

  • Classic: MCUs, static configuration, real-time ECUs
  • Adaptive: high-performance SoCs, POSIX OS, service-oriented communication (SOME/IP), dynamic deployment

In industry, ASW development mostly handles SWC logic (in many cases code generated from Simulink models), and BSW development handles the configuration and integration of communication, diagnostics and drivers.

FREE PDFGet the 3 free ebooksIf you want to keep reading this topic as one book: BLDC motor control, serial communication and sensors at book length. PDFs are in Korean.Get them free →