How to use command line build the S32K(312) Design Studio 4.4 code?

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

How to use command line build the S32K(312) Design Studio 4.4 code?

2,721 次查看
StephenYeh
Contributor III

Hi Sir,

你好,想請教有關S32K312 @DS4.4 version RTD sample 進行command line 方式Build。

使用如下cmd,在某些Project 能夠Build成功,但在某些Project 是無法Build的。並且能Build成功的專案手動去修改 source/main.c 也無法Build成功,或是直接使用-cleanBuild也會有問題。

eclipse -nosplash

        -application org.eclipse.cdt.managedbuilder.core.headlessbuild

        -import {[uri:/]/path/to/project}

        -build {project_name | all}

        -cleanBuild {projec_name | all}

 

OK Swt_Ip_Example_S32K312_cmd

eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\Users\stephen.yeh\workspaceS32DS.3.4 -build Swt_Ip_Example_S32K312_cmd --launcher.ini C:\nxp\S32DS.3.4\eclipse\s32ds.ini --launcher.suppressErrors

 

Fail:Clock_Ip_Example_S32K312_cmdbuild

eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\Users\stephen.yeh\workspaceS32DS.3.4 -build Clock_Ip_Example_S32K312_cmdbuild --launcher.ini C:\nxp\S32DS.3.4\eclipse\s32ds.ini --launcher.suppressErrors

0 项奖励
回复
6 回复数

2,687 次查看
mikedoidge
NXP Employee
NXP Employee

Hello @StephenYeh,

This project is based on MCAL and in the .args file generated from command line is missing part of path for mcal.h and related stuff. It is already logged it as a bug. As a workaround you need to add include path manually (by the -I option):

eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\Users\stephen.yeh\workspaceS32DS.3.4 -build Clock_Ip_Example_S32K312_cmdbuild --launcher.ini C:\nxp\S32DS.3.4\eclipse\s32ds.ini --launcher.suppressErrors -I C:/NXP/S32DS.3.4/S32DS/software/PlatformSDK_S32K3_2022_03/SW32K3_RTD_4_4_2_0_0_D2203/Base_TS_T40D34M20I0R0/header -I C:/NXP/S32DS.3.4/S32DS/software/PlatformSDK_S32K3_2022_03/SW32K3_RTD_4_4_2_0_0_D2203/Base_TS_T40D34M20I0R0/include -I C:/NXP/S32DS.3.4/S32DS/software/PlatformSDK_S32K3_2022_03/SW32K3_RTD_4_4_2_0_0_D2203/Base_TS_T40D34M20I0R0/include -I C:/NXP/S32DS.3.4/S32DS/software/PlatformSDK_S32K3_2022_03/SW32K3_RTD_4_4_2_0_0_D2203/Platform_TS_T40D34M20I0R0/startup/include

Best Regards,

Mike

0 项奖励
回复

2,677 次查看
StephenYeh
Contributor III

Hi Mike

Thanks.

We know that build code have debug / released version.

Is there the cmd support this 2 types?

0 项奖励
回复

2,675 次查看
StephenYeh
Contributor III

I follow the link as below to add released build. (Design Studio 4.4)

https://community.nxp.com/t5/S32-Design-Studio/Debug-options-to-select-in-S32-Design-Studio/td-p/698...

Released version follow below link, choose Release build, but 

I create the Siul2_Dio_Ip_Example_S32K312 and add/choose the Release build. (There are some errors.)

StephenYeh_0-1667465054659.png

 

0 项奖励
回复

2,670 次查看
mikedoidge
NXP Employee
NXP Employee

Hello Stephen,

I'm not sure what you are trying to do. The link you shared does not show how to add a release build option. I suggest you use the details I provided in this thread:

https://community.nxp.com/t5/S32-Design-Studio/s32-DS-2018-build-configuration/td-p/1430922

I think you will find this to be more successful.

What's interesting is the error reported in the image you shared shows the issue is with a macro used in 'check_example.h', which is not part of the build to begin with. See here:

mikedoidge_0-1667481096113.png

The greyed appearance of the folder and filename along with the slash on the icons for each is clear indication that they are excluded from the build.

Best Regards,

Mike

0 项奖励
回复

2,665 次查看
StephenYeh
Contributor III

Hi Mike

I reference the modify code based to released version follow below link, choose Release build, but there are some errors.

https://community.nxp.com/t5/S32-Design-Studio/Debug-options-to-select-in-S32-Design-Studio/td-p/698...

 

My test step as below. (Debug Flash is OK, but released version will fail)

 

StephenYeh_0-1667528292099.png

 

 

StephenYeh_1-1667528292134.png

 

StephenYeh_2-1667528292194.png

 

StephenYeh_3-1667528292209.jpeg

 

 

0 项奖励
回复

2,653 次查看
mikedoidge
NXP Employee
NXP Employee

Hello @StephenYeh,

I tried the steps you prefer to follow, and I was able to reproduce the errors you received.

Next, I followed the steps I encouraged you to follow and the code built without errors.

Best Regards,

Mike

0 项奖励
回复