S32K SDK RTM3.0.0 CAN compile error


S32K SDK RTM3.0.0 CAN compile error

774 次查看
Contributor II

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!

标记 (1)
0 项奖励
2 回复数

538 次查看
Contributor I

Now, I have the same issue,can you help me!

0 项奖励

538 次查看
NXP Employee
NXP Employee

Hi Dashuang Shengds

As I can see, you are migrating an SDK example to keil, am I correct? unfortunately, those examples are only available for S32DS and IAR, I recommend you to check the following post:

s32k116 example for MDK keil  

using KEIL and S32k 


As I can see in your log, the problems that you have are related with the unused variables of the software, this could be related with Preprocessor MACROS that are defined in the S32DS software.

Best regards

Jorge Alcala