[英]Configuring Eclipse for Linux Kernel module development
I'm trying to configure Eclipse for developing Linux Kernel Modules under Ubuntu. 我正在尝试配置Eclipse以在Ubuntu下开发Linux内核模块。 So far I've added to
Properties
> Paths and Symbols
> Includes
> GNU C
headers from directory /usr/src/'uname -r'/include
but it doesn't remove all the Syntax error
from my code. 到目前为止,我已添加到目录
/usr/src/'uname -r'/include
Properties
> Paths and Symbols
> Includes
> GNU C
头,但它不会从我的代码中删除所有Syntax error
。
After that, my code looks like this: 之后,我的代码如下所示:
What else should I do to develop Kernel modules with pleasure? 我还应该做些什么来愉快地开发内核模块?
If you're interested, those orange squigglies are actually indexer markers. 如果您有兴趣,那些橙色波浪形实际上是指数标记。 Turn them off by going to window/preferences/general/editors/text editors/annotations, select c/c++indexer markers and uncheck 'text as'.
通过转到窗口/首选项/常规/编辑器/文本编辑器/注释,选择c / c ++索引器标记并取消选中“text as”来关闭它们。
Also, this was posted on the Eclipse wiki: http://wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source 此外,它发布在Eclipse维基上: http : //wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source
If you are building an Out-of-Tree kernel module, follow the steps in the CDT wiki (linked in @pjenney58's response). 如果要构建Out-of-Tree内核模块,请按照CDT wiki中的步骤进行操作(链接在@ pjenney58的响应中)。
The key difference is at Step 30 ( Source Location ->expand your project name). 关键区别在于步骤30( 源位置 - >扩展您的项目名称)。
In my project that took care of almost all the indexer markers complaining about syntax errors. 在我的项目中,几乎所有的索引器标记都在抱怨语法错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.