Command-line execution of KDS

cancel
Showing results for 
Search instead for 
Did you mean: 

Command-line execution of KDS

830 Views
oaf
Contributor IV

Hi,

 

Using KDS-3.0, Win7-64

 

I want to make the KSDK libraries by a script. Then the participants on my project doesn't have to know the ins and out of KSDK building, but could just start a script and remake the wanted libraries.

I have used good old 'make' for a while, but the problem is that I have to open all projects first to get the makefiles generated, what I really want is to run KDS in command-line mode.

 

So I'm trying to make the freertos (as an example), the project is located here:

...\KSDK\V_1.2.0\lib\ksdk_freertos_lib\kds\K64F12

 

According to some notes on the web I've tried this:

    ...\KSDK\V_1.2.0\lib\ksdk_freertos_lib\kds\K64F12>C:\Freescale\KDS_3.0.0\eclipse\eclipsec -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -build all -data ./x

 

The output is promising:

    Building All Projects...

    Building workspace

 

BUT!! When importing the project into KDS, I see there is two targets:

    debug

    release

 

And the command-line run has NOT created the 'release' version.

My intention is to create a temporary place for a workspace ('x'), and make both versions.

 

Anyone has input of the correct flags to eclipsec.exe ?

Labels (1)
Tags (2)
4 Replies

129 Views
joeseymour
Contributor III

I'm able to build both the debug and release configurations with the following command:

> c:\Freescale\KDS_3.0.0\eclipse\eclipsec.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild  -import C:\Freescale\KSDK_1.2.0\lib\ksdk_freertos_lib\kds\K64F12 -cleanBuild all -data workspace.headless --launcher.ini c:\Freescale\KDS_3.0.0\eclipse\kinetis-design-studio.ini

There are a few notable additions to the command you're using:

1/ Passing --launcher.ini kinetis-design-studio.ini ensures that eclipsec.exe behaves more like kinetis-design-studio.exe. In my case I need this to find the correct JRE.

2/ Passing -import. This isn't necessary if you've already used kinetis-design-studio to setup the workspace and import projects, but I started with a non-existent workspace.

3/ Using -cleanBuild instead of -build, ensures I'm starting from a clean state, although I'd expect -build to work fine too.

4/ Passing --launcher.suppressErrors, which is useful for unattended builds (Help - Eclipse Platform ).

Of course, there is an overhead attached to launching Eclipse, and some other caveats when dealing with KSDK projects that have dependencies on other projects. The KSDK also provides a cmake build system, which you can find in the armgcc directories. I haven't used it, but perhaps its of interest in your situation.

Hope that helps,

129 Views
oaf
Contributor IV

PS:

When I open the '.log' file in the 'x' workspace I see this peculiar errormessage:

    !MESSAGE Product com.somniumtech.kds could not be found.

0 Kudos

129 Views
johnmoule
Contributor I

Hi,

I haven't tried it but what documentation I could find* suggests building all configurations is the default.

I guess you're able to build all configurations (debug and release) when you're in the the Eclipse IDE?

Are there dependencies with other projecs (libs) that need to be met perhaps?

rgds john

*: Documentation (not found any official documentation)

Scriptable builds from the command line | GNU ARM Eclipse

Bug 186847 – CDT internal builder does not support automated command line builds

source.

33 Views
orenderj
Contributor I

Digging this up from a few years later...

 

Trying this flow inside a docker container

 

kinetis-design-studio \
--launcher.ini kinetis-design-studio.ini \
--launcher.suppressErrors \
-noSplash \
-data /tmp/wsp \
-application org.eclipse.cdt.managedbuilder.core.headlessbuild \
-import $PROJECT_DIR

printf "\n\n---------------------------------------------------------------------\n\n"

kinetis-design-studio \
-noSplash \
-data /tmp/wsp \
-application com.freescale.processorexpert.core.PExApplication -generateAll

 

 

outside of the container, i get a successful build. inside the container i get 

!SESSION 2021-03-23 17:27:22.844 -----------------------------------------------
eclipse.buildId=3.2.0.201603041649
java.version=1.8.0_282
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import all_cell_bms
Command-line arguments: -os linux -ws gtk -arch x86_64 -data /tmp/wsp -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import all_cell_bms

!ENTRY org.eclipse.equinox.app 0 0 2021-03-23 17:27:36.284
!MESSAGE Product com.somniumtech.kds could not be found.

!ENTRY org.eclipse.cdt.core 1 0 2021-03-23 17:27:46.223
!MESSAGE Indexed 'MVBms_rev1_SW' (12 sources, 84 headers) in 7.43 sec: 5,219 declarations; 16,777 references; 110 unresolved inclusions; 32 syntax errors; 866 unresolved names (3.8%)
!SESSION 2021-03-23 17:27:51.368 -----------------------------------------------
eclipse.buildId=3.2.0.201603041649
java.version=1.8.0_282
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -application com.freescale.processorexpert.core.PExApplication -generateAll
Command-line arguments: -os linux -ws gtk -arch x86_64 -data /tmp/wsp -application com.freescale.processorexpert.core.PExApplication -generateAll

!ENTRY org.eclipse.osgi 4 0 2021-03-23 17:27:53.856
!MESSAGE An error occurred while automatically activating bundle com.freescale.processorexpert.core (27).
!STACK 0
org.osgi.framework.BundleException: Exception in com.processorexpert.core.PECoreActivator.start() of bundle com.freescale.processorexpert.core.

 

 

it seems like the eclipse headless build works, but i need to also generate code using processor expert and it is not working inside the docker environment. looking for a resolution if possible. 

0 Kudos