8.4.4. Code Warrior

8.4.4.1. Axivion Eclipse Plugin is installed but does not appear

Eclipse checks dependencies before loading a plugin. So trying to load a plugin whose dependencies are not fulfilled will not produce a runtime error but loading is silently skipped by Eclipse.

Axivion Eclipse Plugin requires

  • Eclipse Platform 4.5.0 (Mars R) or above (should be included in every modern Eclipse)

  • JRE 8 or above

Code Warrior brings its own JRE – which seems to be often JRE 6 – which is too old for the Axivion Eclipse Plugin. If this is the case, Eclipse silently does not load Axivion Eclipse Plugin.

8.4.4.2. Replacing the JRE of Code Warrior

In the installation directory of Code Warrior, there should be a folder eclipsejre which contains the JRE Code Warrior uses.

To replace the JRE rename jre to jre.bak and put your desired JRE in eclipsejre. It may be sufficient to just rename the bundled JRE and then the system JRE is used.

8.4.4.3. Configuring the Build Process with cafeCC

You have to make a few small changes to your project properties (please make sure that $(CC) and $(LD) are not surrounded by quotes):

  1. Compiler, Command: Replace "${S12Z_ToolsDir}/mwccs12lisa" with $(CC)

  2. Build, Environment: Add Variable CC with value "${S12Z_ToolsDir}/mwccs12lisa"

  3. Linker, Command: Replace "${S12Z_ToolsDir}/linker" with $(LD)

  4. Build, Environment: Add Variable LD with value "${S12Z_ToolsDir}/linker"

You can then analyze the project by calling make with options: CC=cafeCC LD=cafeCC

8.4.4.4. Legacy Codewarrior

Very old Codewarrior IDEs (not Eclipse based) bring their proprietary build system that cannot be influenced from outside the IDE itself.

Therefore, it is necessary to run the code analysis with cafeCC via a script by manually coding the calls. Proceed as follows:

  • In the IDE look for EditSettings (Alt-F7), Compiler for and Linker for and tick the box that says “display generated command line in message window”

  • Run the native build

  • From the native build’s protocol windows, copy and paste the output into a text editor

  • Search and replace the calls to the native compiler with calls to cafeCC.