DTC修改

This commit is contained in:
sunbeam 2024-03-18 10:54:18 +08:00
parent 42e508fd3b
commit 097e48318d
4 changed files with 35 additions and 211 deletions

View File

@ -1,191 +1,14 @@
QualityReport
2024年3月18日 9:34:17
2024年3月18日 10:48:12
------ Start build(ECU_APP, DefaultBuild) ------
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe rscan_driver\r_rl78_can_irq.c r_main.c r_cg_timer_user.c CanNw\CanNw.c CanNw\CanNwConfig.c diagnose\Dcm_App.c diagnose\Dcm_Cfg.c diagnose\Dcm_DID_Cfg.c diagnose\extern.c diagnose\DTC\DCM_DTC.c diagnose\Dcm.c user\appTask.c user\can_user.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
r_main.c(116):W0523077:Called function should have prototype
r_main.c(162):W0523076:Function declarations should have prototype
r_cg_timer_user.c(142):W0520167:Argument of type "uint16_t __near *" is incompatible with parameter of type "unsigned int *__near"
diagnose\Dcm_App.c(296):W0520549:Variable "DcmResetDelay" is used before its value is set
diagnose\Dcm_App.c(320):W0520177:Variable "ResetDelayCnt" was declared but never referenced
diagnose\Dcm_App.c(470):W0520177:Variable "ResetDelayCnt" was declared but never referenced
diagnose\Dcm_App.c(912):W0520549:Variable "LeDcm_u_Result" is used before its value is set
diagnose\Dcm_App.c(979):W0520549:Variable "LeDcm_u_Result" is used before its value is set
diagnose\Dcm_App.c(930):W0520177:Variable "LaDcm_u_TempBuffer" was declared but never referenced
diagnose\Dcm_App.c(1294):W0520940:Missing return statement at end of non-void function "MngDcm_RoutineF001Start"
diagnose\Dcm_App.c(1298):W0520940:Missing return statement at end of non-void function "MngDcm_RoutineF001Stop"
diagnose\Dcm_App.c(1302):W0520940:Missing return statement at end of non-void function "MngDcm_RoutineF001Result"
diagnose\Dcm_App.c(1572):W0520177:Variable "temp" was declared but never referenced
diagnose\Dcm_App.c(1919):W0520549:Variable "LeDcm_u_FinallyResult" is used before its value is set
diagnose\Dcm_App.c(1853):W0520177:Variable "LeDcm_u_dataFomatldentifier" was declared but never referenced
diagnose\Dcm_App.c(1854):W0520177:Variable "LeDcm_u_addressAndLengthFomatldentifier" was declared but never referenced
diagnose\Dcm_App.c(1855):W0520177:Variable "LeDcm_w_Address" was declared but never referenced
diagnose\Dcm_App.c(1856):W0520177:Variable "LeDcm_w_DataLength" was declared but never referenced
diagnose\Dcm_App.c(1857):W0520177:Variable "LeDcm_u_SidIndex" was declared but never referenced
diagnose\Dcm_App.c(1858):W0520177:Variable "LeDcm_u_SecurityAccessCheckResult" was declared but never referenced
diagnose\Dcm_App.c(1859):W0520177:Variable "LaDcm_u_TempBuffer" was declared but never referenced
diagnose\Dcm_App.c(2023):W0520549:Variable "LeDcm_u_FinallyResult" is used before its value is set
diagnose\Dcm_App.c(1939):W0520177:Variable "LeDcm_w_SingleTransmitDataCount" was declared but never referenced
diagnose\Dcm_App.c(1940):W0520177:Variable "LeDcm_u_BlockSequenceCount" was declared but never referenced
diagnose\Dcm_App.c(1941):W0520177:Variable "LeDcm_u_BlockExpect" was declared but never referenced
diagnose\Dcm_App.c(1942):W0520177:Variable "LaDcm_u_TempBuffer" was declared but never referenced
diagnose\Dcm_App.c(60):W0520177:Variable "CeDcm_w_SecurityAccessFBLMask" was declared but never referenced
diagnose\Dcm_App.c(63):W0520177:Variable "SeDcm_w_DownLoadDataLength" was declared but never referenced
diagnose\Dcm_App.c(64):W0520177:Variable "SeDcm_w_TransmitDataCount" was declared but never referenced
diagnose\Dcm_App.c(65):W0520177:Variable "SeDcm_u_BlockSequenceCountSts" was declared but never referenced
diagnose\Dcm_App.c(66):W0520177:Variable "CaDcm_w_SingleAllowDateLength" was declared but never referenced
diagnose\Dcm_App.c(71):W0520177:Variable "SeDcm_u_RidF001Sts" was declared but never referenced
diagnose\Dcm_Cfg.c(83):W0520144:A value of type "uint8 (__far *)(void)" cannot be used to initialize an entity of type "SubDealfunc"
diagnose\Dcm_Cfg.c(84):W0520144:A value of type "uint8 (__far *)(void)" cannot be used to initialize an entity of type "SubDealfunc"
diagnose\Dcm_Cfg.c(87):W0520144:A value of type "uint8 (__far *)(void)" cannot be used to initialize an entity of type "SubDealfunc"
diagnose\Dcm_Cfg.c(1166):W0520940:Missing return statement at end of non-void function "MngDcm_ReadMemoryDataService"
diagnose\Dcm_Cfg.c(1188):W0520167:Argument of type "const TsDcm_h_WithParaSubCheckType __near *" is incompatible with parameter of type "const TsDcm_h_SubCheckType __far *__near"
diagnose\Dcm_Cfg.c(1208):W0520167:Argument of type "const TsDcm_h_WithParaSubCheckType __near *" is incompatible with parameter of type "const TsDcm_h_SubCheckType __far *__near"
diagnose\Dcm_Cfg.c(1249):W0520167:Argument of type "const TsDcm_h_WithParaSubCheckType __near *" is incompatible with parameter of type "const TsDcm_h_SubCheckType __far *__near"
diagnose\Dcm_Cfg.c(1268):W0520167:Argument of type "const TsDcm_h_WithParaSubCheckType __near *" is incompatible with parameter of type "const TsDcm_h_SubCheckType __far *__near"
diagnose\Dcm_Cfg.c(1303):W0520177:Variable "i" was declared but never referenced
diagnose\Dcm_Cfg.c(1313):W0520177:Variable "LeDcm_u_CollectDataPost" was declared but never referenced
diagnose\Dcm_Cfg.c(1606):W0520177:Variable "LeDcm_u_DLCheckResult" was declared but never referenced
diagnose\Dcm_Cfg.c(1612):W0520177:Variable "LeDcm_u_CollectDataPost" was declared but never referenced
diagnose\Dcm_Cfg.c(518):W0520177:Function "MngDcm_2AReadDidCheckDL" was declared but never referenced
diagnose\Dcm_Cfg.c(560):W0520177:Function "MngDcm_IoDidCheckDL" was declared but never referenced
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(338):W0520174:Expression has no effect
diagnose\Dcm_DID_Cfg.c(348):W0520144:A value of type "long" cannot be used to initialize an entity of type "uint8 __far *__near"
diagnose\Dcm_DID_Cfg.c(348):W0520152:Conversion of nonzero integer to pointer
diagnose\Dcm_DID_Cfg.c(370):W0520144:A value of type "long" cannot be used to initialize an entity of type "uint8 __far *__near"
diagnose\Dcm_DID_Cfg.c(370):W0520152:Conversion of nonzero integer to pointer
diagnose\Dcm_DID_Cfg.c(402):W0520174:Expression has no effect
diagnose\extern.c(99):W0520111:Statement is unreachable
diagnose\extern.c(128):W0520940:Missing return statement at end of non-void function "GetMotorLockStatus"
diagnose\extern.c(174):W0520111:Statement is unreachable
diagnose\extern.c(315):W0520111:Statement is unreachable
diagnose\extern.c(319):W0520111:Statement is unreachable
diagnose\extern.c(323):W0520111:Statement is unreachable
diagnose\extern.c(327):W0520111:Statement is unreachable
diagnose\extern.c(524):W0520940:Missing return statement at end of non-void function "GetBcmCommFault"
diagnose\extern.c(541):W0520940:Missing return statement at end of non-void function "GetAcpCommFault"
diagnose\DTC\DCM_DTC.c(125):W0520167:Argument of type "uint32 __near *" is incompatible with parameter of type "unsigned char *__near"
diagnose\DTC\DCM_DTC.c(189):W0520167:Argument of type "uint8 __near (*)[2]" is incompatible with parameter of type "unsigned char *__near"
diagnose\DTC\DCM_DTC.c(180):W0520177:Variable "DtcSnapshotRecord" was declared but never referenced
diagnose\DTC\DCM_DTC.c(820):W0520167:Argument of type "uint8 __near (*)[28]" is incompatible with parameter of type "unsigned char *__near"
diagnose\DTC\DCM_DTC.c(111):W0520177:Function "ChkDiagVolt" was declared but never referenced
diagnose\DTC\DCM_DTC.c(121):W0520177:Function "GetLastSnapshotRecordNum" was declared but never referenced
diagnose\DTC\DCM_DTC.c(312):W0520177:Function "TempMotorFeedbackChk" was declared but never referenced
diagnose\DTC\DCM_DTC.c(362):W0520177:Function "ModeMotorFeedbackChk" was declared but never referenced
diagnose\DTC\DCM_DTC.c(412):W0520177:Function "RecMotorFeedbackChk" was declared but never referenced
diagnose\DTC\DCM_DTC.c(462):W0520177:Function "EvaSensorChk" was declared but never referenced
diagnose\DTC\DCM_DTC.c(512):W0520177:Function "MotorLockChk" was declared but never referenced
diagnose\Dcm.c(69):W0520550:Variable "LeDcm_u_FinallyResult" was set but never used
user\appTask.c(41):W0520172:External/internal linkage conflict with previous declaration
user\appTask.c(259):W0520177:Variable "num" was declared but never referenced
user\appTask.c(260):W0520177:Variable "keyPressCounter" was declared but never referenced
user\appTask.c(261):W0520177:Variable "LastKey" was declared but never referenced
user\appTask.c(401):W0523082:Pointer to the object of even alignment holds the odd address
user\appTask.c(405):W0520513:A value of type "MotorStateEE_Type __near *" cannot be assigned to an entity of type "uint8_t *"
user\appTask.c(443):W0520513:A value of type "MotorStateEE_Type __near *" cannot be assigned to an entity of type "uint8_t *"
user\appTask.c(541):W0520550:Variable "count" was set but never used
user\appTask.c(674):W0523077:Called function should have prototype
user\appTask.c(728):W0523077:Called function should have prototype
user\can_user.c(116):W0520550:Variable "re_flag" was set but never used
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: 00000c5b Byte(s)
ROMDATA SECTION: 00000658 Byte(s)
PROGRAM SECTION: 00005169 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:89)(ECU_APP, DefaultBuild) ------
--- CommandFile 1 ---
DefaultBuild\ECU_APP.clnk :
-Input=DefaultBuild\cstart.obj
-Input=DefaultBuild\stkinit.obj
-Input=DefaultBuild\r_pfdl.obj
-Input=DefaultBuild\RL78_RCAN.obj
-Input=DefaultBuild\r_rl78_can_drv.obj
-Input=DefaultBuild\r_rl78_can_irq.obj
-Input=DefaultBuild\r_systeminit.obj
-Input=DefaultBuild\r_main.obj
-Input=DefaultBuild\r_cg_wdt_user.obj
-Input=DefaultBuild\r_cg_wdt.obj
-Input=DefaultBuild\r_cg_timer_user.obj
-Input=DefaultBuild\r_cg_timer.obj
-Input=DefaultBuild\r_cg_port_user.obj
-Input=DefaultBuild\r_cg_port.obj
-Input=DefaultBuild\r_cg_cgc_user.obj
-Input=DefaultBuild\r_cg_cgc.obj
-Input=DefaultBuild\r_cg_adc_user.obj
-Input=DefaultBuild\r_cg_adc.obj
-Input=DefaultBuild\VectorTable.obj
-Input=DefaultBuild\CanNw.obj
-Input=DefaultBuild\CanNwConfig.obj
-Input=DefaultBuild\Dcm_App.obj
-Input=DefaultBuild\Dcm_App_Cfg.obj
-Input=DefaultBuild\Dcm_Cfg.obj
-Input=DefaultBuild\Dcm_DID.obj
-Input=DefaultBuild\Dcm_DID_Cfg.obj
-Input=DefaultBuild\Dcm_Key.obj
-Input=DefaultBuild\extern.obj
-Input=DefaultBuild\CanIf.obj
-Input=DefaultBuild\CanIf_Cfg.obj
-Input=DefaultBuild\CanTp_Cfg.obj
-Input=DefaultBuild\CanTrcv.obj
-Input=DefaultBuild\CanTrcv_Cfg.obj
-Input=DefaultBuild\DCM_DTC.obj
-Input=DefaultBuild\Dcm.obj
-Input=DefaultBuild\CanTp.obj
-Input=DefaultBuild\r_cg_intc.obj
-Input=DefaultBuild\r_cg_intc_user.obj
-Input=DefaultBuild\appTask.obj
-Input=DefaultBuild\can_user.obj
-Input=DefaultBuild\hwCtrl.obj
-LIBrary=DataFlash\pfdl.lib
-SECURITY_ID=00000000000000000000
-DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF
-DEBug
-NOCOmpress
-NOOPtimize
-OUtput=DefaultBuild\ECU_APP.abs
-LIBrary=C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\lib\rl78em4s.lib
-LIBrary=C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\lib\malloc_n.lib
-LIBrary=C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\lib\rl78em4r.lib
-OCDBG=04
-USER_OPT_BYTE=E933E8
-LISt=DefaultBuild\ECU_APP.map
-SHow=Reference,Xreference,Total_size,STRUCT
-STARt=VectorRemapingAddr_n,.const,.text,.RLIB,.SLIB,PFDL_COD,.textf,.constf,.data,.sdata/0A000,DID_TBL_f/19C00,KAM_SEG_n/FE500,.dataR,.bss/FE510,.sdataR,.sbss/FFE20
-ROm=.data=.dataR
-ROm=.sdata=.sdataR
-Message
-Total_size
-NOLOgo
-end
-Input=DefaultBuild\ECU_APP.abs
-DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF
-OUtput=DefaultBuild\ECU_APP.mot
-FOrm=Stype
-REcord=S3
-BYte_count=10
-Message
-end
-Input=DefaultBuild\ECU_APP.abs
-DEVICE=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10BBG.DVF
-OUtput=output\ECU_APP.S19= A000-19FFF
-FOrm=Stype
-REcord=S3
-SPace=FF
-BYte_count=10
-Message
-exit
------ Build ended(Error:0, Warning:0)(ECU_APP, DefaultBuild) ------
--- SHA1 hash value of output files ---
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\DefaultBuild\ECU_APP.abs: 1397829d2b63036fbefbc1978a1eb29abc531835
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\DefaultBuild\ECU_APP.mot: 582d3c214a54646e5b98fe3418be403a891111c6
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\output\ECU_APP.S19: 1bcdb46fa97ee380dbd20ad06cb3359fcd3ce34c
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\DefaultBuild\ECU_APP.abs: 1364fe9f30dd88b29302dffa4ac466ed522286e5
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\DefaultBuild\ECU_APP.mot: 53be40da0c32e3c1fac40260cb2b7b6207510fb7
E:\workspace\CFMOTO\CFMOTOR\ECU_APP\output\ECU_APP.S19: afdbd4fc6aa5a1753d5fa06de6727b0247d22ab2
--- System Information ---
@ -213,13 +36,13 @@ E:\workspace\CFMOTO\CFMOTOR\ECU_APP\output\ECU_APP.S19: 1bcdb46fa97ee380dbd20ad0
C:\Program Files (x86)\Renesas Electronics\CS+\CC
*Memory Usage
*Private Working Set
192 MB
210 MB
*Number of GDI Objects
2135
2157
*Number of USER Objects
1200
1213
*Opened Files
4 editors, 4 files, 25 KB
5 editors, 5 files, 49 KB
--- Build Tool Plug-in Information ---
RH850 Build tool CC-RH Plug-in

View File

@ -189,6 +189,18 @@ static void WriteDtcSnapshot(uint8 DtcIndex)
DF_Write(&temp,GetIndexNumber(DtcIndex+8),2);
}
}
extern uint16_t ECM_lost_count,GBC_lost_count;
void CommunicationLostDetected(void)
{
if (ECM_lost_count > 0)
{
ECM_lost_count--;
}
if (GBC_lost_count > 0)
{
GBC_lost_count--;
}
}
void ClearDtcStutas(uint8 DtcIndex)
{
@ -196,9 +208,15 @@ void ClearDtcStutas(uint8 DtcIndex)
// DtcStutas[DtcIndex].DtcStutas &= ~(TestNotCompletedThisOperationCycle | TestFailed); //2017/7/2 11:52:29 del
DtcStutas[DtcIndex].DtcStutas &= ~TestFailed; //2017/7/2 11:52:56 spark add
}
extern uint16_t ECM_lost_count,GBC_lost_count;
static void CanDTC_LostCommDetected(void)
{
if(ChkNetDiagCondition() == 0) return;
if(GetVoltage(KL30_VOLTAGE) > 160)return;
if(GetVoltage(KL30_VOLTAGE) < 90)return;
if (0 != GetCanBusOffErr())return;
CommunicationLostDetected();
if (ECM_lost_count == 0)
{
WriteDtcSnapshot(AC_ECM_LOST);
@ -666,7 +684,7 @@ uint8 MngDcm_ReportDTCByStatusMask(void)
DtcReporLength = 3;
for(DtcIndex=0;DtcIndex<DCM_SUPDTC_COUNT;DtcIndex++)
{
if(GetDtcStutas(DtcIndex) & VeDcm_h_RqustInfo.StateMask)
if(GetDtcStutas(DtcIndex) & VeDcm_h_RqustInfo.StateMask & DTC_STATUS_AVAILABILITY_MASK)
{
LaDcm_u_TempBuffer[DtcReporLength++] = CaDcm_u_DtcTable[DtcIndex].DtcHigh;
LaDcm_u_TempBuffer[DtcReporLength++] = CaDcm_u_DtcTable[DtcIndex].DtcMiddle;

View File

@ -206,14 +206,11 @@ void WriteIoParameter(unsigned char p,unsigned char data)
/************************************************************************************/
unsigned char GetIgnVoltStatus(void)
{
// if(*Power_Protect.mark == 1)
// {
// return 0;
// }
// else
// {
// return 1;
// }
if (SupplyVoltage > 160 || SupplyVoltage < 90)
{
return 1;
}
return 0;
}

View File

@ -96,26 +96,12 @@ void ClearTxCounter(void)
air_req_timer = 0;
}
void CommunicationLostDetected(void)
{
if (App28sTxRxStatus & 0x02 != 0) // Rx enable
{
if (ECM_lost_count > 0)
{
ECM_lost_count--;
}
if (GBC_lost_count > 0)
{
GBC_lost_count--;
}
}
}
void TxServe(void)
{
Can_RtnType re_flag;
static unsigned char sucNwSendCnt = 0;
CommunicationLostDetected();
////////////////////////////////////////////////////////////////////////
if ((ucNwSendPduType == SEND_NWAPP_PDU) || (ucNwSendPduType == SEND_APP_PDU))
{