Classic/Legacy CodeWarrior Knowledge Base

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

Classic/Legacy CodeWarrior Knowledge Base

Labels
  • General 3

Discussions

Sort by:
Classic - How to use HCS12 on Eclipse? -build and debug a CodeWarrior project-             Valid for some Classic versions - CW for MCU V6.x, CW for HC12 V5.1, etc ...   Configuration used:                 Software Native installation Win 7 Enterprise 64 bit                                 CodeWarrior HC12 v5.1                                 CodeWarrior for MCU V10.6.4 (Updates 5&6)                 Hardware                                 S12XDT512                                 Multilink Universal rev B     Introduction Since 2010 we started to move our development tool chains from Classic IDE to Eclipse. However we continue to use classic tools for some products as CW for HC12 V5.x for HCs12 devices. The advantage of HC12 is that all features are used in command line in the IDE. So we can use another IDE than CodeWarrior IDE as Eclipse for instance. This doc will show you how to: - Create a new project using CW HC12 build tools chain, - Define the external debugger to debug the HC12 application.   Attached you will find: - a zip file including the projects. Recommend to unzip it to c:\temp, - 2 videos explaining Build and Debug processes.   More references/information can be found at:             https://community.freescale.com/message/364157#364157 http://mcuoneclipse.com/2012/02/13/make-my-make-with-eclipse-and-mcu10/   NOTE: For Classic versions using integrated debugger, only the build operation can be done under Eclipse. When the debugger is not available as standalone version there is no way to define an External Tools in Eclipse.      Phase 1: Create a Project under Eclipse based on a HC12 project   1-      Create a project for the device you need under HC12 v5.1.   2-      Launch Eclipse and create a new empty project                 File ¦ New ¦ Other … Enable Show All Wizards and select the C Project (which is otherwise hidden), pressing Next. Click OK   Specify the project name, select an Empty Project under Makefile project with — Other Toolchain — and press Finish: Now I have an empty project   Using Project ¦ Properties specify my Build Command:                 ${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make -j6     3-      Copy all HC12 V5.1 Sources and config files to Eclipse project   4-      Create a makefile with the menu File ¦ New ¦ Other... ¦ General ¦ File     Phase 2: Build the project using HC12 build tools chain with makefile   1-      Generate the Commandlines used by HC12 v5.1 to build the project. By this way you will have the options and other paths used for compiler and linker to build the project. We can use these information to create the makefile.    2-      Create the makefile with the menu menu File ¦ New ¦ Other... ¦ General ¦ File An empty makefile is created. You need to create your makefile according to your project. For more details we recommend to refer to the link: http://mcuoneclipse.com/2012/02/13/make-my-make-with-eclipse-and-mcu10/   This is the makefile created for this example. The makefile created contains 2 operations:                                 all -> build the project and generate Srecord files                                 clean -> remove all generated files   3-      Create 2 make targets for all and clean operations with the "Make Target" under Window ¦ show View     Now I can build the project using HC12 v5.1 tools (compiler/Linker) under Eclipse project     Phase 3: Add External debugger to debug hc12 application   HC12 V5.1 is using an external debugger named Hiwave. This tool is using a config file named .ini. To use HiWave under Eclipse project, we need to define it as external Debugger.   By the Run menu click on External Tools ¦ External Tools Configuration… Run will launch the Debugger and the project.ini file will be generated in the \Bin folder                 You can edit the ini file and use the info provided in the .ini file of HC12 V5.1 project   To use these settings, add the Arguments:                 project.abs -w -Target=icd12 -Prod=project.ini   Now the debugger is launched and application loaded on board with Multilink Interface.
View full article
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
View full article
Get “IDE failed to start …” message     A- Description   In some case after to have installed Classic version, you could meet an error when you launch the IDE.     Most of the time the error is introduced because the IDE is not correctly registered. As suggested by the message we need to execute the \bin\regservers.bat file. This will initialize correctly the dlls used by the IDE.   In some case, most of the time under 64 bit OS (Win 7 and Win 8), the \bin\regservers.bat generates some errors:           B- Solution   To solve the problem we need to execute the \bin\regservers.bat file via a Command Prompt running as Administrator mode.   Now we can launch the IDE   Attached a video showing the process.   Hope this will help.
View full article