No parser for command '/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-c++ ...'

13 views
Skip to first unread message

qay...@hotmail.com

unread,
Sep 27, 2019, 1:08:47 PM9/27/19
to cmake4eclipse user mailing list

Hello all,

I'm getting error messages like this

Description    Resource    Path    Location    Type
No parser for command '/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-c++  -DCAN_DEBUG_OUTPUT -DDEBUG -DDISABLE_CLASSB_CHECKS -DEVENT_ADDITONAL_DATA_SIZE=32 -DSTM32L431xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -I../../inc -I../../src -I../../src/system/FWLib/STM32L4xx_HAL_Driver/Inc -I../../src/system/FWLib/CMSIS/inc -I../../src/Assert -I../../src/system/Init -I../../src/system/IO -I../../src/system/USART -I../../src/system/Led -I../../src/system/CAN -I../../src/system/LPTimer_Base -I../../src/ErrorHandler -I../../src/system/DEBUG -I../../src/system/FLASH -I../../lib -I../../src/system/AFE -I../../src/system/ADC -I../../src/system/CRC -I../../src/system/NVM -I../../src/system/RNG  -O2 -ffunction-sections -fdata-sections -ggdb -flto -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fno-builtin    -Wall -Wextra -Wswitch-enum -Wpedantic -Wshadow    -Wcast-align=strict -Wconversion -Wparentheses -Wmissing-declarations    -Wredundant-decls -Wimplicit-fallthrough=2      -Wconditionally-supported -Wuseless-cast -Wno-variadic-macros  -std=c++14 -g   -o src/CMakeFiles/src.dir/analog_system.cpp.obj -c /home/bodo/eclipse-workspace/mulde_sw/src/analog_system.cpp'. Your workbench will not know all include paths and preprocessor defines.    compile_commands.json    /mulde_sw/build/Debug    de.marw.cmake.cdt.language.settings.providers.CompileCommandsJsonParser    CMAKE_EXPORT_COMPILE_COMMANDS Parser Problem

My host system is Ubuntu 19.04.
I'm using an ARM GCC cross compiler toolchain in a project with both C and C++ code.
The problem seems to occur for C++ files, but not for C files.

When I check the Entries tab in the project settings "Preprocessor Include Paths, Macros etc.", for GNU C, there are include directory entries below CMAKE_EXPORT_COMPILE_COMMANDS Parser and include directories and macros below CMAKE_EXPORT_COMPILE_COMMANDS Compiler Built-ins, but nothing for GNU C++.


The CMake toolchain file specifies

set(CROSS_TOOLCHAIN_PREFIX arm-none-eabi-)
set(CMAKE_C_COMPILER "${CROSS_TOOLCHAIN_PREFIX}gcc")

There is no specification for CMAKE_CXX_COMPILER


Here are two example sections in compile_commands.json, one for C and one for C++

[
...

{
  "directory": "/home/bodo/eclipse-workspace/mulde_sw/build/Debug",
  "command": "/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-gcc -DCAN_DEBUG_OUTPUT -DDEBUG -DDISABLE_CLASSB_CHECKS -DEVENT_ADDITONAL_DATA_SIZE=32 -DSTM32L431xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -I../../src/system/FWLib/CMSIS/inc -I../../src/system/FWLib/STM32L4xx_HAL_Driver/Inc -I../../src/Assert -I../../src/system/USART  -O2 -ffunction-sections -fdata-sections -ggdb -flto -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fno-builtin    -Wall -Wextra -Wswitch-enum -Wpedantic -Wshadow    -Wcast-align=strict -Wconversion -Wparentheses -Wmissing-declarations    -Wredundant-decls -Wimplicit-fallthrough=2  -Wmissing-prototypes -Wstrict-prototypes  -std=c11 -g   -o src/system/FWLib/CMSIS/CMakeFiles/cmsis.dir/src/system_stm32l4xx.c.obj   -c /home/bodo/eclipse-workspace/mulde_sw/src/system/FWLib/CMSIS/src/system_stm32l4xx.c",
  "file": "/home/bodo/eclipse-workspace/mulde_sw/src/system/FWLib/CMSIS/src/system_stm32l4xx.c"
},

{
  "directory": "/home/bodo/eclipse-workspace/mulde_sw/build/Debug",
  "command": "/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-c++  -DCAN_DEBUG_OUTPUT -DDEBUG -DDISABLE_CLASSB_CHECKS -DEVENT_ADDITONAL_DATA_SIZE=32 -DSTM32L431xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -I../../src/system/USART -I../../src/system/CRC -I../../src/system/DEBUG -I../../lib  -O2 -ffunction-sections -fdata-sections -ggdb -flto -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fno-builtin    -Wall -Wextra -Wswitch-enum -Wpedantic -Wshadow    -Wcast-align=strict -Wconversion -Wparentheses -Wmissing-declarations    -Wredundant-decls -Wimplicit-fallthrough=2      -Wconditionally-supported -Wuseless-cast -Wno-variadic-macros  -std=c++14 -g   -o src/system/AFE/CMakeFiles/afe.dir/bq79606.cpp.obj -c /home/bodo/eclipse-workspace/mulde_sw/src/system/AFE/bq79606.cpp",
  "file": "/home/bodo/eclipse-workspace/mulde_sw/src/system/AFE/bq79606.cpp"
},

...
]


Why is the parser not able to process the C++ compile commands?


Best regards,
Bodo

15 knots

unread,
Sep 28, 2019, 7:48:28 AM9/28/19
to cmake4eclipse user mailing list
Am Fr., 27. Sept. 2019 um 19:08 Uhr schrieb <qay...@hotmail.com>:
>
>
> Hello all,
>
> I'm getting error messages like this
>
> Description Resource Path Location Type
> No parser for command '/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-c++ -DCAN_DEBUG_OUTPUT -DDEBUG > There is no specification for CMAKE_CXX_COMPILER
>
>
> Here are two example sections in compile_commands.json, one for C and one for C++
> "command": "/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-gcc -DCAN_DEBUG_OUTPUT -DDEBUG
> "command": "/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-c++ -DCAN_DEBUG_OUTPUT -DDEBUG>
> Why is the parser not able to process the C++ compile commands?

The compiler name does not match any recognition pattern. For C++
cross compilers, (e.g. arm-none-eabi-gcc), the pattern is
".+-g\+\+"

Please file an issue at
https://github.com/15knots/cmake4eclipse/issues that requests to add
pattern ".+c\+\+".
Reply all
Reply to author
Forward
0 new messages