Broadcom SDK under Eclipse CDT

本文介绍如何在Eclipse CDT中同步Makefile宏定义,通过配置解析GCC编译输出,使宏定义在代码浏览和编辑时保持一致。适用于使用Eclipse进行C/C++开发的场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Eclipse version: Kepler

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

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

[list]
[*]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
[/list]

Some tips:
[list]
[*]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
[/list]

好了,在eclipse中浏览、编辑、remote debug吧。。。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值