适用于 Xcode 4 的 AVR?
有人成功使用 xcode 4 作为 AVR 微控制器的 IDE 吗?是否有可能与 eclipse 的插件具有相同的集成度?
Has anyone had success using xcode 4 as an IDE for AVR microcontrollers? Is it possible to have the same amount of integration as the plugin for eclipse?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的。我在编写 AVR 代码时使用 Xcode 4 作为 IDE。
但它只能作为 avc-gcc 命令行工具的“包装器”。我的项目中有三个 Xcode 目标:build(“make all”:仅编译)、fuse(“make fusion”:程序熔断)和 flash< /strong>(“make flash”:编译并下载到 AVR)。只需选择适当的目标并按 Cmd-B 即可构建。
没有太多的整合。我仍然需要编辑 Makefile 来设置时钟频率、编程器和设备模型以及熔丝值。如果我添加更多 .c 文件,我还必须将相应的 .o 文件添加到 Makefile 中。但至少我可以在 Xcode 中做到这一点。
我创建了一个最小的项目模板,允许您在 Xcode 中创建新的 AVR 项目。在此处获取文件 http://dl.dropbox.com/u/1194636/AVR_Xcode4_template.zip 。解压存档并将 Atmel AVR® 文件夹放入 ~/Library/Developer/Xcode/Templates(您可能需要创建 Templates 文件夹)。
Yes. I use Xcode 4 as IDE when writing AVR code.
But it only works as a "wrapper" for the avc-gcc command line tools. I have three Xcode targets in the project: build ("make all": compile only), fuse ("make fuse": program fuses) and flash ("make flash": compile and download to AVR). Just select the appropriate target and hit Cmd-B to build.
There is not much integration. I still have to edit the Makefile to set clock frequency, programmer and device model and fuse values. And if I add more .c files I also have to add the corresponding .o file to the Makefile. But at least I can do it from within Xcode.
I have created a minimal project template that will allow you to create a new AVR project in Xcode. Get the file here http://dl.dropbox.com/u/1194636/AVR_Xcode4_template.zip. Extract the archive and put the Atmel AVR® folder into ~/Library/Developer/Xcode/Templates (you might need to create the Templates folder).
第二个答案(http://dl.dropbox.com/u/1194636/AVR_Xcode4_template.zip)中的模板工作正常,但需要进行一些调整。您必须将它们放入模板中的文件“makefile”中才能包含多个项目中的文件:
在 SRC 部分中,您需要输入项目中构建的所有文件(例如 mynewfile.c)。
另一项增强功能是在链接后清除项目中的所有 obj 文件...在 makefile 中找到 main.hex 部分,然后将 rm -f 行更改为以下
内容 除此之外,一切都保持不变。我无法找到的是如何启用此模板的代码完整。如果有人知道我将不胜感激。
Template from second answer (http://dl.dropbox.com/u/1194636/AVR_Xcode4_template.zip) works fine but with some tweaks.. You have to put these in file "makefile" in the template to be able to include multiple files in the project:
in SRC section you need to enter all files that are built in the project (for example mynewfile.c).
One more enhancement is to clear all the obj files from the project, after the linking ... Find the section main.hex in makefile and change rm -f line with following
Other then that, everything stays the same. What i couldnt find out is how i can enable code complete for this template. If anyone knows i would appreciate the help.