- 嵌入式Linux设备驱动程序开发指南(原书第2版)
- (西)阿尔贝托·利贝拉尔·德·洛斯里奥斯
- 210字
- 2025-02-18 04:55:57
4.2 代码清单4-1:helloworld_imx_char_driver.c


现在使用Eclipse集成开发环境来开发你的应用程序:
1. 你需要做的第一件事情就是在你的模块代码目录下创建一个apps
子目录:

2. 使用Eclipse创建一个工程名为my_apps
的新Makefile
工程(如图4-2所示)。

图4-2 创建新的Makefile
工程
3. 在my_apps
工程的Build Targets标签中添加all
、deploy
和clean
按钮:

4. 在my_apps
工程中创建一些新文件并将这些文件保存到位于/home/<user_name>/Linux_4.9_<cpu>_drivers/apps/
的apps
目录中:

本书中开发的所有应用程序都将使用同一个Makefile
。对于每一个你想要构建和部署到目标处理器的新应用,你只需要在Makefile
中修改应用程序的名字。