Grblv1.1版本的编译方法wiki翻译

Grbl v1.1 compile

source website: https://github.com/gnea/grbl/wiki/Compiling-Grbl

Via the Arduino IDE (AllPlatforms): Recommended for all users.

通过Adruino IDE的方法(全平台):推荐所有人使用

Thanks to thegreat people working on the Arduino IDE, it has everything you need to compilegrbl included in their software package. This method compiles the Grbl source codeand automatically uploads it to an Arduino. You can't directly flash apre-compiled .hex file through the IDE interface. See our Flashing Grbl to an Arduino wiki page forhow to do this if you only have a .hex file.

感谢那些开发ArduinoIDE的人,它包含了Grbl开发的环境,你需要完成的只要有它的软件包就可以了。这种编译的方法的可以将源代码并自动下载到Arduino上。你不能通过IDE界面直接烧写Hex文件。看我们的Flashing Grbl to an Adruino wiki页面,你可以知道怎么样只是用.hex文件烧写

NOTE: Before starting, delete prior Grbl library installations from theArduino IDE. Otherwise, you'll have compiling issues! On a Mac, Arduinolibraries are located in ~/Documents/Arduino/libraries/. On Windows, it's in MyDocuments\Arduino\libraries. On UBUNTU it's in /usr/share/arduino/librairies

注意:在开始之前,删除你之前按装在Arduino IDE中的Grbl库,否则你会有编译问题,在Mac上,库在~/Documents/Arduino/libraries/.,在windows上,库文件在My Documents\Arduino\libraries.在UBUNTU上,库文件在/usr/share/arduino/librairies

 

  1. Download the Grbl source code.

下载Grbl的源码(先要打开网站,网址在websit)

  • Click on the <>Code Tab

点击该目录

  • Click the button on the Grbl home page.

点击这个按钮

  • Click the Download ZIP

点击压缩包

  • Unzip the download and you'll have a folder called grbl-XXX, where XXX is the release version.

解压压缩包,你会得到一个grbl-XXX的文件,其中XXX是版本号

  1. Launch the Arduino IDE

打开Arduino的IDE

  • Make sure you are using the most recent version of the Arduino IDE!

确保你使用的是最新版本的ArduinoIDE

  1. Load the grbl folder into the Arduino IDE as a Library.

加载你的Grbl文件夹到你的Arduino IDE 的库上面

  • Click the Sketch drop-down menu, navigate to Include Library and select Add .ZIP Library. The Add .ZIP Library command supports both a .ZIP file or a folder. In our case, there is no .ZIP file.

点击Sketch下拉菜单,找到Include Libraryà Add .ZIPLibrary, zip库命令支持一个zip文件或一个文件夹。在我们的例子中,没有zip文件(所以你只要选择文件夹就可以了)。

  • You can confirm that the library has been added. Click the Sketch drop-down menu again, navigate to Include Library, then scroll to the bottom of the list where you should see grbl.

为了确认已添加了该库。单击草图下拉菜单再次浏览包括图书馆,然后滚动到下方的列表,你可以查看到库

  • IMPORTANT: Select the grbl folder inside the grbl-XXX folder, which only contains the source files and an example directory.

重要的一点:选择grbl-XXX文件夹中的grbl文件夹,这里面包含了一个源文件和一个实例文件夹

  • If you accidentally select the .zip file or the wrong folder, you will need to navigate to your Arduino library, delete the mistake, and re-do Step 3.

如果你不小心选择ZIP文件或错误的文件夹,您需要导航到你的Arduino库,删除错误,再做3步。

  1. Open the GrblUpload Arduino example.

打开GrblUpload里的Arduino例程

  • Click the File down-down menu, navigate to Examples->Grbl, and select GrblUpload.

单击down下拉菜单,找到Examples->Grbl->GrblUpload

  1. Compile and upload Grbl to your Arduino.

编译并下载Grbl到你的Arduino上面

  • Connect your Arduino Uno to your computer.

连接你的ArduinoUno到你的电脑上

  • Make sure your board is set to the Arduino Uno in the Tool->Board menu and the serial port is selected correctly in Tool->Serial Port.

在菜单Tool->Board和Tool->Serial Port.中检查你板子的型号和端口是否正确

  • Click the Upload, and Grbl should compile and flash to your Arduino! (Flashing with a programmer also works by using the Upload Using Programmer menu command.)

单击下载,Grbl就会编译并且下载到你的Adruino上面去

Compiling GRBL or Advanced Users: Most users are just finewith Grbl's default build, but you can customize Grbl by editing the config.hfile in the Arduino library (not where you downloaded it, it has been copiedinto Arduino Library) folder. This file enables or disables all of Grbl'sadditional compile-time options. There are descriptions in the file thatexplains what they all do. Once edited and saved, just follow the steps aboveto flash your custom Grbl build!

编译Grbl与高级用户:大多数用户都的Grbl都是使用默认配置的,但是您自定义它的配置,这个通过库文件中的config.h可以实现。这个文件中启用或禁用Grbl的所有额外的编译时的选项。文件中有说明它们都做了什么。每次编辑之后都要保存,然后按照之前的操作烧写到Adruino当中去

No fuss! No muss!

不要担心,不要怕麻烦

NOTE: If you arehaving upload issues, try re-burning the Arduino bootloader. If you have aspare Arduino, it's easy!

注意:如果你下载下载出现问题,你可以试着重新烧写板子的bootloader(引导程序),如果你有多余的Adruino板子,那更方便一点

The followingmethods are for reference only.

下列方法仅供参考

For Mac OS X:              适用于Mac OS X平台

此段忽略

For Windows:               适用于Windows平台

You can use the Arduino platform as well since it comes with"win-avr" avrgcc.

你可以使用Arduino的平台也可以使用含有“win-avr”的avrgcc

You must add the paths the the executable's like make.exe and avrdude.exeto windows environment variables. Right click my computer on the start menu andclick Properties. Go to the Advanced tab and on the bottom there will be abutton that says environment variables. Under system variables there will be aVariable with the name "Path". Click edit and add the paths to theexecutable's eg, C:\arduino-00xx\hardware\tools\avr\bin;C:\arduino-00xx\hardware\tools\avr\avr\bin;C:\arduino-00xx\hardware\tools\avr\utils\binDo not erase your previous paths just add the new ones. Once this is done youcan compile the source.

你必须添加可执行文件make.exe和avrdude.exe Windows环境变量的路径。右键单击“开始”菜单上的“计算机”,然后单击“属性”。转到高级选项卡,在底部将有一个按钮,表示环境变量。在系统变量下,将有一个名为“Path”的变量。单击“编辑和添加路径的可执行文件,如C:\arduino-00xx\hardware\tools\avr\bin;C:\arduino-00xx\hardware\tools\avr\avr\bin;C:\arduino-00xx\hardware\tools\avr\utils\bin,不要擦除以前的路径只是添加新路径。完成之后,就可以编译源代码了。

For windows 7 and arduino 1.5.7

适用于windows7下的arduino1.5.7

Add the following paths to your PATH variable -be sure to include ; after each one, except the last in your PATH variableentry.

在每个路径之后添加以下路径-这些必须要包含,除了路径变量条目中的最后一个。

C:\Program Files (x86)\Arduino\hardware\tools\avr\avr\bin\

C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\

C:\Program Files(x86)\Arduino\hardware\arduino\sam\system\CMSIS\Examples\cmsis_example\gcc_atmel

C:\Program Files (x86)\Arduino

You will very likely need to restart your computer in order for Windowsto recognize the newly added paths.

为了让Windows识别新添加的路径,您很可能需要重新启动计算机。


Once your path has been updated, you can open a command prompt. To do so:

一旦你的路径更新了,你可以打开命令提示符,然后这样做:

Click start, in the run box, type cmd or find the command prompt in yourstart menu, usually in Start -> Programs -> Accessories.

点击“开始”,在“运行”框中,键入cmd或在“开始”菜单中找到命令提示符,这些在“启动”>“程序”>附件中。

Change your working directory to the directory that contains the grblsource code:

改变你的工作目录,进入包含grbl的源代码目录:

cdC:\grblpath

type

输入

makeclean

This will output something similar to this:

然后会输出下面的内容:

rm -fgrbl.hex main.elf main.o motion_control.o gcode.o spindle_control t_control.oserial.o protocol.o stepper.o eeprom.o settings.o planner.o ts.o limits.oprint.o probe.o report.o system.o main.d motion_control.d spindle_control.dcoolant_control.d serial.d protocol.d stepper.d eepro ngs.d planner.dnuts_bolts.d limits.d print.d probe.d report.d system.d

Type make grbl.hex or simply make

输入makegrbl.hex or simply make

If all goes well grbl.hex should be created and you can upload to youratmega328p using avrdude. For instructions on how to flash your newly compiledgrbl.hex file to your Arduino, see thiswiki entry

如果一切顺利grbl.hex应该被创建,你可以使用avrdude下载到你的atmega328p。对于如何操作你的刚编译的grbl.hex文件到你的Arduino,可以看这个维基条目

Ruby is optional, but if you don't edit the Makefile you will need todownload ruby and in the installation settings add the path to environmentvariables again. Then you can compile the full source with flash calculation.If you don't want to install ruby, edit the Makefile (removing?) everythingafter ruby (on line 84 only).

Ruby是一个选择,但如果你不编辑Makefile文件你需要下载Ruby并且再次安装设置添加的路径的环境变量,然后你可以编译源代码到flash中,如果你不想要安装ruby,编辑makefile移除everythingafter ruby (在第84行).

An alternative is to use Atmel Studio, a customized version of VisualStudio.

另一种选择是使用Atmel Studio,一个订制的Visual Studio

Last update: 2014-07-18 by gerritv (tested on Windows 8.1, 64bit)

  • Install Atmel Studio
  • Install the Create From Makefile Extension (Tools/Extension Manager)
  • run Tools/Create Project From Makefile
  • select the Makefile from your grbl code directory
  • Select Device, use ATmega328p for the Arduino Uno
  • In Projects/Properties, uncheck Use External Makefile
  • Add -DF_CPU=16000000 -mmcu=atmega328p to Project/Properties/Toolchain/AVR Gnu Compiler/Miscellaneous Other Flags

The last 2 steps need to be done for both Debug and Releaseconfigurations

对于调试和发布配置,需要完成最后2个步骤。

Enjoy the benefits of Visual Studio for Atmel/AVR

Atmel/avr的visual stido可以带给你很多的好处

For Linux:                     适用于Linux平台

Make sure you have the prerequisite libraries installed: avr-gcc andarduino (sudo aptitude install arduino)

请确保你已经安装了以下的库:avr-gcc和arduino

At a terminal prompt, change directories to where the grbl source codelocated. Then type the following to compile and build the firmware:

在实时终端页面,进入到gebl的源码目录下,输入下面的内容来编译和生成固件

make clean

make grbl.hex

 

For Arch Linux:            适用于ArchLinux平台

此段忽略

For Ubuntu:                  适用于UBUNTU平台

此段忽略

Grbl v1.1版本的编译方法相关推荐

  1. Grbl v1.1版本配置说明

    Grbl v1.1版本配置的wiki翻译 Grblv1.1 Configuration Source Websit:https://github.com/gnea/grbl/wiki/Grbl-v1. ...

  2. GRBL v1.1版本的限位开关连接

         GRBL v1.1版本的限位开关连接wiki翻译 Wiring Limit Switches Source websit:https://github.com/gnea/grbl/wiki/ ...

  3. GRBL v1.1版本命令说明

    这次翻译了一下Grbl的命令wiki说明,内容比较多,如果有什么错误的地方,请在下方留言,欢迎相互交流学习 Grbl v1.1 command Source websit: https://githu ...

  4. GRBL v1.1版本的介绍

    最近在使用GRBL,参考资料大部分都是英文,试着稍微翻译了一些,有些地方翻的也不太好,如果不想看英文网页的话可以看一看 source websit:https://github.com/gnea/gr ...

  5. VASP6.1.0以上版本中VASPsol的修改及编译方法

    ASPsol是一款由Cornell University大学Hennig和Arias两个课题组共同开发的程序,作者是Kiran Mathew和Dr. Richard Hennig.通过修改VASP代码 ...

  6. 最新版本webrtc源代码在windows上的编译方法

    http://blog.csdn.net/choday/article/details/19978427 分类: webrtc 2014-02-26 14:34 1893人阅读 评论(8) 收藏 举报 ...

  7. Telegram桌面端(tdesktop)编译方法

    Telegram桌面端(tdesktop)编译方法 Telegram作为一款开源的即时聊天软件,在国外应用的非常广泛. 桌面端采用C++语言编写,界面使用Qt框架进行开发. 作为一款非常成熟的桌面客户 ...

  8. TL138-EVMLinux内核编译方法

    Revision History Draft Date Revision No. Description 2017/06/16 V1.2 1.增加编译模块modules的方法. 2016/03/02 ...

  9. kali查看python版本-kali中python版本的切换方法

    kali中python版本的切换方法 如下所示: update-alternatives --config python 一条简单的命令,如下图所示: 以上这篇kali中python版本的切换方法就是 ...

最新文章

  1. 1.0 封装后的布局成本
  2. 安卓mysql导出excel_Android开发实现的导出数据库到Excel表格功能【附源码下载】...
  3. JPA持久化异常:PersistenceException: org.hibernate.PersistentObjectException
  4. 用CRF做命名实体识别——NER系列(三)
  5. 微软想将新版Edge浏览器引入Linux
  6. 正则表达式30分钟入门教程(转)
  7. 安装linux前分区,安装Linux系统前的准备之磁盘分区
  8. 关于bootstrap的modal弹出层嵌套子Modal所引发的血案(转)
  9. DolphinDB配置
  10. Openwrt笔记-1-校园网连接
  11. [Python] Ubuntu 安装/卸载 python
  12. 机器学习之SVM调参实例
  13. 阶段1 语言基础+高级_1-3-Java语言高级_06-File类与IO流_04 IO字节流_10_字节输入流一次读取一个字节的原理...
  14. alc662声卡注入id_ALC662驱动方法AppleALC+Lilu+DSDTalc662
  15. leetcode 155. Min Stack最小栈(中等)
  16. 只是浅谈MS SQL Server的Page Splits运作原理
  17. 在数学建模中微型计算机,“在数学建模中培养学生思维能力的研究”课题研究情况汇报...
  18. codeforces 333B - Chips
  19. 金山云云服务器访问控制和操作审计
  20. Perl脚本实现tiptop数据导出EXCEL模板

热门文章

  1. element中设置5栏布局
  2. 全新技术苹果群控IOS中控 免越狱
  3. 2022年美赛C题-交易策略-完整解题论文和代码
  4. 【爬虫】Selenium爬取动态网页的base64图片
  5. 【算法】重新排序数组中正数和负数
  6. mysql建表 括号_MySQL建表的问题,关于索引
  7. 获取token的两种方法
  8. StarSpace系列之一:tagspace
  9. 微信企业号开发:自定义菜单
  10. mac 桌面分屏软件_6款好用的Mac分屏软件推荐