S32DS command line build occur "sources.mk does not exist" error sometimes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32DS command line build occur "sources.mk does not exist" error sometimes

2,186 Views
wesleyxie
Contributor III

Hi, NXP

@

I tried below commands to build my project from a script, and sometimes it failed with error "Resource '/prj_fmc_can_ZS11MCE3/Debug/sources.mk' does not exist".

 

eclipsec.exe -nosplash --launcher.suppressErrors -no-indexer -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./build -import .\prj_fmc_can_ZS11MCE3

eclipsec.exe -nosplash --launcher.suppressErrors -no-indexer -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./build -cleanBuild prj_fmc_can_ZS11MCE3/Debug -D COMPILE_PRJ_NAME=TBOX_PRJ_NAME_ZS11MCE3 -D COMPILE_SPLAT_SEL=SPLAT_CM_PP

 

 

when I use S32DS UI mode, "clean" the project, and "build" it before "refresh" it, the same error occured. but if I choose to "refresh", and then "build", this problem fixed.

it seems that "-cleanBuild" option doesn't refresh the project,  How could I fix it in command line mode ?  

please see below log (attached) for command line running, 

!SESSION 2021-03-26 11:47:17.572 -----------------------------------------------
eclipse.buildId=2.0.0.202001161704
java.version=1.8.0_202
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
Framework arguments: -no-indexer -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import .\prj_fmc_can_ZS11MCE3
Command-line arguments: -os win32 -ws win32 -arch x86 -no-indexer -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./build -import .\prj_fmc_can_ZS11MCE3

!ENTRY org.eclipse.core.resources 2 10035 2021-03-26 11:47:20.137
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.core.resources 2 10035 2021-03-26 11:47:22.216
!MESSAGE The workspace will exit with unsaved changes in this session.
!SESSION 2021-03-26 11:47:22.694 -----------------------------------------------
eclipse.buildId=2.0.0.202001161704
java.version=1.8.0_202
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
Framework arguments: -no-indexer -application org.eclipse.cdt.managedbuilder.core.headlessbuild -cleanBuild prj_fmc_can_ZS11MCE3/Debug -D COMPILE_PRJ_NAME=TBOX_PRJ_NAME_ZS11MCE3 -D COMPILE_SPLAT_SEL=SPLAT_CM_PP
Command-line arguments: -os win32 -ws win32 -arch x86 -no-indexer -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./build -cleanBuild prj_fmc_can_ZS11MCE3/Debug -D COMPILE_PRJ_NAME=TBOX_PRJ_NAME_ZS11MCE3 -D COMPILE_SPLAT_SEL=SPLAT_CM_PP

!ENTRY org.eclipse.core.resources 2 10035 2021-03-26 11:47:25.300
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.core.resources 4 2 2021-03-26 11:47:29.866
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Resource '/prj_fmc_can_ZS11MCE3/Debug/sources.mk' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:335)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:209)
at org.eclipse.core.internal.resources.File.setContents(File.java:336)
at org.eclipse.core.internal.resources.File.setContents(File.java:434)
at com.nxp.s32ds.ext.cdt.core.makefilegenerator.GnuMakefileGenerator.save(GnuMakefileGenerator.java:839)
at com.nxp.s32ds.ext.cdt.core.makefilegenerator.GnuMakefileGenerator.populateSourcesMakefile(GnuMakefileGenerator.java:1171)
at com.nxp.s32ds.ext.cdt.core.makefilegenerator.GnuMakefileGenerator.regenerateMakefiles(GnuMakefileGenerator.java:932)
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performMakefileGeneration(CommonBuilder.java:1006)
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performPrebuildGeneration(CommonBuilder.java:873)
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:748)
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:513)
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:459)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:330)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:405)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:551)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:529)
at org.eclipse.core.internal.resources.Project.build(Project.java:120)
at org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder$1.run(HeadlessBuilder.java:271)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2262)
at org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder.buildConfigurations(HeadlessBuilder.java:281)
at org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder.start(HeadlessBuilder.java:522)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
!SUBENTRY 1 org.eclipse.core.resources 4 368 2021-03-26 11:47:29.867
!MESSAGE Resource '/prj_fmc_can_ZS11MCE3/Debug/sources.mk' does not exist.
!SUBENTRY 1 org.eclipse.core.resources 4 368 2021-03-26 11:47:29.867
!MESSAGE Resource '/prj_fmc_can_ZS11MCE3/Debug/sources.mk' does not exist.

Tags (1)
0 Kudos
3 Replies

1,877 Views
turgaykale
Contributor III

Dear wesley xie hi,

I am facing the same issue. How did you fix the problem? Do you have any tips ?

Regards,

Turgay

0 Kudos

1,873 Views
wesleyxie
Contributor III

@turgaykale 

 

I use "-build" option instead of "-cleanBuild", and remove the build output directory of the selected configuration before the command with "-build".

for example:

wesleyxie_0-1647347996325.png

 

1,859 Views
turgaykale
Contributor III

Dear Wesley Xie,

Thank you so much for your support. Your help has enlighted me how to fix it. It is OK now. My batch script's code snippet is as below:

 

:: Define variables
set CONFIG_PATH_TOOL_ECLIPSE_CL=/path/to/eclipsec.exe
set CONFIG_PATH_PROJECT_WORKSPACE=/path/to/s32ds_workspace
set PATH_FOLDER_PROJECT=/path/to/s32ds_workspace/project_folder
set PATH_FOLDER_TARGET_1=/path/to/target_folder_01
set PATH_FOLDER_TARGET_2=/path/to/target_folder_02

:: Import S32DS project from workspace
%CONFIG_PATH_TOOL_ECLIPSE_CL% -noSplash -data %CONFIG_PATH_PROJECT_WORKSPACE% -import %PATH_FOLDER_PROJECT%\ -application org.eclipse.cdt.managedbuilder.core.headlessbuild

:: Remove existing old generated folders before clean-build
rmdir /q /s %PATH_FOLDER_TARGET_1%
rmdir /q /s %PATH_FOLDER_TARGET_2%

:: Clean-build all configurations
%CONFIG_PATH_TOOL_ECLIPSE_CL% -noSplash -data %CONFIG_PATH_PROJECT_WORKSPACE% -import %PATH_FOLDER_PROJECT%\ -application org.eclipse.cdt.managedbuilder.core.headlessbuild -cleanBuild all

 

Regards,

Turgay

0 Kudos