Classic - How to use dashboard (Jenkins) to build a CodeWarrior project?
Valid for all Classic IDE versions - CW for MCU V6.x, CW for PA V8.8, etc ...
Configuration used:
Native installation Win 7 Enterprise 64 bit
Jenkins ver 1.624.
https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins
http://jenkins-ci.org/content/windows-installers-are-now-available
Multiple CodeWarrior installations including CW for MGT V9.2
Example based on CW for MGT V9.2
You should have installed Jenkins (V1.624 for this note) and CW for MGT V9.2 or any other classic versions.
When the Jenkins installation is finished, the IE is automatically launched with http://localhost:8080/
To start Jenkins under IE I should plug it under http://localhost:8080/
Note:
If you can not access to the web page, you must check than Jenkins service is running.
Open a Command Prompt and go to C:\Program Files (x86)\Jenkins
Here you can type:
Net stop Jenkins
Net start Jenkins
To avoid problem I've manually removed the project under C:\Program Files (x86)\Jenkins folder and performed from menu: Jenkins + Manage Jenkins + Reload configuration from disk
By this way I've a clean installation.
Now I've created a new item where I defined the project and added the dir command to be sure Jenkins is using the right path. I copied and extracted the zip file (Jenkins_command_line.zip) in the workspace created.
Check the .bat file is correctly configured for your PC installation (CodeWarrior Folder).
If you execute the bat file, it should work fine outside Jenkins too.
If it's not the case you must review the .bat file.
After that I added a new build step for my_test.bat.
Now when I clicked on Build Now, the my_test.bat is executed.
Attached a video showing the process, this doc in word doc, and the example I'm using
Hi,
With reference to this line that you have mentioned above for using dashboard (Jenkins) to build a CodeWarrior project,
"I copied and extracted the zip file (Jenkins_command_line.zip) in the workspace created. "
i tried to download Jenkins_command_line.zip
but it showed :-
The item does not exist. It may have been deleted.
so from where i cand download the same attachment and what does this file Jenkins_command_line.zip contains and how will it impact the whole procedure?
Hello,
I am using the S12ZVL controller. Working on an urgent project and want to integrate CodeWarrior with Jenkins as per this link https://community.nxp.com/message/1329130?commentID=1329130#comment-1329130 I have installed the Jenkins plugin and connected to the server and working fine but I want to compile the program but as per the video, not gettingJenkins_command_line.zip file. Getting below error for download.
Help me with this issue ASAP.
Thank you in advance.
Hi chaitanya.kalyani@seoyonelec-rnd.in,
Regarding your query, I had received reply from NXP technical support staff.
Reply - The .zip file is no longer available. The support staff also mentioned that they will try to track down the file, but cannot gurantee that it will be recovered.
Hope it helps
Hello pratibhasurabhi,
Can I know is there any other way to integrate the Jenkins with CodeWarrior I need it on urgent basis.
Thank you in advance.
Hi Chaitanya,
You can use command line for building your CodeWarrior project and you can use the batch script for building CodeWarrior project directly in jenkins.
I have referred "CodeWarrior Common Features Guide.pdf" in the freescale folder for the same , this pdf contains the command line interface chapter.
I am attaching the screenshot of the build process through Jenkins for codewarrior project.
1) Enter your project name and then select Freestyle project
2) After 1st step Leave everything as default or you can customize other settings in dashboard as per your requirement and directly jump to Build section in Jenkins.
In ADD build step select "Execute Windows batch command"
3) A command pop up box will appear where you have to write the build command using batch script for accessing ECD.exe . For codewarrior10, ECD.exe is present in Freescale folder structure.
In my case it is present in the path >> Freescale\CW MCU v10.7\eclipse .
4) After that just select apply >> save and then build.
5) After building gets completed you can check in the console output for OK build and target generation.
Hope it helps.
Hello pratibhasurabhi,
Thanks a lot for your quick response and Help.
I have successfully done integration of CW with Jenkins but a different way because for build command getting the issue.
I will explain the steps so it will be helpful for others.
Install Windows Exe Runner Plugin from Manage Jenkins >> Plugin Manager
Configure ecd.exe in Jenkins Manage Jenkins >> Global Tool Configuration >> Windows Exe
In jobs for Build Select "Windows Exe"
Then for Exe name select ecd from the dropdown and give a command-line argument as '-build -data -cleanBuild -project "D:\JenkinsTest" '
for "D:\JenkinsTest" you can give %Workspace% if you want to compile program form CW workspace and remove "-project". For more
information refer to "CodeWarrior Common Features Guide.pdf"- 2.2 Command line interface
save the project and build it. That's all.
I hope this will help others.