A question about the S32DS generation code

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

A question about the S32DS generation code

跳至解决方案
2,000 次查看
reboot_MCU
Contributor I

Snipaste_2022-11-16_14-52-41.png

In the red box is the one I want to create for(;;) loop, but I can't build him because of the auto-generated loop part below, unless it contains break; Please how can I do to create a for(;;) or while(1) without causing the auto-generated loop below to report an error?

0 项奖励
回复
1 解答
1,951 次查看
mikedoidge
NXP Employee
NXP Employee

Hello,

I suspect when you say export to IAR compiler, what you are doing is exporting the project from S32 Design Studio IDE to the IAR EW IDE. The compiler is used by both IDEs. When you create the project by the method you described, where you select the IAR compiler, this is the best way to prepare the project for use in IAR EW. It minimizes the changes required to adapt it to the IAR EW as it is already setup to use the IAR compiler.

Best regards,

Mike

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,979 次查看
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Could you provide which version of S32DS you are working with? As well as the SDK/RTD you are using.

Please, let us know, for us to continue improving our answer

0 项奖励
回复
1,978 次查看
reboot_MCU
Contributor I

SDK.pngversion.png

Maybe there is a problem with my settings, but I still don't know where the problem is, if you have a solution or idea, please let me know, thank you.

0 项奖励
回复
1,966 次查看
mikedoidge
NXP Employee
NXP Employee

What is the error that is being reported?

If you check the example projects, many of them have such for(;;) loop as you have done and there is no error. Most likely it is caused by some other issue.

0 项奖励
回复
1,962 次查看
reboot_MCU
Contributor I

toolchain.png

    First of all, thank you for your reply.

    When I create a new project, this error occurs if I select IAR's cross-compile tool, and if I export this project to the IAR compiler, this error is converted into a warning.

    If I had chosen other cross-compilation tools, this problem would not have arisen, and I suspect that the same should be true for instance projects. As for why this problem arises, I still need some time to figure it out.

    Finally, I would like to ask you again. If I don't choose IAR's cross-compile tool, will it make any difference when I port my project to the IAR compiler?

    Thank you

0 项奖励
回复
1,952 次查看
mikedoidge
NXP Employee
NXP Employee

Hello,

I suspect when you say export to IAR compiler, what you are doing is exporting the project from S32 Design Studio IDE to the IAR EW IDE. The compiler is used by both IDEs. When you create the project by the method you described, where you select the IAR compiler, this is the best way to prepare the project for use in IAR EW. It minimizes the changes required to adapt it to the IAR EW as it is already setup to use the IAR compiler.

Best regards,

Mike

0 项奖励
回复