Appendix
What You Will Do
This appendix is reference material, not a chapter you follow along with. Use it to review your design or to find which value belongs to which chapter.
All Values
Chapters 1 to 3
| Chapter | Element | Value |
|---|---|---|
| System | Project, ECU node | VehicleDesign, ECU (from the AUTOSAR System Tutorial) |
| 1 | Composition (NAME, AS PROTOTYPE) | ECU, mapped to ECU [ECU] |
| 2 | Data type | SpeedType, ALIAS, BASETYPE uint16 |
| 3 | Sender-receiver interface | IfSpeed, data element speed of SpeedType |
| 3 | Client-server interface | IfScale, operation GetScale, argument scale, OUT, SpeedType |
Chapters 4 and 5
| SW-C | Port | Kind | Interface | Setting |
|---|---|---|---|---|
SwcSensor | PpSpeed | PPort | IfSpeed | NON-QUEUED |
SwcSensor | RpScale | RPort | IfScale | CLIENT |
SwcActuator | RpSpeed | RPort | IfSpeed | NON-QUEUED |
SwcActuator | PpScale | PPort | IfScale | SERVER |
| Runnable | Access point | RTE event |
|---|---|---|
Sensor_Cyclic | Rte_Write_PpSpeed_speed, Rte_Call_RpScale_GetScale | TimingEvent SensorCyclicTiming, 0.02 s |
Actuator_Init | InitEvent ActuatorInitEvent | |
Actuator_OnData | Rte_Read_RpSpeed_speed | DataReceivedEvent ActuatorOnDataEvent, RpSpeed / speed |
Actuator_GetScale (TRUE under CAN BE INVOKED) | OperationInvokedEvent ActuatorGetScaleEvent, PpScale / GetScale |
Connectors: Assembly_SwcSensor_PpSpeed_SwcActuator_RpSpeed, Assembly_SwcActuator_PpScale_SwcSensor_RpScale.
Chapter 6
| Element | Value |
|---|---|
| BSW modules | The suggested selection of PRTE Platform Import, with the CAN stack Can, CanIf, CanSM, ComM, Com, PduR and LSduR, plus CanNm and Nm, which you select |
| ECU Configuration [ECU] window | Closed with Esc, not applied |
EcuM, BswM, Mcu, Det | Entered by hand from the tables of PRTE Setup; among them BswMNmEnabled TRUE in BswMGeneral and EcuMDriverInitListOne with McuInit, BswMPreInit, CanInit, CanIfInit, LSduRInit, PduRInit, ComInit, CanNmInit, NmInit, ComMInit and CanSMInit |
| Rte values file | VehicleDesign_Rte.arxml, All → Use Imported on Rte (1 replaced) |
Rte from the Rte values file | The SW-C type and instance pairs, BswMInstance/RteEventToTaskMapping_0 (RteEventRef to BswMPollTiming), RteBswModuleInstance_0, _3, _4, _5, _6, each with RteBswExclusiveAreaImpl_0 |
Chapter 7
Os container | Value |
|---|---|
OsOS | OsStatus EXTENDED; OsStackMonitoring, OsUseGetServiceId, OsUseParameterAccess TRUE |
OsOS/OsHooks | The five hooks FALSE |
OSDEFAULTAPPMODE (OsAppMode) | No value |
RES_AUTOSAR_ECUM (OsResource) | OsResourceProperty STANDARD |
OsCounter_0 | OsCounterMaxAllowedValue 1000000, OsCounterMinCycle 1, OsCounterTicksPerBase 1, OsCounterType HARDWARE, OsSecondsPerTick 0.01 |
Every task has OsTaskActivation 1, OsTaskSchedule FULL and OsTaskStackSize 32768. Every alarm has OsAlarmCounterRef Os/OsCounter_0.
| Task | OsTaskPeriod | OsTaskPriority | Activated by |
|---|---|---|---|
OsTask_0 | 0.01 | 2 | OsAlarm_0 |
OsTask_EcuMStartup | Empty | 3 | OsTaskAutostart in Os/OSDEFAULTAPPMODE |
OsTask_2 | 0.02 | 1 | OsAlarm_1 |
OsTask_3 | 0.01 | 1 | OsAlarm_2 |
Chapter 8
Rte container | Value |
|---|---|
RteGeneration | RteCodeVendorId 79 |
RteBswGeneral | Added, no value |
RteInitializationBehavior_0 | RteInitializationStrategy RTE_INITIALIZATION_STRATEGY_AT_DATA_DECLARATION, RteSectionInitializationPolicy INIT |
EcuMInstance/RteModeMachineInstanceConfig_0 | RteModeMachineQueueLength 1, RteSwcModeManagerRef PortInterface/ModeSwitch/EcuM_CurrentMode/currentMode, Context Refs SwComponentType/Atomic/Service/EcuM/currentMode |
RteOsInteraction/RteUsedOsActivation_0, _1, _2 | RteExpectedActivationOffset 0, RteExpectedTickDuration 0.01, RteActivationOsAlarmRef Os/OsAlarm_0, Os/OsAlarm_1, Os/OsAlarm_2 |
RteBswModuleInstance_0 to _7 | RteBswImplementationRef of BswM, EcuM, Can, CanIf, CanSM, ComM, Com, CanNm in this order; _1, _2 and _7 added with "+"; the others from the Rte values file, with RteExclusiveAreaImplMechanism ALL_INTERRUPT_BLOCKING. Nm has no instance |
Every mapping has its mapped-to-task flag TRUE. ActuatorGetScaleEvent is not mapped.
| Event | Task | Alarm | Position |
|---|---|---|---|
SensorCyclicTiming | Os/OsTask_2 | Os/OsAlarm_1 | - |
ActuatorInitEvent | Os/OsTask_3 | - | 2 |
ActuatorOnDataEvent | Os/OsTask_3 | - | 1 |
BswMPollTiming (Rte values file) | Os/OsTask_3 | Os/OsAlarm_2 | 0 |
The twelve BSW main function events of BswM, EcuM, Can (five), CanSM, ComM, Com (two), CanNm | Os/OsTask_0 | Os/OsAlarm_0 | 2 to 13 |
Chapter 9
| Module | Value |
|---|---|
EcuC | EcucConfigSet/EcucPduCollection (PduIdTypeEnum UINT16, PduLengthTypeEnum UINT32) with PduNmTx and PduNmRx (PduLength 8), EcucHardware/Core0 (EcucCoreId 0) |
Can | CanGeneral (CanIndex 0, CanMainFunctionModePeriod 0.01, CanTimeoutDuration 0.001), CanConfigSet/CanController_0 (CanControllerId 0, processing POLLING, CanCpuClockRef Mcu/McuModuleConfiguration/Default/CoreClock), CanControllerBaudrateConfig_0 (CanControllerBaudRate 500), CanHardwareObject_0 (TRANSMIT) and CanHardwareObject_1 (RECEIVE) |
CanIf | CanIfPublicCfg (CanIfPublicHandleTypeEnum UINT16, CanIfPublicTxConfirmPollingSupport and CanIfPublicTxBuffering TRUE), CanIfPrivateCfg (LINEAR), CanIfDispatchCfg (both CAN_SM), CanIfInitCfg (CanIf_Config) with CanIfInitHohCfg_0, CanIfCtrlDrvCfg_0 with CanIfCtrlCfg_0 (→ CanController_0) |
CanIf | CanIfHthCfg_0 (→ CanHardwareObject_0), CanIfHrhCfg_0 (→ CanHardwareObject_1), CanIfBufferCfg_0 (CanIfBufferSize 1, → CanIfHthCfg_0), CanIfTxPduCfg_0 (1281 = 0x501, → PduNmTx), CanIfRxPduCfg_0 (1282 = 0x502, → PduNmRx) |
ComM | ComMGeneral, ComMConfigSet/ComMChannel_0 (COMM_BUS_TYPE_CAN, ComMChannelId 0), ComMNetworkManagement (ComMNmVariant FULL) |
CanSM | CanSMGeneral (0.01), CanSMConfiguration (3, 0.02), CanSMManagerNetwork_0 (2, 0.1, 0.2, 0.1, TRUE, → ComMChannel_0), CanSMController_0 (→ CanIfCtrlCfg_0) |
Nm | NmGlobalConfig with NmGlobalConstants (NmNumberOfChannels 1), NmGlobalFeatures (eight items FALSE), NmGlobalProperties (NmCycletimeMainFunction 0.01); NmChannelConfig_0 (four items FALSE, → ComMChannel_0) with NmBusType/NmStandardBusNmConfig (NM_BUSNM_CANNM) |
CanNm | CanNmGlobalConfig (thirteen items FALSE, CanNmMainFunctionPeriod 0.01), CanNmChannelConfig_0 (CanNmMsgCycleTime 0.1, CanNmTimeoutTime 1.0, CanNmNodeId 1, CanNmNodeIdEnabled TRUE, CanNmCarWakeUpFilterEnabled no value, → ComMChannel_0), CanNmRxPdu_0 (→ PduNmRx), CanNmTxPdu (→ PduNmTx) |
LSduR | LSduRGeneral (LSduRMetaDataSupport, LSduRZeroCostOperation FALSE), LSduRConfig |
LSduR | LSduRBswModules_0 (ECU/CanIf, LSduRLowerModule TRUE), LSduRBswModules_1 (ECU/CanNm, LSduRUpperModule TRUE); both TRUE on LSduRRxIndication, LSduRTransmit, LSduRTxConfirmation |
LSduR | LSduRPath_0 (0, source and destination PduNmRx), LSduRPath_1 (1, source and destination PduNmTx) |
PduR | PduRGeneral (PduRZeroCostOperation FALSE), PduRRoutingPaths (PduRConfigurationId 0) |
Com | ComGeneral (ComSupportedIPduGroups 0), ComConfig with ComMainFunctionRx (ComMainRxTimeBase 0.01) and ComMainFunctionTx (ComMainTxTimeBase 0.01) |
The full lists of items are in each chapter's tables. Network management lives only in the ECU configuration: the System tutorial keeps NM off on CanCluster and has no NM frame, so the NM PDUs and their CAN ids exist only in EcuC and CanIf (Communication Configuration).
Generated Code
Validation and Code Generation ends with COMPLETE and 99 file(s) generated under code/ECU/, four INFO rows and no warning or error. The MODULE_SET row lists 15 modules: Mcu, EcuM, BswM, Rte, Os, Can, CanIf, PduR, Com, ComM, CanSM, CanNm, Nm, LSduR, Det.
Path under code/ECU/ | Content | Who owns it |
|---|---|---|
gen/ | The generated RTE and BSW configuration | The generator, which rewrites it on each run |
src/ | SwcSensor.c, SwcActuator.c and the EcuM start-up files EcuM_StartupTask.c and EcuM_Callout_Stubs.c | You. Created once, never overwritten |
include/ | SwcSensor.h, SwcActuator.h | You |
CMakeLists.txt | The build description | You. Created once |
Common Problems
| Symptom | Cause | Where to fix it |
|---|---|---|
| The ECU icon is missing inside the composition | The composition is not mapped to a node | Composition and ECU Mapping |
| BSW values you entered were overwritten | PRTE AUTO CONFIGURATION, the PRTE Auto Configuration icon or Auto-Generate was pressed, or the ECU Configuration window was applied with Ctrl+S | Do not press them; close the window with Esc. PRTE Setup |
Generation stops with MANDATORY_MODULE_MISSING | One of Os, Rte, EcuM, BswM, Mcu has no configuration | PRTE Setup, Os Configuration |
The EcuM of PRTE Setup does not find its application mode or resource | The names are not exactly OSDEFAULTAPPMODE and RES_AUTOSAR_ECUM | Os Configuration |
src/EcuM_StartupTask.c is not written | The start-up task is not named exactly OsTask_EcuMStartup | Os Configuration |
Generation stops with RTE_EVENT_MAPPING_TASK_FLAG_MISMATCH or RTE_BSW_EVENT_MAPPING_TASK_FLAG_MISMATCH | RteEventIsMappedToTask or RteBswEventIsMappedToTask is still the FALSE that "+" wrote | Rte Configuration |
Generation stops with RTE_BSW_INSTANCE_MISSING | CanNm has a main function but no RteBswModuleInstance_7 | Rte Configuration |
Generation stops with RTE_CS_SERVER_UNMAPPED_NOT_CONCURRENT | Actuator_GetScale is not set to TRUE | Internal Behavior |
EcuC holds the PDUs but no Core0 | EcuC needs the core Core0 (EcucCoreId 0) as soon as it holds anything | Communication Configuration |
Generation stops with CANIF_BUFFERING_GATE_INCONSISTENT | CanIfPublicTxBuffering is not TRUE, while the transmit PDU uses CanIfBufferCfg_0 | Communication Configuration |
| A TRUE or FALSE value is empty and its row has a red border | The button was already selected, and clicking it again cleared the value | Click the same button once more. Communication Configuration |
ComMNmVariant is not FULL | This ECU runs CanNm, so it must stay the FULL that "+" writes | Communication Configuration |
A reference to ComMChannel_0 in CanSM, Nm or CanNm has nothing to pick | ComM was not configured first | Communication Configuration |
Generation stops on an empty TRUE/FALSE item of Nm or CanNm | Many of these items have no default value, so "+" leaves them empty | Click FALSE on each, or TRUE where the table says so. Communication Configuration |
Generation stops with CANNM_CARWAKEUP_LAYOUT | CanNmCarWakeUpFilterEnabled still holds the value "+" wrote | Click its selected button once more to clear it. Communication Configuration |
Generation stops with LSDUR_PATH_SOURCE_UNRESOLVED | LSduRBswModuleRef was typed instead of picked from the list | Pick ECU/CanIf and ECU/CanNm from the dropdown. Communication Configuration |
Generated code is marked with a header not found, such as Rte.h | The SDK headers are in the vECU, not on your computer, so a window on your computer cannot resolve them | Validation and Code Generation |