Currently I'm developing in S32DS unter windows 10, but I want to automate build and compilation as a CI job via jenkins in a ubuntu system.
I installed S32ds there too and can start in as a gui, but want to run the command line version there for automation.
Some problems I'm still trying to solve:
Somehow I find lots of windows related absolute path settings within my .project file. Those should be using variable prefixes instead.
The SDK variable names contain dots which isn't allowed anywhere under linux. So I can't redefine them from external shell scripts.
Currently I tried to define my own variables without any strange characters in it to contain the SDK folders, but now it doesn't find the cross compiler.
arm-none-eabi-gcc: not found
So it seems now the SDK stuff loads, but some other environment stuff is still missing.
So the big Question: Did anyone already tried developing under windows but command line compiling from the same git repo under linux?
Hi Kai,
I had the very same goal as yours and have solved it!
There are several points to consider:
With all the step completed here is the command I use to build a project non-interactively by Jenkins:
set -x
set -e
NXP_DIR=/opt/NXP
PROJECT_NAME=FOOBAR
PROJECT_DIR=./${PROJECT_NAME}
WORKSPACE_DIR=./workspace
# Fix linked resources
sed -i -e "s#<location>C:/NXP/#<location>${NXP_DIR}/#g" ${PROJECT_DIR}/.project
# Fix path to extenal tools
sed -i -e 's#${MSYS_LOC}/bash.exe#/bin/bash#g' ${PROJECT_DIR}/.externalToolBuilders/*
sed -i -e 's#${MSYS_LOC}/make.exe#/usr/bin/make#g' ${PROJECT_DIR}/.externalToolBuilders/*
# Build
${NXP_DIR}/S32DS_ARM_v2018.R1/eclipse/s32ds \
-nosplash \
--launcher.suppressErrors \
-application org.eclipse.cdt.managedbuilder.core.headlessbuild \
-data ${WORKSPACE_DIR} \
-no-indexer \
-importAll ${PROJECT_DIR} \
-build all
# Rename SREC files to have version number embedded
for file in $(find ./${PROJECT_DIR} -name *.srec); do
if [ -e "${file}" ]; then
pushd $(dirname "${file}")
TAG=$(git describe --always --long)
mv "$(basename "${file}")" $(basename "${file}" .srec)-${TAG}.srec
popd
fi
done
Few comments:
Good luck!
Regards,
Maksim.
Hi,
quick update - the SDK (and processor expert) is not supported on Linux host for S32DS Arm (please see release notes). Anyway, the same issue is on S32DS Power, where is SDK present and projects are incompatible.
Jiri
Hi,
thank you for report. I did some tests and projects based on SDK aren't compatible between S32DS running on Windows and Linux. I'm afraid that right now there is no workaround to have one project which can be build on both platforms. Only what may be working is to have shared source code and separate projects settings data for for each platform (at least linux and win .cproject, .project and ProcessorExpert.pe files version).
Non SDK projects are working fine across both platforms. I'll rise JIRA ticket for this issue. Thanks.
Jiri