更新诊断
This commit is contained in:
parent
002a276238
commit
d2de84446e
File diff suppressed because one or more lines are too long
4103
ECU_APP/OutPut/ECU_APP_SW.1.01.02_5GY0.S19
Normal file
4103
ECU_APP/OutPut/ECU_APP_SW.1.01.02_5GY0.S19
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,25 +1,27 @@
|
||||
QualityReport
|
||||
2023年10月18日 20:58:23
|
||||
2023年12月18日 22:10:08
|
||||
|
||||
------ Start build(ECU_APP, DefaultBuild) ------
|
||||
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe diagnose\Dcm_DID_Cfg.c -cpu=S3 -obj_path=DefaultBuild "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF" -g -g_line -I diagnose\DTC -I diagnose\CanTrcv -I sys -I . -I rscan_driver -I diagnose -I DataFlash -I CanNw -I diagnose\CanTp -I diagnose\CanIf -I user -D DEBUG1 -c -msg_lang=english
|
||||
diagnose\Dcm_DID_Cfg.c(173):W0520144:A value of type "long" cannot be used to initialize an entity of type "uint8 __far *__near"
|
||||
diagnose\Dcm_DID_Cfg.c(173):W0520152:Conversion of nonzero integer to pointer
|
||||
diagnose\Dcm_DID_Cfg.c(314):W0520174:Expression has no effect
|
||||
diagnose\Dcm_DID_Cfg.c(324):W0520144:A value of type "long" cannot be used to initialize an entity of type "uint8 __far *__near"
|
||||
diagnose\Dcm_DID_Cfg.c(324):W0520152:Conversion of nonzero integer to pointer
|
||||
diagnose\Dcm_DID_Cfg.c(346):W0520144:A value of type "long" cannot be used to initialize an entity of type "uint8 __far *__near"
|
||||
diagnose\Dcm_DID_Cfg.c(346):W0520152:Conversion of nonzero integer to pointer
|
||||
diagnose\Dcm_DID_Cfg.c(378):W0520174:Expression has no effect
|
||||
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe diagnose\extern.c -cpu=S3 -obj_path=DefaultBuild "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF" -g -g_line -I diagnose\DTC -I diagnose\CanTrcv -I sys -I . -I rscan_driver -I diagnose -I DataFlash -I CanNw -I diagnose\CanTp -I diagnose\CanIf -I user -D DEBUG1 -c -msg_lang=english
|
||||
diagnose\extern.c(107):W0520940:Missing return statement at end of non-void function "GetVoltage"
|
||||
diagnose\extern.c(135):W0520940:Missing return statement at end of non-void function "GetMotorLockStatus"
|
||||
diagnose\extern.c(181):W0520111:Statement is unreachable
|
||||
diagnose\extern.c(322):W0520111:Statement is unreachable
|
||||
diagnose\extern.c(326):W0520111:Statement is unreachable
|
||||
diagnose\extern.c(330):W0520111:Statement is unreachable
|
||||
diagnose\extern.c(334):W0520111:Statement is unreachable
|
||||
diagnose\extern.c(505):W0520940:Missing return statement at end of non-void function "GetCanBusOffErr"
|
||||
diagnose\extern.c(523):W0520940:Missing return statement at end of non-void function "GetBcmCommFault"
|
||||
diagnose\extern.c(540):W0520940:Missing return statement at end of non-void function "GetAcpCommFault"
|
||||
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\rlink.exe -subcommand=DefaultBuild\ECU_APP.clnk
|
||||
W0561017:The evaluation period of CC-RL V1 has expired. Please consider purchasing the product.
|
||||
RAMDATA SECTION: 00000c45 Byte(s)
|
||||
ROMDATA SECTION: 00000602 Byte(s)
|
||||
PROGRAM SECTION: 000050ad Byte(s)
|
||||
RAMDATA SECTION: 00000c5d Byte(s)
|
||||
ROMDATA SECTION: 00000642 Byte(s)
|
||||
PROGRAM SECTION: 000051d3 Byte(s)
|
||||
W0561017:The evaluation period of CC-RL V1 has expired. Please consider purchasing the product.
|
||||
W0561017:The evaluation period of CC-RL V1 has expired. Please consider purchasing the product.
|
||||
Renesas Optimizing Linker Completed
|
||||
------ Build ended(Error:0, Warning:11)(ECU_APP, DefaultBuild) ------
|
||||
------ Build ended(Error:0, Warning:13)(ECU_APP, DefaultBuild) ------
|
||||
|
||||
--- CommandFile 1 ---
|
||||
DefaultBuild\ECU_APP.clnk :
|
||||
@ -105,9 +107,9 @@ DefaultBuild\ECU_APP.clnk :
|
||||
|
||||
|
||||
--- SHA1 hash value of output files ---
|
||||
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\DefaultBuild\ECU_APP.abs: 127274b5a99e04674a5e1dcefd7d0a8c2877d58a
|
||||
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\DefaultBuild\ECU_APP.mot: 914dca4e98770c878b0fbda20c4a692107fc8ef2
|
||||
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\output\ECU_APP.S19: 16cedccee542f344d7e3c74c105c252c401963e2
|
||||
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\DefaultBuild\ECU_APP.abs: e686999f3129e60308b2bee265110880966e23f4
|
||||
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\DefaultBuild\ECU_APP.mot: 3ee760f7c2e92c2c2fb883c765b5009784e23157
|
||||
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\output\ECU_APP.S19: 719401ad826e831e2557ec44200f7b96924da170
|
||||
|
||||
|
||||
--- System Information ---
|
||||
@ -135,11 +137,11 @@ E:\workspace\CFMOTO\CFMOTOR\ECU_APP\output\ECU_APP.S19: 16cedccee542f344d7e3c74c
|
||||
C:\Program Files (x86)\Renesas Electronics\CS+\CC
|
||||
*Memory Usage
|
||||
*Private Working Set
|
||||
239 MB
|
||||
227 MB
|
||||
*Number of GDI Objects
|
||||
2153
|
||||
2145
|
||||
*Number of USER Objects
|
||||
1196
|
||||
1201
|
||||
*Opened Files
|
||||
4 editors, 4 files, 25 KB
|
||||
|
||||
|
@ -635,7 +635,7 @@ TeCanTp_e_TxResult SetCanTp_TxBuffer(uint16 LeCanTp_p_DL , const uint8 LeCanTp_p
|
||||
|
||||
for(LeCanTp_s_Index = 1; LeCanTp_s_Index < 8; LeCanTp_s_Index++)
|
||||
{
|
||||
SaCanTp_u_TxBuffer[LeCanTp_s_Index] = 0x55;
|
||||
SaCanTp_u_TxBuffer[LeCanTp_s_Index] = 0xCC;
|
||||
}
|
||||
|
||||
for(LeCanTp_s_Index = 0; LeCanTp_s_Index < LeCanTp_p_DL; LeCanTp_s_Index++)
|
||||
@ -717,7 +717,7 @@ TeCanTp_e_TxResult SetCanTp_Tx_78Neg(uint16 LeCanTp_p_DL , const uint8 LeCanTp_p
|
||||
|
||||
for(LeCanTp_u_Index = 1; LeCanTp_u_Index < 8; LeCanTp_u_Index++)
|
||||
{
|
||||
SaCanTp_u_TxBuffer[LeCanTp_u_Index] = 0x55;
|
||||
SaCanTp_u_TxBuffer[LeCanTp_u_Index] = 0xCC;
|
||||
}
|
||||
|
||||
for(LeCanTp_u_Index = 0; LeCanTp_u_Index < LeCanTp_p_DL; LeCanTp_u_Index++)
|
||||
@ -901,7 +901,7 @@ void MngCanTp_MainFunction(void)
|
||||
{
|
||||
if(SeCanTp_u_MFTxSpacing > SeCanTp_u_STmin)
|
||||
{
|
||||
SeCanTp_u_MFTxSpacing = 1;
|
||||
SeCanTp_u_MFTxSpacing = 0;//修复stmin少1ms
|
||||
if(SeCanTp_u_TxMFIndex < (SeCanTp_u_TxLen-7))
|
||||
{
|
||||
SaCanTp_u_TxBuffer[0] = 0x20 + SeCanTp_u_MFTxSN;
|
||||
@ -935,7 +935,7 @@ void MngCanTp_MainFunction(void)
|
||||
|
||||
for(LeCanTp_u_Index = 1; LeCanTp_u_Index < 8; LeCanTp_u_Index++)
|
||||
{
|
||||
SaCanTp_u_TxBuffer[LeCanTp_u_Index] = 0x55;
|
||||
SaCanTp_u_TxBuffer[LeCanTp_u_Index] = 0xCC;
|
||||
}
|
||||
|
||||
for(LeCanTp_u_Index = 0; LeCanTp_u_Index < LeCanTp_u_Cnt; LeCanTp_u_Index++)
|
||||
|
@ -53,7 +53,7 @@ static uint16 SaDcm_u_RequestDelayCount;
|
||||
static uint8 SeDcm_u_SecurityAccessServerSts; /*27 服务状态*/
|
||||
|
||||
static uint16 CeDcm_u_P2serverTime = 0x0032; /* P2server 时间 标定量*/
|
||||
static uint16 CeDcm_u_P2ExtserverTime = 0x00C8; /* P2*server 时间 标定量*/
|
||||
static uint16 CeDcm_u_P2ExtserverTime = 0x01F4; /* P2*server 时间 标定量*/
|
||||
|
||||
static uint32 SeDcm_w_SecurityAccessSeed = 0x12345678; /*27 服务 种子*/
|
||||
static uint32 SeDcm_u_SecurityAccessKey; /*27 服务密钥*/
|
||||
@ -349,7 +349,7 @@ uint8 MngDcm_ExtDataRecordAvailableCheck(uint8 LeDcm_u_ExtDataRecord,const DTCEx
|
||||
KamData.RspData[4] = (uint8)(CeDcm_u_P2serverTime&0xFF);
|
||||
KamData.RspData[5] = (uint8)(CeDcm_u_P2ExtserverTime>>8);
|
||||
KamData.RspData[6] = (uint8)(CeDcm_u_P2ExtserverTime&0xFF);
|
||||
KamData.RspData[7] = 0x55;
|
||||
KamData.RspData[7] = 0xCC;
|
||||
#if 0
|
||||
LaDcm_u_TempBuffer[0] = VeDcm_h_RqustInfo.Sid + 0x40;
|
||||
LaDcm_u_TempBuffer[1] = VeDcm_h_RqustInfo.Sub;
|
||||
@ -479,11 +479,11 @@ TeDcm_h_ResultType MngDcm_SoftResetDeal(void)
|
||||
KamData.RspData[0] = 0x02;
|
||||
KamData.RspData[1] = VeDcm_h_RqustInfo.Sid + 0x40;
|
||||
KamData.RspData[2] = VeDcm_h_RqustInfo.Sub;
|
||||
KamData.RspData[3] = 0x55;
|
||||
KamData.RspData[4] = 0x55;
|
||||
KamData.RspData[5] = 0x55;
|
||||
KamData.RspData[6] = 0x55;
|
||||
KamData.RspData[7] = 0x55;
|
||||
KamData.RspData[3] = 0xCC;
|
||||
KamData.RspData[4] = 0xCC;
|
||||
KamData.RspData[5] = 0xCC;
|
||||
KamData.RspData[6] = 0xCC;
|
||||
KamData.RspData[7] = 0xCC;
|
||||
#if 0
|
||||
LaDcm_u_TempBuffer[0] = VeDcm_h_RqustInfo.Sid + 0x40;
|
||||
LaDcm_u_TempBuffer[1] = VeDcm_h_RqustInfo.Sub;
|
||||
|
@ -52,8 +52,8 @@ const TsDcm_h_SidCheckInfoType CaDcm_h_SidCheckInfoTable[DCM_SUPPORTSID_COUNT]={
|
||||
//{DCM_DEFAULT_SESSION | DCM_EXTEND_SESSION , DCM_SECURITY_LEVEL_DEFAULT , DCM_PHYSICAL_ADDRESS , 3 , 0 , 0x2A , &MngDcm_ReadDataByIdentifier},// 2A服务缺失
|
||||
//{ DCM_EXTEND_SESSION , DCM_SECURITY_LEVEL_DEFAULT , DCM_PHYSICAL_ADDRESS , 3 , 0 , 0x2A , &MngDcm_ReadDataByIdentifier},// 2A服务缺失
|
||||
//{ DCM_EXTEND_SESSION , DCM_SECURITY_LEVEL_DEFAULT , DCM_PHYSICAL_ADDRESS , 4 , 2 , 0x2C , &MngDcm_DynamicaDefineIdentifier}, // 2C服务缺失
|
||||
//{DCM_DEFAULT_SESSION | DCM_EXTEND_SESSION , DCM_SECURITY_LEVEL_DEFAULT , DCM_PHYSICAL_ADDRESS | DCM_FUNCTIONAL_ADDRESS , 4 , 0 , 0x14 , &MngDcm_CleanDTCService},// 14服务缺失
|
||||
//{DCM_DEFAULT_SESSION | DCM_EXTEND_SESSION , DCM_SECURITY_LEVEL_DEFAULT , DCM_PHYSICAL_ADDRESS | DCM_FUNCTIONAL_ADDRESS , 2 , 3 , 0x19 , &MngDcm_ReadDTCInfoService},// 19服务缺失
|
||||
{DCM_DEFAULT_SESSION | DCM_EXTEND_SESSION , DCM_SECURITY_LEVEL_DEFAULT , DCM_PHYSICAL_ADDRESS | DCM_FUNCTIONAL_ADDRESS , 4 , 0 , 0x14 , &MngDcm_CleanDTCService},// 14服务缺失
|
||||
{DCM_DEFAULT_SESSION | DCM_EXTEND_SESSION , DCM_SECURITY_LEVEL_DEFAULT , DCM_PHYSICAL_ADDRESS | DCM_FUNCTIONAL_ADDRESS , 2 , 3 , 0x19 , &MngDcm_ReadDTCInfoService},// 19服务缺失
|
||||
//{ DCM_EXTEND_SESSION , DCM_SECURITYACCESS_LEVEL_L1 , DCM_PHYSICAL_ADDRESS , 4 , 0 , 0x2F , &MngDcm_IOCtrlDIDService},// 2F服务缺失
|
||||
//{DCM_DEFAULT_SESSION | DCM_EXTEND_SESSION , DCM_SECURITY_LEVEL_DEFAULT | DCM_SECURITYACCESS_LEVEL_L1 , DCM_PHYSICAL_ADDRESS , 4 , 0 , 0x2F , &MngDcm_IOCtrlDIDService},// 2F服务缺失
|
||||
{ DCM_PROGRAMME_SESSION , DCM_SECURITY_LEVEL_DEFAULT , DCM_PHYSICAL_ADDRESS , 4 , 3 , 0x31 , &MngDcm_RoutineControlService},
|
||||
@ -134,7 +134,8 @@ const TsDcm_h_DidCheckType CaDcm_h_IODidCheckInfoTable[DCM_IO_DIDSUP_COUNT]={
|
||||
};
|
||||
/*22 服务 DID 条件检查项列表*/
|
||||
const TsDcm_h_DidCheckType CaDcm_h_ReadDidCheckInfoTable[DCM_READ_DIDSUP_COUNT + DCM_PERIODIC_DATA_COUNT]={
|
||||
|
||||
{0x07,0x07,16,0xF010,&Dcm_DidServices_0xF010_ReadData},
|
||||
{0x07,0x07,8, 0xF101,&Dcm_DidServices_0xF101_ReadData},
|
||||
{0x07,0x07,10,0xF180,&Dcm_DidServices_0xF180_ReadData},
|
||||
{0x07,0x07, 1,0xF186,&Dcm_DidServices_0xF186_ReadData},
|
||||
{0x07,0x07,20,0xF187,&Dcm_DidServices_0xF187_ReadData},
|
||||
@ -183,6 +184,8 @@ const TsDcm_h_DidCheckType CaDcm_h_WriteDidCheckInfoTable[DCM_WRITE_DIDSUP_COUNT
|
||||
{0x06,DCM_SECURITYACCESS_LEVEL_L1,16,0xF198,&Dcm_DidServices_0xF198_WriteData},
|
||||
{0x06,DCM_SECURITYACCESS_LEVEL_L1, 4,0xF199,&Dcm_DidServices_0xF199_WriteData},
|
||||
{0x06,DCM_SECURITYACCESS_LEVEL_L1, 4,0xF19D,&Dcm_DidServices_0xF19D_WriteData},
|
||||
{0x06,DCM_SECURITYACCESS_LEVEL_L1, 4,0xF101,&Dcm_DidServices_0xF101_WriteData},
|
||||
{0x06,DCM_SECURITYACCESS_LEVEL_L1, 4,0xF010,&Dcm_DidServices_0xF010_WriteData},
|
||||
};
|
||||
|
||||
/*Rid FF00 检查列表*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*@处根据实际情况填写相关信息,将@字符以及这条提示语句去掉*/
|
||||
/*@处根据实际情况填写相关信息,将@字符以及这条提示语句去掉*/
|
||||
/******************************************************************************
|
||||
| File Name : Dcm_Cfg.h
|
||||
| Description:
|
||||
@ -22,38 +22,38 @@
|
||||
#define SID_RECORD ( YES )
|
||||
|
||||
#define DAMING_CAN_BOOT ( NO )
|
||||
#define DCM_SUPPORTSID_COUNT 12U /*支持的SID数目*/
|
||||
#define DCM_SUPPORTSID_COUNT 14U /*支持的SID数目*/
|
||||
|
||||
|
||||
#define DCM_10SUB_COUNT 3U /*10服务子服务个数*/
|
||||
#define DCM_11SUB_COUNT 2U /*11服务子服务个数*/
|
||||
#define DCM_19SUB_COUNT 3U /*19服务子服务个数*/
|
||||
#define DCM_10SUB_COUNT 3U /*10服务子服务个数*/
|
||||
#define DCM_11SUB_COUNT 2U /*11服务子服务个数*/
|
||||
#define DCM_19SUB_COUNT 3U /*19服务子服务个数*/
|
||||
|
||||
|
||||
#define DCM_27SUB_COUNT 2U /*27服务子服务个数*/
|
||||
#define DCM_28SUB_COUNT 3U /*28服务子服务个数*/
|
||||
#define DCM_27SUB_COUNT 2U /*27服务子服务个数*/
|
||||
#define DCM_28SUB_COUNT 3U /*28服务子服务个数*/
|
||||
|
||||
#define DCM_31RID_COUNT 1U /*31服务子服务个数*/
|
||||
#define DCM_RIDFF02_SUB_COUNT 3U /*31 FF02 支持的子服务个数*/
|
||||
#define DCM_RIDFF00_SUB_COUNT 3U /*31 FF00 支持的子服务个数*/
|
||||
#define DCM_RIDFF01_SUB_COUNT 3U /*31 FF01 支持的子服务个数*/
|
||||
#define DCM_RIDF001_SUB_COUNT 3U /* 31 F001 支持的子服务个数 */
|
||||
#define DCM_31RID_COUNT 1U /*31服务子服务个数*/
|
||||
#define DCM_RIDFF02_SUB_COUNT 3U /*31 FF02 支持的子服务个数*/
|
||||
#define DCM_RIDFF00_SUB_COUNT 3U /*31 FF00 支持的子服务个数*/
|
||||
#define DCM_RIDFF01_SUB_COUNT 3U /*31 FF01 支持的子服务个数*/
|
||||
#define DCM_RIDF001_SUB_COUNT 3U /* 31 F001 支持的子服务个数 */
|
||||
|
||||
#define DCM_3ESUB_COUNT 1U /*3E服务子服务个数*/
|
||||
#define DCM_85SUB_COUNT 2U /*85服务子服务个数*/
|
||||
#define DCM_2CSUB_COUNT 2U /*2C服务子服务个数*/
|
||||
#define DCM_14DTCGROUP_COUNT 3U /*14服务支持的DTC组个数*/
|
||||
#define DCM_3ESUB_COUNT 1U /*3E服务子服务个数*/
|
||||
#define DCM_85SUB_COUNT 2U /*85服务子服务个数*/
|
||||
#define DCM_2CSUB_COUNT 2U /*2C服务子服务个数*/
|
||||
#define DCM_14DTCGROUP_COUNT 3U /*14服务支持的DTC组个数*/
|
||||
|
||||
#if (defined (DAMING_CAN_BOOT) && (DAMING_CAN_BOOT == YES))
|
||||
#define DCM_READ_DIDSUP_COUNT 15U /*22 服务支持的DID 个数 */
|
||||
#define DCM_READ_DIDSUP_COUNT 15U /*22 服务支持的DID 个数 */
|
||||
#else
|
||||
#define DCM_READ_DIDSUP_COUNT 24U /* 22 服务支持的DID 个数 */
|
||||
#define DCM_READ_DIDSUP_COUNT 26U /* 22 服务支持的DID 个数 */
|
||||
#endif
|
||||
#define DCM_IO_DIDSUP_COUNT 5U /*2F 服务支持的DID 个数*/
|
||||
#define DCM_PERIODIC_DATA_COUNT 0U /*2A 服务支持DID个数 */
|
||||
#define DCM_IO_DIDSUP_COUNT 5U /*2F 服务支持的DID 个数*/
|
||||
#define DCM_PERIODIC_DATA_COUNT 0U /*2A 服务支持DID个数 */
|
||||
|
||||
#define DCM_WRITE_DIDSUP_COUNT 7U /*2E 服务支持的DID 个数*/
|
||||
#define DCM_ONEDID_MAXDATALENGTH 20U /*22 单个DID 数据最大长度*/
|
||||
#define DCM_WRITE_DIDSUP_COUNT 7U /*2E 服务支持的DID 个数*/
|
||||
#define DCM_ONEDID_MAXDATALENGTH 20U /*22 单个DID 数据最大长度*/
|
||||
|
||||
|
||||
|
||||
@ -69,14 +69,14 @@
|
||||
|
||||
|
||||
typedef TeDcm_h_ResultType (*ServerDealfunc)(void);
|
||||
/*SID 条件检查项*/
|
||||
/*SID 条件检查项*/
|
||||
typedef struct
|
||||
{
|
||||
uint8 SupportSession; /*支持的会话模式*/
|
||||
uint8 SupportSecurityAccess; /*支持的安全权限*/
|
||||
uint8 SupportRequestAddress; /*支持的请求方式*/
|
||||
uint8 MinDL; /*SID 对应的最小DL*/
|
||||
uint8 SubCount; /*子服务个数 */
|
||||
uint8 SupportSession; /*支持的会话模式*/
|
||||
uint8 SupportSecurityAccess; /*支持的安全权限*/
|
||||
uint8 SupportRequestAddress; /*支持的请求方式*/
|
||||
uint8 MinDL; /*SID 对应的最小DL*/
|
||||
uint8 SubCount; /*子服务个数 */
|
||||
uint8 Sid; /*SID */
|
||||
ServerDealfunc SidFunction;
|
||||
}TsDcm_h_SidCheckInfoType;
|
||||
@ -85,41 +85,41 @@ typedef struct
|
||||
|
||||
typedef TeDcm_h_ResultType (*SubDealfunc)(void );
|
||||
typedef TeDcm_h_ResultType (*SubDealfuncWithPara)(uint8 );
|
||||
/*子服务信息列表结构体*/
|
||||
/*子服务信息列表结构体*/
|
||||
typedef struct
|
||||
{
|
||||
uint8 Sub; /*子服务*/
|
||||
uint8 DL; /*子服务 对应的正确DL*/
|
||||
SubDealfunc SubFunction; /*子服务 对应函数的处理函数*/
|
||||
uint8 Sub; /*子服务*/
|
||||
uint8 DL; /*子服务 对应的正确DL*/
|
||||
SubDealfunc SubFunction; /*子服务 对应函数的处理函数*/
|
||||
}TsDcm_h_SubCheckType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 Sub; /*子服务*/
|
||||
uint8 DL; /*子服务 对应的正确DL*/
|
||||
SubDealfuncWithPara SubFunction; /*子服务 对应函数的处理函数*/
|
||||
uint8 Sub; /*子服务*/
|
||||
uint8 DL; /*子服务 对应的正确DL*/
|
||||
SubDealfuncWithPara SubFunction; /*子服务 对应函数的处理函数*/
|
||||
}TsDcm_h_WithParaSubCheckType;
|
||||
|
||||
|
||||
|
||||
/*子服务信息列表结构体*/
|
||||
/*子服务信息列表结构体*/
|
||||
typedef struct
|
||||
{
|
||||
uint8 Sub; /*子服务*/
|
||||
uint8 DL; /*子服务 对应的正确DL*/
|
||||
SubDealfunc SubFunction; /*子服务 对应函数的处理函数*/
|
||||
uint8 Sub; /*子服务*/
|
||||
uint8 DL; /*子服务 对应的正确DL*/
|
||||
SubDealfunc SubFunction; /*子服务 对应函数的处理函数*/
|
||||
}TsDcm_h_DtcCheckType;
|
||||
|
||||
|
||||
typedef uint8 (*DidDealfunc)(uint8* LeDcm_u_DataAddress,uint8* LeDcm_u_DataLength);
|
||||
/* 22 2E 2A服务 DID 信息列表结构体*/
|
||||
/* 22 2E 2A服务 DID 信息列表结构体*/
|
||||
typedef struct
|
||||
{
|
||||
uint8 SupportSession; /*支持的会话模式*/
|
||||
uint8 SupportSecurityAccess; /*支持的安全权限*/
|
||||
uint8 DataLength; /*数据长度*/
|
||||
uint16 Did; /*具体DID*/
|
||||
DidDealfunc Function; /*DID 对应函数的处理函数*/
|
||||
uint8 SupportSession; /*支持的会话模式*/
|
||||
uint8 SupportSecurityAccess; /*支持的安全权限*/
|
||||
uint8 DataLength; /*数据长度*/
|
||||
uint16 Did; /*具体DID*/
|
||||
DidDealfunc Function; /*DID 对应函数的处理函数*/
|
||||
}TsDcm_h_DidCheckType;
|
||||
|
||||
typedef struct
|
||||
@ -130,12 +130,12 @@ typedef struct
|
||||
}TsDcm_h_2APeriodicDidServe;
|
||||
|
||||
typedef TeDcm_h_ResultType (*DtcDealfunc)(uint32 LeDcm_DtcGroup);
|
||||
/*14 服务信息列表结构体*/
|
||||
/*14 服务信息列表结构体*/
|
||||
#if 0
|
||||
typedef struct
|
||||
{
|
||||
uint32 Dtc; /* DTC组 */
|
||||
DtcDealfunc CleanFunction; /* 子服务 对应函数的处理函数 */
|
||||
uint32 Dtc; /* DTC组 */
|
||||
DtcDealfunc CleanFunction; /* 子服务 对应函数的处理函数 */
|
||||
}TsDcm_h_DtcCheckType;
|
||||
|
||||
#endif
|
||||
@ -143,24 +143,24 @@ typedef struct
|
||||
|
||||
|
||||
typedef TeDcm_h_ResultType (*RidDealfunc)(void);
|
||||
/*Rid 支持的子服务及处理函数信息的列表结构体*/
|
||||
/*Rid 支持的子服务及处理函数信息的列表结构体*/
|
||||
typedef struct
|
||||
{
|
||||
|
||||
uint8 Sub; /*子服务*/
|
||||
uint8 DL; /*服务 对应的正确DL*/
|
||||
RidDealfunc Function; /*服务 对应函数的处理函数*/
|
||||
uint8 Sub; /*子服务*/
|
||||
uint8 DL; /*服务 对应的正确DL*/
|
||||
RidDealfunc Function; /*服务 对应函数的处理函数*/
|
||||
}TsDcm_h_RidSubCheckType;
|
||||
|
||||
|
||||
|
||||
/* 31服务 RID 信息列表结构体*/
|
||||
/* 31服务 RID 信息列表结构体*/
|
||||
typedef struct
|
||||
{
|
||||
uint8 SupportSession; /*支持的会话模式*/
|
||||
uint8 SupportSecurityAccess; /*支持的安全权限*/
|
||||
uint8 SupportSession; /*支持的会话模式*/
|
||||
uint8 SupportSecurityAccess; /*支持的安全权限*/
|
||||
uint16 Rid; /*Rid*/
|
||||
const TsDcm_h_RidSubCheckType* RidSubTable; /*Rid 支持的子服务列表*/
|
||||
const TsDcm_h_RidSubCheckType* RidSubTable; /*Rid 支持的子服务列表*/
|
||||
|
||||
}TsDcm_h_RidCheckType;
|
||||
|
||||
|
@ -1734,3 +1734,111 @@ uint8 Dcm_DidServices_0x170B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLen
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/******************* Read 0xF010 ***************************/
|
||||
uint8 Dcm_DidServices_0xF010_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
|
||||
{
|
||||
uint8 LaDCM_u_Buf[16];
|
||||
uint8 i;
|
||||
|
||||
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF010ReadData(LaDCM_u_Buf))
|
||||
{
|
||||
|
||||
for(i = 0;i < 16;i++)
|
||||
{
|
||||
LeDcm_u_data[i] = LaDCM_u_Buf[i];
|
||||
}
|
||||
|
||||
(*LeDcm_u_dataLength) = 16;
|
||||
return DCM_CHECK_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return DCM_NRC22;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/******************* Read 0xF101 ***************************/
|
||||
uint8 Dcm_DidServices_0xF101_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength)
|
||||
{
|
||||
uint8 LaDCM_u_Buf[8];
|
||||
uint8 i;
|
||||
|
||||
if( DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF101ReadData(LaDCM_u_Buf))
|
||||
{
|
||||
|
||||
for(i = 0;i < 8;i++)
|
||||
{
|
||||
LeDcm_u_data[i] = LaDCM_u_Buf[i];
|
||||
}
|
||||
|
||||
(*LeDcm_u_dataLength) = 8;
|
||||
return DCM_CHECK_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return DCM_NRC22;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/******************* Write 0xF010 **************************************/
|
||||
uint8 Dcm_DidServices_0xF010_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
|
||||
{
|
||||
uint8 i;
|
||||
uint8 LaDCM_u_Buf[16];
|
||||
|
||||
if(0 != GetVehicel_u_SpeedVal())
|
||||
{
|
||||
|
||||
for(i = 0;i < (*LeDcm_u_dataLength);i++)
|
||||
{
|
||||
LaDCM_u_Buf[i] = LeDcm_u_data[i];
|
||||
}
|
||||
|
||||
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF010_WriteData(LaDCM_u_Buf))
|
||||
{
|
||||
return DCM_CHECK_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return DCM_NRC22;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return DCM_NRC22;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/******************* Write 0xF101 **************************************/
|
||||
uint8 Dcm_DidServices_0xF101_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength)
|
||||
{
|
||||
uint8 i;
|
||||
uint8 LaDCM_u_Buf[8];
|
||||
|
||||
if(0 != GetVehicel_u_SpeedVal())
|
||||
{
|
||||
|
||||
for(i = 0;i < (*LeDcm_u_dataLength);i++)
|
||||
{
|
||||
LaDCM_u_Buf[i] = LeDcm_u_data[i];
|
||||
}
|
||||
|
||||
if(DCM_CHECK_OK == GetRTE_Dcm_DidServices_0xF101_WriteData(LaDCM_u_Buf))
|
||||
{
|
||||
return DCM_CHECK_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return DCM_NRC22;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return DCM_NRC22;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -108,4 +108,10 @@ extern uint8 Dcm_DidServices_0x1708_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_
|
||||
extern uint8 Dcm_DidServices_0x1709_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
|
||||
extern uint8 Dcm_DidServices_0x170B_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
|
||||
|
||||
extern uint8 Dcm_DidServices_0xF010_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
|
||||
extern uint8 Dcm_DidServices_0xF101_ReadData(uint8* LeDcm_u_data,uint8* LeDcm_u_dataLength);
|
||||
extern uint8 Dcm_DidServices_0xF101_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
|
||||
extern uint8 Dcm_DidServices_0xF010_WriteData(uint8* LeDcm_u_data, uint8* LeDcm_u_dataLength);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -576,6 +576,60 @@ uint8 GetRTE_Dcm_DidServices_0x170BReadData(uint8* data)
|
||||
getIGNVoltage(data);
|
||||
return DCM_CHECK_OK;
|
||||
}
|
||||
uint8_t F010_data[16] = {0};
|
||||
uint8_t F101_data[8] = {0};
|
||||
uint8 GetRTE_Dcm_DidServices_0xF010ReadData(uint8* data)
|
||||
{
|
||||
uint8_t i;
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
data[i] = F010_data[i];
|
||||
}
|
||||
|
||||
return DCM_CHECK_OK;
|
||||
}
|
||||
uint8 GetRTE_Dcm_DidServices_0xF101ReadData(uint8* data)
|
||||
{
|
||||
uint8_t i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
data[i] = F101_data[i];
|
||||
}
|
||||
|
||||
return DCM_CHECK_OK;
|
||||
}
|
||||
uint8 GetRTE_Dcm_DidServices_0xF010_WriteData(uint8* data)
|
||||
{
|
||||
uint8 temp;
|
||||
for(temp = 0;temp < 16;temp++)
|
||||
{
|
||||
F010_data[temp] = data[temp];
|
||||
}
|
||||
return DCM_CHECK_OK;
|
||||
/*
|
||||
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF110),8);
|
||||
if(temp == 0) //R_FDL_OK
|
||||
return DCM_CHECK_OK;
|
||||
else
|
||||
return DCM_CHECK_NOK;
|
||||
*/
|
||||
}
|
||||
uint8 GetRTE_Dcm_DidServices_0xF101_WriteData(uint8* data)
|
||||
{
|
||||
uint8 temp;
|
||||
for(temp = 0;temp < 8;temp++)
|
||||
{
|
||||
F101_data[temp] = data[temp];
|
||||
}
|
||||
return DCM_CHECK_OK;
|
||||
/*
|
||||
temp = DF_Write(wBuf,GetIndexNumber(INDEX_0xF110),8);
|
||||
if(temp == 0) //R_FDL_OK
|
||||
return DCM_CHECK_OK;
|
||||
else
|
||||
return DCM_CHECK_NOK;
|
||||
*/
|
||||
}
|
||||
|
||||
uint8 GetVehicel_u_SpeedVal(void)
|
||||
{
|
||||
|
@ -126,6 +126,11 @@ extern uint8 GetRTE_Dcm_DidServices_0x1708ReadData(uint8* data);
|
||||
extern uint8 GetRTE_Dcm_DidServices_0x1709ReadData(uint8* data);
|
||||
extern uint8 GetRTE_Dcm_DidServices_0x170BReadData(uint8* data);
|
||||
|
||||
extern uint8 GetRTE_Dcm_DidServices_0xF010ReadData(uint8* data);
|
||||
extern uint8 GetRTE_Dcm_DidServices_0xF101ReadData(uint8* data);
|
||||
extern uint8 GetRTE_Dcm_DidServices_0xF010_WriteData(uint8* data);
|
||||
extern uint8 GetRTE_Dcm_DidServices_0xF101_WriteData(uint8* data);
|
||||
|
||||
#if 0
|
||||
extern uint16 EvaSensorFeedbackVoltage(void);
|
||||
extern uint16 GetModeFeedbackVoltage(void);
|
||||
|
@ -23,7 +23,7 @@
|
||||
* Description: : Write User Function Code
|
||||
*****************************************************************************/
|
||||
static const uint8 xorArray[4] = {0xAA,0x50,0x43,0x52};
|
||||
|
||||
static const uint8 CFxorArray[4] = {0x4D,0x53,0x57,0x51};
|
||||
uint32 GetSeed(void)
|
||||
{
|
||||
return (GetTimerCnt());
|
||||
@ -34,22 +34,15 @@ uint32 SecurityLevel_1(uint32 Seed)
|
||||
{
|
||||
SeedSec_t cal,key,seed;
|
||||
seed.word = Seed;
|
||||
cal.byte[0] = seed.byte[0]^xorArray[0];
|
||||
cal.byte[1] = seed.byte[1]^xorArray[1];
|
||||
cal.byte[2] = seed.byte[2]^xorArray[2];
|
||||
cal.byte[3] = seed.byte[3]^xorArray[3];
|
||||
cal.byte[0] = seed.byte[0]^CFxorArray[0];
|
||||
cal.byte[1] = seed.byte[1]^CFxorArray[1];
|
||||
cal.byte[2] = seed.byte[2]^CFxorArray[2];
|
||||
cal.byte[3] = seed.byte[3]^CFxorArray[3];
|
||||
|
||||
#if 0
|
||||
key.byte[0] = ((cal.byte[3]&0x0F)<<4)|( cal.byte[3]&0xF0);
|
||||
key.byte[1] = ((cal.byte[1]&0x0F)<<4)|((cal.byte[0]&0xF0)>>4);
|
||||
key.byte[2] = (cal.byte[1]&0xF0)|((cal.byte[2]&0xF0)>>4);
|
||||
key.byte[3] = ((cal.byte[0]&0x0F)<<4)|( cal.byte[2]&0x0F);
|
||||
#else
|
||||
key.byte[3] = ((cal.byte[0]&0x0F)<<4)|( cal.byte[0]&0xF0);
|
||||
key.byte[2] = ((cal.byte[2]&0x0F)<<4)|((cal.byte[3]&0xF0)>>4);
|
||||
key.byte[1] = (cal.byte[2]&0xF0)|((cal.byte[1]&0xF0)>>4);
|
||||
key.byte[0] = ((cal.byte[3]&0x0F)<<4)|( cal.byte[1]&0x0F);
|
||||
#endif
|
||||
key.byte[3] = ((cal.byte[2]&0xF0)<<4)|(cal.byte[3]&0xF0);
|
||||
key.byte[2] = ((cal.byte[3]&0x2F)<<2)|(cal.byte[1]&0x03);
|
||||
key.byte[1] = ((cal.byte[1]&0xFC)>>2)|(cal.byte[0]&0xC0);
|
||||
key.byte[0] = ((cal.byte[0]&0x0F)<<4)|(cal.byte[2]&0x0F);
|
||||
|
||||
return( key.word );
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ __far const unsigned char SW_VERSION[]={
|
||||
'1' , //AC_SW_VERSION_06
|
||||
'.' , //AC_SW_VERSION_07
|
||||
'0' , //AC_SW_VERSION_08
|
||||
'1' , //AC_SW_VERSION_09
|
||||
'2' , //AC_SW_VERSION_09
|
||||
' ' , //AC_SW_VERSION_10
|
||||
' ' , //AC_SW_VERSION_11
|
||||
' ' , //AC_SW_VERSION_12
|
||||
|
Loading…
x
Reference in New Issue
Block a user