Use older version of GCC as a compiler

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

Use older version of GCC as a compiler

跳至解决方案
2,436 次查看
p_a_u_darshana
Contributor III

Hello,

We are using the S32K MBD toolbox for our project, and we want to perform a Misra rule check for the generated C code.

But our Misra rule checking tool does not support the codes compiled by higher version GCC compilers such as GCC 6.x.

1. Is it okay to use GCC 4.9 instead of GCC 6.3?

2. What kind of negative impact can it provide if we use the GCC 4.9?

3. If I want to use GCC 4.9, is it correct to set the System variable as below?

GCC_S32K_TOOL = C:\NXP\S32DS_ARM_v2.2\S32DS\build_tools\gcc_v4.9\gcc-arm-none-eabi-4_9

 

Thank you

标记 (4)
0 项奖励
回复
1 解答
2,424 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello @p_a_u_darshana 

Yes, you can use the GCC 4.9 version with our toolbox. I cannot provide a list with limitations because it has been only tested with the GCC 6.2, the one delivered with our toolbox.

If you need to customize the compiler flags, you can go to our Config Block and under Build Toolchain you can update the GCC flags.

mariuslucianand_0-1636042066149.png

To switch the compiler, you are right, you have to set an environmental variable "GCC_S32K_TOOL" with the value you have mentioned. If you add this variable in Windows' path, don't forget to restart MATLAB to make it aware of this change. To check the new compiler, you can type the following command in MATLAB's Command window: getenv('GCC_S32K_TOOL')

Hope this helps,

Marius
 

 

 

在原帖中查看解决方案

2 回复数
2,425 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello @p_a_u_darshana 

Yes, you can use the GCC 4.9 version with our toolbox. I cannot provide a list with limitations because it has been only tested with the GCC 6.2, the one delivered with our toolbox.

If you need to customize the compiler flags, you can go to our Config Block and under Build Toolchain you can update the GCC flags.

mariuslucianand_0-1636042066149.png

To switch the compiler, you are right, you have to set an environmental variable "GCC_S32K_TOOL" with the value you have mentioned. If you add this variable in Windows' path, don't forget to restart MATLAB to make it aware of this change. To check the new compiler, you can type the following command in MATLAB's Command window: getenv('GCC_S32K_TOOL')

Hope this helps,

Marius
 

 

 

2,329 次查看
p_a_u_darshana
Contributor III

Hello Marius,

Thank you for the help.

I have switched the compiler by adding an environmental variable and was able to build the project with the older version of GCC. So this works for me.

But I have an additional question.

How can we customize the compiler flags in MCU block settings? Can we even switch the GCC version from here?

Thank you

0 项奖励
回复