Re: [arm-gnu] CodeSourcery and Klocwork
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] CodeSourcery and Klocwork



Heyendal, Carl wrote:
Hi,
Klocwork is a static code analyzer tool that we use. I'm also using *CodeSourcery Lite for Arm GNU/Linux* for Windows. Normally Klocwork can understand regular GNU compiler commands such as 'gcc'. But Code Sourcery invokes their GNU compiler without directly calling 'gcc'. The command line compiler invocation is *'arm-none-linux-gnueabi-gcc'* rather than just plain *'gcc'*. Consequently, Klocwork doesn't recognize the command. Elsewhere within the Code Sourcery directory structure, there is a directory that contains the conventional commands such as 'gcc.exe', but I can't directly call 'gcc' because I get this error:

    gcc  -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -I"C:\Program
    Files\CodeSourcery\Sourcery G++ Lite\arm-none-linux-gnueabi\libc\usr
    \include" debug.c -o debug.o
    gcc: CreateProcess: No such file or directory
    cs-make: *** [debug.o] Error 1

Does anyone know how to get around this so that KW will work with my project?

Write a wrapper "gcc.exe" which calls "arm-none-linux-gnueabi-gcc.exe" and place the wrapper in bin\, and try to use KW.

Be aware that "gcc.exe" is traditionally the name of the native compiler e.g. a compiler that compiles for Windows.

For example if you install Sourcery G++ for IA32 Windows, it will install a "gcc.exe" into bin\, because that toolchain builds Windows applications.

Cheers,
Carlos.
--
Carlos O'Donell
CodeSourcery
carlos@xxxxxxxxxxxxxxxx
(650) 331-3385 x716