Broadcom SDK under Eclipse CDT

Eclipse version: Kepler

Broadcom交换芯片SDK有很多Macro, Make.config中定义,defs.h中也定义,一些生成的文件中也定义,在Eclipse的CDT中浏览或者开发代码时,要让eclise aware这些marcro才能又对应的index, 怎样让Make.local中的定义和Eclipse中看到的一样呢。。。。经过不懈的追求。。

其实很简单,CDT支持对makefile编译outputs做分析,找到你用了哪些宏,这是个让人泪流满面的改进,以前手工一个一个加费劲还总是不一致。具体操作如下:

  • Project Properties -> C/C++ General -> Preprocessor include paths, Macros etc.-> Provides
  • Check CDT GCC build output parser
  • Check "Store entries in project settings folder"
  • Change your GCC command name if you are using cross compiler
  • Container to keep discovered entries: Project


Some tips:
  • Parsed MACROs only effect for index and code editor, no effect to make process
  • Parsed result is saved in your project/.settings/Language.settings.xml
  • Make a clean build w/o "-s" in eclipse to let parser work - this take time, is there an easy way?
  • Enable partial build if possible to save compile time, see Make.local.template for detail


好了,在eclipse中浏览、编辑、remote debug吧。。。

你可能感兴趣的:(eclipse,sdk,Broadcom,CDT)