Connecting Jenkins and Codewarrior 5.9.0 Make Build

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

Connecting Jenkins and Codewarrior 5.9.0 Make Build

742 Views
Luna_Maverick
Contributor II

Hi.

I'm a developer developing with the S912XET256 MCU.

I'm trying to connect Jenkins and the Codewarrior 5.9.0 IDE to create an automated build.

I know that pressing the "make" button in the Codewarrior 5.9.0 IDE starts the build.

And I know that the resulting *.s19 and *.map files are created in the bin folder.

I'm creating a Build.bat file to connect with Jenkins.

I need to know what the *.exe file is that executes the "make" button.

I look forward to your response.

Thank you.

Tags (4)
0 Kudos
Reply
1 Reply

608 Views
Luna_Maverick
Contributor II

I'm uploading a sample Jenkins connection bat file. Please refer to it.

As of Codewarrior 5.9.0, the build program is CmdIDE.exe.

S912XET256.bat

@echo off
setlocal enabledelayedexpansion

set "CW_PATH=C:\Program Files (x86)\Freescale\CWS12v5.1\bin\CmdIDE.exe"
set "PROJECT_ROOT=%~dp0.."
set "MCP_FILE=%PROJECT_ROOT%\Project.mcp"

echo [INFO] Build Start...
echo [INFO] Executing CmdIDE with Force Build...
"%CW_PATH%" "%MCP_FILE%" /F /C /M /E /S

set "BUILD_EXIT_CODE=%errorlevel%"

echo [DEBUG] Searching for generated .s19 files...
dir /s "%PROJECT_ROOT%\*.s19"

if %BUILD_EXIT_CODE% neq 0 (
echo [ERROR] Build Failed with code %BUILD_EXIT_CODE%
exit /b %BUILD_EXIT_CODE%
)
exit /b 0

Thanks.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2289951%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EConnecting%20Jenkins%20and%20Codewarrior%205.9.0%20Make%20Build%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289951%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi.%3C%2FP%3E%3CP%3EI'm%20a%20developer%20developing%20with%20the%20S912XET256%20MCU.%3C%2FP%3E%3CP%3EI'm%20trying%20to%20connect%20Jenkins%20and%20the%20Codewarrior%205.9.0%20IDE%20to%20create%20an%20automated%20build.%3C%2FP%3E%3CP%3EI%20know%20that%20pressing%20the%20%22make%22%20button%20in%20the%20Codewarrior%205.9.0%20IDE%20starts%20the%20build.%3C%2FP%3E%3CP%3EAnd%20I%20know%20that%20the%20resulting%20*.s19%20and%20*.map%20files%20are%20created%20in%20the%20bin%20folder.%3C%2FP%3E%3CP%3EI'm%20creating%20a%20Build.bat%20file%20to%20connect%20with%20Jenkins.%3C%2FP%3E%3CP%3EI%20need%20to%20know%20what%20the%20*.exe%20file%20is%20that%20executes%20the%20%22make%22%20button.%3C%2FP%3E%3CP%3EI%20look%20forward%20to%20your%20response.%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2292912%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Connecting%20Jenkins%20and%20Codewarrior%205.9.0%20Make%20Build%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2292912%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20uploading%20a%20sample%20Jenkins%20connection%20bat%20file.%20Please%20refer%20to%20it.%3C%2FP%3E%3CP%3EAs%20of%20Codewarrior%205.9.0%2C%20the%20build%20program%20is%20CmdIDE.exe.%3CBR%20%2F%3E%3CBR%20%2F%3ES912XET256.bat%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F3933%22%20target%3D%22_blank%22%3E%40echo%3C%2FA%3E%20off%3CBR%20%2F%3Esetlocal%20enabledelayedexpansion%3C%2FP%3E%3CP%3Eset%20%22CW_PATH%3DC%3A%5CProgram%20Files%20(x86)%5CFreescale%5CCWS12v5.1%5Cbin%5CCmdIDE.exe%22%3CBR%20%2F%3Eset%20%22PROJECT_ROOT%3D%25~dp0..%22%3CBR%20%2F%3Eset%20%22MCP_FILE%3D%25PROJECT_ROOT%25%5CProject.mcp%22%3C%2FP%3E%3CP%3Eecho%20%5BINFO%5D%20Build%20Start...%3CBR%20%2F%3Eecho%20%5BINFO%5D%20Executing%20CmdIDE%20with%20Force%20Build...%3CBR%20%2F%3E%22%25CW_PATH%25%22%20%22%25MCP_FILE%25%22%20%2FF%20%2FC%20%2FM%20%2FE%20%2FS%3C%2FP%3E%3CP%3Eset%20%22BUILD_EXIT_CODE%3D%25errorlevel%25%22%3C%2FP%3E%3CP%3Eecho%20%5BDEBUG%5D%20Searching%20for%20generated%20.s19%20files...%3CBR%20%2F%3Edir%20%2Fs%20%22%25PROJECT_ROOT%25%5C*.s19%22%3C%2FP%3E%3CP%3Eif%20%25BUILD_EXIT_CODE%25%20neq%200%20(%3CBR%20%2F%3Eecho%20%5BERROR%5D%20Build%20Failed%20with%20code%20%25BUILD_EXIT_CODE%25%3CBR%20%2F%3Eexit%20%2Fb%20%25BUILD_EXIT_CODE%25%3CBR%20%2F%3E)%3CBR%20%2F%3Eexit%20%2Fb%200%3CBR%20%2F%3E%3CBR%20%2F%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E