Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Custom CDT build parser for auto discovery
icon14.gif  Custom CDT build parser for auto discovery [message #1732542] Wed, 18 May 2016 03:29 Go to next message
Eclipse UserFriend
Hi there.
I am trying to parse the output from the makefile, I need the -I -D to be added to the CDT built output parser.
Unfortunately we use Keil arm compiler, and for example the command is like exampled below.
My plan was to edit the regex to catch the armcc.exe command like that:
"(.*gcc)|(.*[gc]\+\+)|(clang)|(".*armcc.exe")"
but nothing is added...

Any idea how could it work?
Thanks in advance!
David.

"C:/Program Files/Keil_4_70a/ARM/ARMCC/bin/armcc.exe" --device=DARMSTM -c --c90 --thumb --debug --apcs=interwork --apcs=/ropi --diag_style=arm --list --littleend -O0 -Otime --show_cmdline --no_unaligned_access --split_sections --lower_ropi -I"./w_stack" -I"./w_stack/mac" -I"./w_stack/mac/pre_header" -I"./w_stack/mac/csma" -I"./w_stack/mac/report" -I"./w_stack/mac/logger" -I"./w_stack/nwk" -I"./w_stack/nwk/ctrl" -I"./w_stack/nwk/fld" -I"./w_stack/nwk/ping" -I"./w_stack/nwk/sl_api" -I"./w_stack/nwk/assoc" -I"./w_stack/nwk/route" -I"./w_stack/nwk/report" -I"./w_stack/util/mem" -I"./w_stack/util/time" -I"./w_stack/util/report" -I"./w_stack/util/logger" -I"./w_stack/util/wdt" -I"./w_stack/util/cp" -I"./w_stack/app" -I"./w_stack/app/sl" -I"./w_stack/cp" -I"./w_stack/cfg" -I"./w_stack/app/mgt_proc" -I"./w_stack/util/ed" -I"./w_stack/util/checksum" -I"./ed/const" -I"C:/Program Files/Keil_4_70a/ARM/ARMCC/include" -I"./hal" -I"./hal/frm" -I"./hal/mcu" -I"./hal/board" -I"./hal/platform" -I"./hal/rffe" -I"./hal/trns" -I"./hal/ma" -I"./hal/fhop" -I"./hal/cfg" -I"./hal/util" -I"./hal/uart_api" -I"./hal/cipher" -I"./hal/fec" -I"./hal/jig" -I"./hal/crc32" -I"./hal/cdwnld" -I"./hal/trace" -I"./hal/report" -I"./hal/group_b" -I"./hal/mcu/STM32L1xx_StdPeriph_Lib_V1.1.1/Libraries/STM32L1xx_StdPeriph_Driver/inc" -I"./hal/mcu/STM32L1xx_StdPeriph_Lib_V1.1.1/Libraries/STM32L1xx_StdPeriph_Driver/project" -I"./hal/mcu/STM32L1xx_StdPeriph_Lib_V1.1.1/Libraries/CMSIS/Device/ST/STM32L1xx/Include" -I"./hal/mcu/STM32L1xx_StdPeriph_Lib_V1.1.1/Libraries/CMSIS/Include" -I"./ed" -I"./ed/const" -I"./pc_tools/logger" -I"./projects/ami/app" -I"./projects/ami/app/cfg" -I"./projects/ami/app/report" -I"./w_stack/nwk/join" -I"./w_stack/nwk/ctrl" -I"./w_stack/nwk/sl_api" -I"./w_stack/mac/hal_api" -I"./w_stack/mac/nwk_queue" -I"./w_stack/util/generic_buf" -I"./w_stack/mac/nwk_top" -I"./w_stack/trn" -I"./w_stack/trn/report" -I"./w_stack/util/string" -I"./w_stack/util/modbus" -I"./w_stack/util/timer" -I"./projects/two_way" -DHAL_BASIC_TYPES_H=\"hal_stm32_basic_types.h\" -DHAL_MCU_H=\"stm32l1xx_conf.h\" "-DCONFIG_H=\"cfg_ami.h\"" "-DCFG_APP_SL_H=\"cfg_app_two_way.h\"" "-DPROJECT_CP_H=\"two_way_cp.h\"" "-DSW_VERSION_H=\"mpwn_config.h\"" -DSTREET_LIGHT -DPROJECT_ID=APP_SL_CFG_PID_2WAY -DIS_MODBUS_ON=0 "-DMAC_MEM_STRUCT_H=\"_struct.h\"" -DVECT_TAB_FLASH -o "./bin/debug/two_way_api.o" projects/two_way/two_way_api.c >> ./bin/debug/bld_log 2>&1
Re: Custom CDT build parser for auto discovery [message #1733102 is a reply to message #1732542] Tue, 24 May 2016 08:10 Go to previous messageGo to next message
Eclipse UserFriend
Do you mean that you have that string exactly as you wrote in the Compiler command pattern, including all the quotation marks? If you only use the armcc.exe, then why you need the gcc/g++ parts?

An example, probably not what you want but maybe adds a little help:
In Linux, I have a make output with compiler /path/to/my_little-compiler++, and I use the (my_little-compiler\+\+) setting. It works, though the discovered settings are added to the individual CPP source files rather than to the project toplevel settings. In the project explorer, little wrench "sub-icons" denote the CPP files that have discovered settings after a successful build (looks like the header files are not handled by this feature).

I don't have quotation marks in my make output, so I can't help you in that, but probably you could try out the following settings:
(armcc\.exe)
(armcc\.exe)"
(armcc\.exe")

I don't know if the parentheses are necessary (in a regular expression they usually mean a capture group, and the matched string may be used by CDT for something internally, so I kept them).
Re: Custom CDT build parser for auto discovery [message #1733184 is a reply to message #1733102] Tue, 24 May 2016 21:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi Tamás, you were right!
The CDT parsed the compiler output, it simply placed the result in each file individually, and not in the whole project.

Thanks for the help Smile
Re: Custom CDT build parser for auto discovery [message #1752058 is a reply to message #1733184] Wed, 18 January 2017 06:58 Go to previous message
Eclipse UserFriend
David Choen wrote on Wed, 25 May 2016 04:06

The CDT parsed the compiler output, it simply placed the result in each file individually, and not in the whole project.


I found today that this behaviour can be changed (at least in Neon).

Go to Preferences - C/C++ - Build - Settings - Discovery tab.
Then select the "CDT CGC Build Output Parser", then below select "Project" in the "Container to keep discovered entries".

regards,
Previous Topic:Project Clean does not work
Next Topic:No desired console otput
Goto Forum:
  


Current Time: Fri Jun 13 19:30:40 EDT 2025

Powered by FUDForum. Page generated in 0.05016 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top