S32K SDK RTM3.0.0 CAN compile error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K SDK RTM3.0.0 CAN compile error

1,136件の閲覧回数
dashuangshengds
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 返答(返信)

900件の閲覧回数
592314340
Contributor I

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

0 件の賞賛

900件の閲覧回数
jorge_a_vazquez
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 

http://www.keil.com/appnotes/files/apnt_299_v1.2.pdf 

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