↑点击上方蓝色字体,关注“嵌入式软件实战派”回复“AUTOSAR”获得更多实战教程。
处理器指令
代码生成(选择和合成)
module外的const数据; 模块编译后和配置数据
xxx_Cfg.h 包含如 宏定义和或者#defines
xxx_Cfg.c 包含如const数据
#include "Nm_Cfg.h"
/*lint -restore */ CONST(Nm_NmFunctionTableType, NM_CONST) Nm_NmFunctionTable[1] = { /* PRQA S 1514, 1533 */ /* MD_CSL_ObjectOnlyAccessedOnce */ /* Index GetLocalNodeIdentifier GetNodeIdentifier GetPduData GetState NetworkRelease NetworkRequest PassiveStartUp Referable Keys */ { /* 0 */ CanNm_GetLocalNodeIdentifier, CanNm_GetNodeIdentifier, CanNm_GetPduData, CanNm_GetState, CanNm_NetworkRelease, CanNm_NetworkRequest, CanNm_PassiveStartUp } /* [CanNm] */ };
|
/* Global Properties */ #ifndef NM_DEV_ERROR_DETECT #define NM_DEV_ERROR_DETECT STD_ON #endif #ifndef NM_DEV_ERROR_REPORT #define NM_DEV_ERROR_REPORT STD_ON #endif #define NM_VERSION_INFO_API STD_OFF |
Nm.c
/* NM Interface version is decimal coded. */ CONST(uint8, NM_CONST) Nm_MainVersion = NM_SW_MAJOR_VERSION; CONST(uint8, NM_CONST) Nm_SubVersion = NM_SW_MINOR_VERSION; CONST(uint8, NM_CONST) Nm_ReleaseVersion = NM_SW_PATCH_VERSION; |
Link time
/* QAC Warning: START Msg(2:3211)-2 */ /* Data Structure of RAM setting Configuration */ CONST(Mcu_RamSetting, MCU_VAR) Mcu_GstRamSetting[1] = { /* Index: 0 - McuRamInitConfiguration */ { /* pRamStartAddress */ /* MISRA Violation: START Msg(4:0306)-1 */ /* QAC Warning: START Msg(2:0315)-3 */ /* QAC Warning: START Msg(2:3892)-4 */ (P2VAR(uint8, TYPEDEF, MCU_CONFIG_DATA)) 0xFEBD0000UL, /* END Msg(2:3892)-4 */ /* END Msg(2:0315)-3 */ /* END Msg(4:0306)-1 */ /* ulRamSectionSize */ 0x00000100UL, /* ucRamInitValue */ 0xFFU, /* enRamWriteSizeSel */ MCU_8BIT_SIZE } }; |
/* Get the pointer to the RAM structure */ LpRamSetting = &Mcu_GstRamSetting[RamSection]; |
关注“嵌入式软件实战派”,回复“AUTOSAR”获得更多实战教程。