cancel
Showing results for 
Search instead for 
Did you mean: 

Headless-build no more able to import project into workspace

JulienD
Senior

Hello,

WIth TrueStudio, I was using the headless.bat script to import projects into an empty workspace and clean build all of them.

The script was something like this:

set ECLIPSE_WORKSPACE=%WORKSPACE%\Jenkins\workspace
rmdir "%ECLIPSE_WORKSPACE%" /s /q
 
c:
cd "C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.3.0\ide"
 
headless.bat 	-data "%ECLIPSE_WORKSPACE%" ^
				-import "%WORKSPACE%\project_A" ^
				-import "%WORKSPACE%\project_B" ^
				-cleanBuild all
 

In this script, %WORKSPACE% is passed to the script by jenkins, it's the directory which constains the projects.

I migrate projects to cubeIDE. This script does not work anymore. I looked at the headless-build.bat script and changed my script to something like this:

headless-build.bat 	-workspace "%ECLIPSE_WORKSPACE%" ^
				-project "%WORKSPACE%\project_A" ^
				-project "%WORKSPACE%\unitTests" ^
				-clean all

This does not work. The error is:

Project/Configuration Regular Expression Syntax error: java.util.regex.PatternSyntaxException: Illegal Unicode escape sequence near index 23
D:\Dev\xxxxxx\yyyyyyy\unitTests
                       ^
Skipping "D:\Dev\xxxxxx\yyyyyyy\unitTests"
Saving workspace.

If I remove unitTests project, The error is on the other project.

From the name of the parameters of the script, my interpretation is that CudeIDE is not able to import a project. in a workspage as attolic did.

Is that right?

Wil this function be available in the future.

Thanks

Julien

4 REPLIES 4
mattias norlander
ST Employee

Hi,

We do not recommend using CubeIDE on workspaces created for another Eclipse environment such as TrueSTUDIO. This is not a supported use case, and can never be. CubeIDE uses a much newer Eclipse/CDT platform as well as many other open-source components. And the proprietary plugins from TrueSTUDIO that was migrated into CubeIDE had to be aligned to fit the CubeIDE slightly different architecture.

Please try to first import the project from the TrueSTUDIO workspace into a new CubeIDE workspace using the project importer/converters:

  1. File > Open project from file system...
  2. Then try using headless build with CubeIDE on this converted project to see if that works or not?!

JulienD
Senior

Hi Mattias,

Hum, I thought that the "workspace dir" was empty and that CubeIDE will create a new one but it seems that the workspace is not cleared by the scm

between 2 jenkins calls.

So yo may be write. I might import my CubeIde projects in an atollic workspace.

As I switched back to atollic for many reasons, I will not test it before some times but that's a very interesting clue.

Thanks

Julien

I would be very interesting to hear your feedback as to why you switch back to TrueSTUDIO. WOuld you mind sharing it? You can send me a PM if you prefer to not write it in the forum. Up to you! :)

HJorg
Associate

I also had issues with headless-build.bat It does not support the -import option meaning it needs an existing work space with the projects already imported.

This is an limitation that is added by headless-build.bat.

I ended up with copying the headless.bat from TrueStudio into a local folder and modifying it to call stm32cubeidec.exe instead of TrueSTUDIOc.exe

Additionally I modified the environment variable PATH before calling my local version of headless.bat

set PATH="C:\ST\STM32CubeIDE_1.5.1\STM32CubeIDE\";%PATH%

At least that worked for me