S32K Code generate and import to IAR question

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K Code generate and import to IAR question

4,320 次查看
cg0
Contributor II

hello

I use Matlab 2018b with MBD Toolbox generate code, but I meet a question shown as below.

https://nxpcommunity.force.com/community/servlet/servlet.FileDownload?retURL=%2Fcommunity%2Fapex%2FCommunityNXPCaseDetail%3FcaseId%3D5002p0000250K23AAE&file=00P2p000038fmdAEAQ&_CONFIRMATIONTOKEN=VmpFPSxNakF4T1Mwd05DMHhPVlF3TmpvMU5Eb3dPUzQ1TWpoYSxBX1NUN25mYWoweW4wS2ZjSFFoWnBmLE1HWmtNekV4&common.udd.actions.ActionsUtilORIG_URI=%2Fcommunity%2Fservlet%2Fservlet.FileDownload
And the IAR I use is IAR 8.32 for ARM, when I add the generate files into the IAR project, I build the project, the IDE report errors shown as below.

https://nxpcommunity.force.com/community/servlet/servlet.FileDownload?retURL=%2Fcommunity%2Fapex%2FCommunityNXPCaseDetail%3FcaseId%3D5002p0000250K23AAE&file=00P2p000038fmdtEAA&_CONFIRMATIONTOKEN=VmpFPSxNakF4T1Mwd05DMHhPVlF3TmpvMU5Eb3dPUzQ1TWpKYSxnTTVOcHNMUzBlSmZCS1NZc3pwSTNkLE1HWmtNekV4&common.udd.actions.ActionsUtilORIG_URI=%2Fcommunity%2Fservlet%2Fservlet.FileDownload
Please help me, Thank you.

0 项奖励
回复
7 回复数

4,139 次查看
constantinrazva
NXP Employee
NXP Employee

Hello cg0‌,

In the IAR embedded workbench you have to also include the linker files (.icf) and make sure you don't use a default linker file instead. Those symbols (__VECTOR_TABLE, __VECTOR_RAM, etc.) are defined there - this is why it does not compile.

As for your other issue, I'll have to install your version of the compiler and test it. Do you have the latest patch installed ? (The one available here) - I'm asking to have a clear picture of your environment so I can replicate your issue.

Could you also post the output of the following command ran in MATLAB terminal?

ver

Kind regards,

Razvan.

0 项奖励
回复

4,139 次查看
cg0
Contributor II

Hi Constantin

   I haven't install any patches. Do I need to find out the patch 1? or just this patch 2 is enough?

 

what I have just done shown as below.

{TOOLBOX_ROOT}\src\mbdtbx_s32k14x\mbdtbx_s32k14x\blocks\custom_init\custom_init_s32k14_trigger.tlc

and comment out line 30

#include "%<CompiledModel.Name + "_private.h">"

Thank you.

0 项奖励
回复

4,139 次查看
constantinrazva
NXP Employee
NXP Employee

Hello cg0‌,

We're uploading only cumulative patches from now - so if you install the latest patch (patch 2 at this moment), you'll get all the fixes from all previous patches as well. So it will be enough to install just patch 2. You have instructions on how to install it on the link I gave you in my previous reply.

Let us know if you're having trouble installing it.

Kind regards,

Razvan.

0 项奖励
回复

4,139 次查看
cg0
Contributor II

Hi Constantin

Sorry for waste your time.

I already know why this two problems occur, and have already solve them. both due to the environment variables not set correctly.

For the IAR as compiler error question, beacuse of the compiler environmental variables didn't set correctly. And Now I set can got the right result.

For GCC, Firstly I use the matlab package gcc address as environment variables,  and I found when matlab use "arm-none-eabi-gcc" it seems lost the prefix of the full address linker.  Then I change the GCC environment variables to S32 DS files, it works normal.

pastedImage_1.png

pastedImage_1.png

Thank you.

0 项奖励
回复

4,139 次查看
constantinrazva
NXP Employee
NXP Employee

Hello cg0‌,

No problem - stuff like that always happens. Some problems like this are due to having spaces in the path. I'm glad you fixed your problem.

Kind regards,

Razvan.

0 项奖励
回复

4,139 次查看
cg0
Contributor II

Hi Constatin

  this is the project of matlab. and the report all shown as attached.

because I didn't find the upload function, so I upload to Baidu SkyDrive. I don't whether you can get the files. 

here is the links & the code:

链接/linker: https://pan.baidu.com/s/1ryZUfSirjVl_qChxmqb06w  提取码/code: mpw9 

I think it may help.

0 项奖励
回复

4,139 次查看
cg0
Contributor II

Hi Constantin 

      I already install the patch, and when generate code it still report the same error.

0 项奖励
回复