AnsweredAssumed Answered

S32K SDK RTM3.0.0 CAN compile error

Question asked by dashuang shengds on Nov 18, 2019
Latest reply on May 11, 2020 by chen xiao

Hi All,

    I use MDK to develop the S32K144. First I build the project using S32DS and compile is OK, than I copy the Project file to MDK project.

    When I compile the project in the MDK, there is a error about the SDK. The function caller "FlexcanSwapBytesInWord" in the flexcan_hw_access.h have error information like bellow:

 

D:\AppSoftwareInstallLocation\MDK\Keil_v5\ARM\PACK\Keil\S32_SDK_DFP\1.2.0\platform\drivers\src\flexcan\flexcan_hw_access.c(594): warning: #177-D: variable "msgData_32" was declared but never referenced
const uint32_t *msgData_32 = (const uint32_t *)msgData;
D:\AppSoftwareInstallLocation\MDK\Keil_v5\ARM\PACK\Keil\S32_SDK_DFP\1.2.0\platform\drivers\src\flexcan\flexcan_hw_access.c(957): error: #18: expected a ")"
FlexcanSwapBytesInWord(mbWord, msgBuff_data_32[i >> 2U]);
D:\AppSoftwareInstallLocation\MDK\Keil_v5\ARM\PACK\Keil\S32_SDK_DFP\1.2.0\platform\drivers\src\flexcan\flexcan_hw_access.c(889): warning: #177-D: variable "msgBuff_data_32" was declared but never referenced
uint32_t *msgBuff_data_32 = (uint32_t *)(msgBuff->data);
D:\AppSoftwareInstallLocation\MDK\Keil_v5\ARM\PACK\Keil\S32_SDK_DFP\1.2.0\platform\drivers\src\flexcan\flexcan_hw_access.c(890): warning: #550-D: variable "mbWord" was set but never used
uint32_t mbWord;
D:\AppSoftwareInstallLocation\MDK\Keil_v5\ARM\PACK\Keil\S32_SDK_DFP\1.2.0\platform\drivers\src\flexcan\flexcan_hw_access.c(1528): error: #18: expected a ")"
FlexcanSwapBytesInWord(mbWord, msgData_32[databyte >> 2U]);
D:\AppSoftwareInstallLocation\MDK\Keil_v5\ARM\PACK\Keil\S32_SDK_DFP\1.2.0\platform\drivers\src\flexcan\flexcan_hw_access.c(1474): warning: #550-D: variable "mbWord" was set but never used
uint32_t mbWord;
D:\AppSoftwareInstallLocation\MDK\Keil_v5\ARM\PACK\Keil\S32_SDK_DFP\1.2.0\platform\drivers\src\flexcan\flexcan_hw_access.c(1479): warning: #177-D: variable "msgData_32" was declared but never referenced
uint32_t *msgData_32 = (uint32_t *)(rxFifo->data);
D:\AppSoftwareInstallLocation\MDK\Keil_v5\ARM\PACK\Keil\S32_SDK_DFP\1.2.0\platform\drivers\src\flexcan\flexcan_hw_access.c: 6 warnings, 3 errors.

 

I check the SDK, but I can't found the cause.  May you help me to check MDK for S32K  SDK? Thanks!

Outcomes