开源改变世界

cnc不动。帮助 #330

推推 grbl 3年前 (2022-10-30) 377次浏览 0个评论
关闭
r01walker 打开了这个问题 on 16 Jan 2014 · 23 条评论
关闭

cnc不动。帮助#330

r01walker 打开了这个问题 on 16 Jan 2014 · 23 条评论

注释

cnc不动。帮助 #330

我正在使用 ardunio mega 2560。和三个简易驱动程序 v4.4.Grbl 8c。

引脚设置在这里。
连接 Grbl · grbl_grbl Wiki · GitHub.html

使用arduino软件下载grbl软件。
软件指向这个博客页面
http://blog.protoneer.co.nz/tag/grbl/

我已经连接了限位开关,我认为我已经在 ardunio 上正确配置了 grbl,我确实得到了提示并且是交互式的。

我可以使用 ardunio 编程语言对 ardunio 进行编程以移动。我什么都不加载grbl。

我没有做什么,或者这个ardunio在某些方面有什么不同?

cnc不动。帮助 #330
贡献者

精英工程师 评论 on 16 Jan 2014

是的,您的设置不会那样工作。Mega 在引脚到端口映射的方式上与 UNO 不同。

wiki 仅显示 UNO 引脚设置,并且@Protoneergrbl 不会在 Mega 上“按原样”工作。

您最好使用 grbl 的主分支并在 config.h 中定义 PIN_MAP_ARDUINO_MEGA_2560,然后从中编译一个十六进制,然后上传到您的开发板。

然后查看底部的 pin_map.h 将支持 Mega 引脚和功能。

cnc不动。帮助 #330
作者

r01walker 评论 on 16 Jan 2014

我运行ubuntu linux。
我已经有了master grbl,但我在编译它时遇到了麻烦。 

2014 年 1 月 16 日星期四上午 12:01,Rob Brown notifications@github.com写道:

是的,您的设置不会那样工作。Mega 在引脚到端口映射的方式上与 UNO 不同。
wiki 仅显示 UNO 引脚设置,并且@Protoneergrbl 不会在 Mega 上“按原样”工作。
您最好使用 grbl 的主分支并在 config.h 中定义 PIN_MAP_ARDUINO_MEGA_2560,然后从中编译一个十六进制,然后上传到您的开发板。
然后查看底部的 pin_map.h 将支持 Mega 引脚和功能。

直接回复此邮件或在 GitHub 上查看。

cnc不动。帮助 #330
贡献者

tmpvar 评论 on 16 Jan 2014

问题是什么?如果是错误,请粘贴

cnc不动。帮助 #330

好的,我正在运行 ubuntu 13.04。我正在使用来自 git 的主 grbl。我已经为我的董事会重新配置了它。

我正在使用此页面在 ubuntu 下进行指导

https://github.com/grbl/grbl/wiki/Compiling-Grbl

我正在使用 gerbl .8,所以我不会将 grbl .7 下载到我的机器上。我修改终端命令并转到

cd /home/user7/Desktop/grbl8c
这是文件所在的位置。
终端识别目录

./configure 并且它们不是 acrion。

cnc不动。帮助 #330

坦率地说,谷歌不是我的朋友。我需要找到适合我的机器和操作系统的软件和指令集版本。在看到整体情况时,我没有遵循完整的路径,而是使用谷歌搜索的随意版本。

cnc不动。帮助 #330

发现了一些关于编译的新文档。
http://wiki.roberttwomey.com/GRBL

这是我的终端输出
user7@user7:$ export AVRPATH=/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr
user7@user7:
$ export DEVPATH=/dev/ttyACMO
user7@user7:$ 出口 GRBLHEX=grbl.hex
user7@user7:
$ export PATH=”$PATH:$AVRPATH/bin”
user7@user7:$光盘/Downloads/grbl-master
bash: cd: /home/user7/Downloads/grbl-master: 没有这样的文件或目录
user7@user7:
$
用户7@用户7:
$光盘/home/user7/Desktop/grbl80
bash: cd: /home/user7/home/user7/Desktop/grbl80: 没有这样的文件或目录
user7@user7:
$ /home/user7/Desktop/grbl8c
bash: /home/user7/Desktop/grbl8c: 是目录
user7@user7:$ cd /home/user7/Desktop/grbl8c
user7@user7:
/Desktop/grbl8c$ 制作
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I。-ffunction-sections -c main.c -o main.o
在从nuts_bolts.h:30:0,
来自main.c:30的文件中:
pin_map.h:109:0:警告:“BLOCK_BUFFER_SIZE”重新定义[启用default]
在 main.c:29:0 包含的文件中:
planner.h:27:0: 注意:这是先前定义
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I 的位置。-ffunction-sections -c motion_control.c -o motion_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I。-ffunction-sections -c gcode.c -o gcode.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I。-ffunction-sections -c 主轴控制.c -o 主轴控制.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I。-ffunction-sections -ccoolant_control.c -ocoolant_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I。-ffunction-sections -c serial.c -o serial.o
serial.c:在函数“USART0_UDRE_vect”中:
serial.c:94:1:警告:“USART0_UDRE_vect”似乎是拼写错误的信号处理程序[默认启用]
串行.c:在函数“USART0_RX_vect”中:
serial.c:145:1:警告:“USART0_RX_vect”似乎是拼写错误的信号处理程序[默认启用]
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -我。-ffunction-sections -c protocol.c -o protocol.o
在包含在nuts_bolts.h:30:0、
gcode.h:25、
protocol.c:25的文件中:
pin_map.h:110:0:警告:“LINE_BUFFER_SIZE”重新定义 [默认启用]
在包含在 protocol.c:24:0:
protocol.h:33:0 中的文件中:注意:这是之前定义
协议的位置.c: In function ‘protocol_init’:
protocol.c:52:3: error: ‘DDRK’ undeclared (first use in this function)
protocol.c:52:3: 注意:每个函数只报告一次未声明的标识符它出现在
protocol.c:53:3: error: ‘PORTK’ undeclared (first use in this function)
protocol.c: In function ‘__vector_5’:
protocol.c:81:8: error: ‘PINK’ undeclared (first use)在这个函数中使用)
make: *** [protocol.o] Error 1
user7@user7:~/Desktop/grbl8c$

cnc不动。帮助 #330
贡献者

tmpvar 评论 2014 年 1 月 17 日

您需要更改设备以匹配 arduino mega。 atmega2560
应该管用

cnc不动。帮助 #330

好的,哪里?

2014 年 1 月 16 日星期四下午 5:22,Elijah Insua notifications@github.com写道:

您需要将设备更改为对 arduino mega 进行数学运算。 atmega2560
应该可以

直接回复此电子邮件或在 GitHub 上查看。

cnc不动。帮助 #330

我注意到一个丢失的子目录给出了错误。做了子目录。并运行make。

用户7@用户7:/Desktop/grbl8c$ 制作
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I。-ffunction-sections -c protocol.c -o protocol.o
在来自nuts_bolts.h:30:0、
来自gcode.h:25、
来自protocol.c:25的文件中:
pin_map.h:110:0:警告: “LINE_BUFFER_SIZE” 重新定义 [默认启用]
在来自 protocol.c:24:0:
protocol.h:33:0 的文件中:注意:这是先前定义
protocol.c 的位置:在函数 ‘protocol_init’:
协议中.c:52:3: error: ‘DDRK’ undeclared (first use in this function) protocol.c:52:3: 注意:每个未声明的标识符对于它出现在 protocol.c:53:3
中的每个函数只报告一次
: 错误: ‘PORTK’ undeclared (第一次在这个函数中使用)
protocol.c:在函数’__vector_5’中:
protocol.c:81:8:错误:’PINK’未声明(在此函数中首次使用)
make:*** [protocol.o]错误1
user7@user7:
/桌面/grbl8c$

cnc不动。帮助 #330
贡献者

tmpvar 评论 2014 年 1 月 17 日

Makefile通过替换来更新您atmega328patmega2560

cnc不动。帮助 #330

根据要求修改了makefile,这是输出

用户7@用户7:/Desktop/grbl8c$ 制作
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I。-ffunction-sections -c protocol.c -o protocol.o
在来自nuts_bolts.h:30:0、
                 来自gcode.h:25、
                 来自protocol.c:25的文件中:
pin_map.h:110:0:警告: “LINE_BUFFER_SIZE” 重新定义 [默认启用]
在来自 protocol.c:24:0:
protocol.h:33:0 的文件中:注意:这是之前定义
protocol.c 的位置:在函数 ‘protocol_init’:
协议中.c:52:3: 错误: ‘DDRK’ undeclared (first use in this function)
protocol.c:52:3: note: 每个未声明的标识符只针对它出现的每个函数报告一次
protocol.c:53:3: error: ‘PORTK’ undeclared (first use in this function)
protocol.c: In function ‘__vector_5’:
protocol.c:81:8: error: ‘PINK’ undeclared (first use in this函数)
make: *** [protocol.o] 错误 1
​​user7@user7:
/Desktop/grbl8c$ 制作
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c protocol.c -o protocol.o
在来自nuts_bolts.h:30:0、
                 来自gcode.h:25、
                 来自protocol.c:25的文件中:
pin_map.h:110:0:警告: “LINE_BUFFER_SIZE” 重新定义 [默认启用]
在来自 protocol.c:24:0:
protocol.h:33:0 的文件中:注意:这是之前定义的位置
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c stepper.c -o stepper.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c eeprom.c -o eeprom.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c settings.c -o settings.o
在从nuts_bolts.h:30:0 包含的文件中,
                 来自settings.c:26:
pin_map.h:110:0: 警告:“LINE_BUFFER_SIZE”重新定义[启用者default]
在 settings.c:23:0:
protocol.h:33:0 中包含的文件中:注意:这是先前定义
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I 的位置。-ffunction-sections -c planner.c -o planner.o
在从nuts_bolts.h:30:0 包含的文件中,
                 从planner.c:28:
pin_map.h:109:0: 警告:“BLOCK_BUFFER_SIZE”重新定义[启用默认]
在 planner.c:27:0 中包含的文件中:
planner.h:27:0:注意:这是前面定义的位置
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c 螺母螺栓.c -o 螺母螺栓.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c limits.c -o limits.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c print.c -o print.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c report.c -o report.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -o main.elf main.o motion_control.o gcode.o 主轴控制.o 冷却剂控制.o 串行.o 协议.o 步进器.o eeprom.o 设置.o 规划器.o 螺母螺栓.o 限制.o 打印。 o report.o -lm -Wl,–gc-sections
/usr/lib/gcc/avr/4.7.2/../../../avr/bin/ld: 输入文件main.o' is incompatible with avr:6 output /usr/lib/gcc/avr/4.7.2/../../../avr/bin/ld: avr:5 architecture of input filemotion_control.o’的avr:5架构与avr:6输出
/usr/lib不兼容/gcc/avr/4.7.2/../../../avr/bin/ld: avr:5 输入文件的架构,gcode.o' is incompatible with avr:6 output /usr/lib/gcc/avr/4.7.2/../../../avr/bin/ld: avr:5 architecture of input filespindle_control.o’ 与 avr:6 输出
/usr/lib/gcc/avr不兼容/4.7.2/../../../avr/bin/ld: avr:5 输入文件coolant_control.o' is incompatible with avr:6 output /usr/lib/gcc/avr/4.7.2/../../../avr/bin/ld: avr:5 architecture of input fileserial.o’ 的体系结构与 avr:6 输出不兼容
collect2: 错误: ld 返回 1 退出状态
make: * ** [main.elf] 错误 1
​​user7@user7:~/Desktop/grbl8c$ 

2014 年 1 月 16 日星期四下午 5:40,Elijah Insua notifications@github.com写道:

通过将 atmega328p 替换为 atmega2560 来更新您的 Makefile

直接回复此电子邮件或在 GitHub 上查看。

cnc不动。帮助 #330

您需要运行“make clean”来删除为 uno 编译的输出文件。
然后再次运行make。

uno 使用 avr:5,mega 使用 avr:6,这就是神秘的错误信息想要表达的意思。

cnc不动。帮助 #330

我感谢以前和未来的帮助。我的设置如上所述。我将自愿将这台机器作为未来版本的测试平台。如果您愿意,但现在我已按要求完成,这就是输出。

用户7@用户7:/Desktop/grbl8c$ make clean
rm -f grbl.hex main.elf main.o motion_control.o gcode.o 主轴控制.o 冷却剂控制.o 串行.o 协议.o 步进器.o eeprom.o 设置.o 规划器.o 螺母螺栓.o 限制。 print.d
report.d user7@user7:
/Desktop/grbl8c$ 制作
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c main.c -o main.o
在从nuts_bolts.h:30:0,
                 来自main.c:30的文件中:
pin_map.h:109:0:警告:“BLOCK_BUFFER_SIZE”重新定义[启用default]
在 main.c:29:0 中包含的文件中:
planner.h:27:0: 注意:这是之前定义
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I 的位置。-ffunction-sections -c motion_control.c -o motion_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c gcode.c -o gcode.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c 主轴控制.c -o 主轴控制.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -ccoolant_control.c -ocoolant_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c serial.c -o serial.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c protocol.c -o protocol.o
在来自nuts_bolts.h:30:0、
                 来自gcode.h:25、
                 来自protocol.c:25的文件中:
pin_map.h:110:0:警告: “LINE_BUFFER_SIZE” 重新定义 [默认启用]
在来自 protocol.c:24:0:
protocol.h:33:0 的文件中:注意:这是之前定义的位置
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c stepper.c -o stepper.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c eeprom.c -o eeprom.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c settings.c -o settings.o
在从nuts_bolts.h:30:0 包含的文件中,
                 来自settings.c:26:
pin_map.h:110:0: 警告:“LINE_BUFFER_SIZE”重新定义[启用者default]
在 settings.c:23:0:
protocol.h:33:0 中包含的文件中:注意:这是先前定义
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I 的位置。-ffunction-sections -c planner.c -o planner.o
在来自nuts_bolts.h:30:0 的文件中,
                 来自planner.c:28:
pin_map.h:109:0:警告:“BLOCK_BUFFER_SIZE”重新定义 [默认启用]
在 planner.c:27:0:
planner.h:27:0 中包含的文件中:注意:这是先前定义
avr的位置-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c 螺母螺栓.c -o 螺母螺栓.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c limits.c -o limits.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c print.c -o print.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c report.c -o report.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -o main.elf main.o motion_control.o gcode.o 主轴控制.o 冷却剂控制.o 串行.o 协议.o 步进器.o eeprom.o 设置.o 规划器.o 螺母螺栓.o 限制.o 打印。 o report.o -lm -Wl,–gc-sections
rm -f grbl.hex
avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex
avr-size –format=berkeley main. elf
   文本数据 bss dec hexfilename
  26964 0 2811 29775 744fmain.elf
user7@user7:~/Desktop/grbl8c$ 

2014 年 1 月 16 日星期四下午 6:09,Rob Brown notifications@github.com写道:

您需要运行“make clean”来删除为 uno 编译的输出文件。
然后再次运行 make

直接回复此电子邮件或在 GitHub 上查看。

cnc不动。帮助 #330
贡献者

tmpvar 评论 2014 年 1 月 17 日

太好了,所以它起作用了。

现在您使用make flash

当您开始在或其他地方编辑/测试更改时,config.h我建议您做一个make clean flash重新编译所有内容的操作,然后将生成的十六进制闪存到 arduino。

cnc不动。帮助 #330

我假设因为我没有收到错误代码,所以它已完成。

上,罗伯特·沃克 r01walker@yahoo.com写道:

我感谢以前和未来的帮助。我的设置如上所述。我将自愿将这台机器作为未来版本的测试平台。如果您愿意,但现在我已按要求完成,这就是输出。

用户7@用户7:/Desktop/grbl8c$ make clean
rm -f grbl.hex main.elf main.o motion_control.o gcode.o 主轴控制.o 冷却剂控制.o 串行.o 协议.o 步进器.o eeprom.o 设置.o 规划器.o 螺母螺栓.o 限制。 print.d
report.d user7@user7:
/Desktop/grbl8c$ 制作
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c main.c -o main.o
在从nuts_bolts.h:30:0,
                 来自main.c:30的文件中:
pin_map.h:109:0:警告:“BLOCK_BUFFER_SIZE”重新定义[启用default]
在 main.c:29:0 中包含的文件中:
planner.h:27:0: 注意:这是之前定义
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I 的位置。-ffunction-sections -c motion_control.c -o motion_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c gcode.c -o gcode.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c 主轴控制.c -o 主轴控制.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -ccoolant_control.c -ocoolant_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c serial.c -o serial.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c protocol.c -o protocol.o
在来自nuts_bolts.h:30:0、
                 来自gcode.h:25、
                 来自protocol.c:25的文件中:
pin_map.h:110:0:警告: “LINE_BUFFER_SIZE” 重新定义 [默认启用]
在来自 protocol.c:24:0:
protocol.h:33:0 的文件中:注意:这是之前定义的位置
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c stepper.c -o stepper.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c eeprom.c -o eeprom.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c settings.c -o settings.o
在从nuts_bolts.h:30:0 包含的文件中,
                 来自settings.c:26:
pin_map.h:110:0: 警告:“LINE_BUFFER_SIZE”重新定义[启用者default]
在 settings.c:23:0:
protocol.h:33:0 中包含的文件中:注意:这是先前定义
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I 的位置。-ffunction-sections -c planner.c -o planner.o
在来自nuts_bolts.h:30:0 的文件中,
                 来自planner.c:28:
pin_map.h:109:0:警告:“BLOCK_BUFFER_SIZE”重新定义 [默认启用]
在 planner.c:27:0:
planner.h:27:0 中包含的文件中:注意:这是先前定义
avr的位置-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c 螺母螺栓.c -o 螺母螺栓.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c limits.c -o limits.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c print.c -o print.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c report.c -o report.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -o main.elf main.o motion_control.o gcode.o 主轴控制.o 冷却剂控制.o 串行.o 协议.o 步进器.o eeprom.o 设置.o 规划器.o 螺母螺栓.o 限制.o 打印。 o report.o -lm -Wl,–gc-sections
rm -f grbl.hex
avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex
avr-size –format=berkeley main. elf
   文本数据 bss dec hexfilename
  26964 0 2811 29775 744fmain.elf
user7@user7:~/Desktop/grbl8c$ 

2014 年 1 月 16 日星期四下午 6:09,Rob Brown notifications@github.com写道:

您需要运行“make clean”来删除为 uno 编译的输出文件。
然后再次运行 make

直接回复此电子邮件或在 GitHub 上查看。

cnc不动。帮助 #330

做了一分钟。巨型已连接。我得到了ardunio ide的地址。

用户7@用户7:/Desktop/grbl8c$ make flash
avrdude -c avrisp2 -P usb -p atmega2560 -B 10 -F -U flash:w:grbl.hex:i avrdude
: usbdev_open(): 没有找到任何 USB 设备 “usb”
make: *** [flash] 错误 1
​​user7@user7:
/Desktop/grbl8c$ 导出 DEVPATH=/dev/ttyACM0
user7@user7:/Desktop/grbl8c$ make flash
avrdude -c avrisp2 -P usb -p atmega2560 -B 10 -F -U flash:w:grbl.hex:i avrdude
: usbdev_open(): 没有找到任何 USB 设备 “usb”
make: *** [flash] 错误 1
​​user7@user7:
/桌面/grbl8c$

cnc不动。帮助 #330
贡献者

tmpvar 评论 2014 年 1 月 17 日

利用PROGRAMMER="-c arduino -P /dev/ttyACM0" make flash

cnc不动。帮助 #330

打开ardunio ide并第一次运行它。注意到它关闭它并第二次运行该命令。

user7@user7:~/Desktop/grbl8c$ PROGRAMMER=”-c arduino -P /dev/ttyACM0″ 制作 flashavrdude -c arduino -P /dev/ttyACM0 -p atmega2560 -B 10 -F -U flash:w:grbl。 hex:i
avrdude: stk500_recv(): 程序员没有响应

完成了。谢谢你。

make: *** [flash] 错误 1
​​user7@user7:/桌面/grbl8c$ user7@user7:/Desktop/grbl8c$ PROGRAMMER=”-c arduino -P /dev/ttyACM0″ make flashavrdude -c arduino -P /dev/ttyACM0 -p atmega2560 -B 10 -F -U flash:w:grbl.hex:i
bash:用户7@用户7:/Desktop/grbl8c$: 没有这样的文件或目录
user7@user7:
/Desktop/grbl8c$ avrdude: stk500_recv(): 程序员没有响应
bash: 意外标记附近的语法错误`(‘
user7@user7:/桌面/grbl8c$ 
user7@user7:
/Desktop/grbl8c$ 完成。谢谢你。

avrdude: 没有在命令行或配置文件中
         指定程序员 使用 -c 选项指定程序员并重试

用户7@用户7:/桌面/grbl8c$ 
user7@user7:
/Desktop/grbl8c$ make: *** [flash] Error 1
No command ‘make:’ found, 你的意思是:
 命令 ‘makeg’ from package ‘xutils-dev’ (main)
 Command ‘make’ from package ‘make’ (main)
make:: 找不到命令
user7@user7:/桌面/grbl8c$ user7@user7:/桌面/grbl8c$ 
bash: user7@user7:/Desktop/grbl8c$: 没有这样的文件或目录
user7@user7:
/桌面/grbl8c$ 

2014 年 1 月 16 日星期四晚上 7:06,Elijah Insua notifications@github.com写道:

使用 PROGRAMMER=”-c arduino -P /dev/ttyACM0″ make flash

直接回复此电子邮件或在 GitHub 上查看。

cnc不动。帮助 #330
贡献者

tmpvar 评论 2014 年 1 月 17 日

编辑:添加DEVICE以指定 atmega2560

哦,我的错。sudo DEVICE="atmega2560" PROGRAMMER="-c wiring -P /dev/ttyACM0" make clean flash是您要运行的命令

注意:根据您的设置,您可能需要也可能不需要 sudo。

我的输出:

grbl (edge) $ sudo DEVICE="atmega2560" PROGRAMMER="-c wiring -P /dev/ttyACM0" make clean flash
rm -f grbl.hex main.elf main.o motion_control.o gcode.o spindle_control.o coolant_control.o serial.o protocol.o stepper.o eeprom.o settings.o planner.o nuts_bolts.o limits.o print.o report.o main.d motion_control.d gcode.d spindle_control.d coolant_control.d serial.d protocol.d stepper.d eeprom.d settings.d planner.d nuts_bolts.d limits.d print.d report.d
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c main.c -o main.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c motion_control.c -o motion_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c gcode.c -o gcode.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c spindle_control.c -o spindle_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c coolant_control.c -o coolant_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c serial.c -o serial.o
In file included from serial.c:25:0:
serial.c: In function 'USART_UDRE_vect':
serial.c:97:5: warning: 'USART_UDRE_vect' appears to be a misspelled signal handler [enabled by default]
 ISR(USART_UDRE_vect)
     ^
serial.c: In function 'USART_RX_vect':
serial.c:150:5: warning: 'USART_RX_vect' appears to be a misspelled signal handler [enabled by default]
 ISR(USART_RX_vect)
     ^
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c protocol.c -o protocol.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c stepper.c -o stepper.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c eeprom.c -o eeprom.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c settings.c -o settings.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c planner.c -o planner.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c nuts_bolts.c -o nuts_bolts.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c limits.c -o limits.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c print.c -o print.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c report.c -o report.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -o main.elf main.o motion_control.o gcode.o spindle_control.o coolant_control.o serial.o protocol.o stepper.o eeprom.o settings.o planner.o nuts_bolts.o limits.o print.o report.o -lm -Wl,--gc-sections
rm -f grbl.hex
avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex
avr-size -C --mcu=atmega2560 main.elf
AVR Memory Usage
----------------
Device: atmega2560

Program:   26428 bytes (10.1% Full)
(.text + .data + .bootloader)

Data:       1527 bytes (18.6% Full)
(.data + .bss + .noinit)


avrdude -c wiring -P /dev/ttyACM0 -p atmega2560 -B 10 -F -U flash:w:grbl.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9801
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "grbl.hex"
avrdude: writing flash (26428 bytes):

Writing | ################################################## | 100% 4.26s

avrdude: 26428 bytes of flash written
avrdude: verifying flash memory against grbl.hex:
avrdude: load data flash data from input file grbl.hex:
avrdude: input file grbl.hex contains 26428 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.41s

avrdude: verifying ...
avrdude: 26428 bytes of flash verified

avrdude: safemode: Fuses OK (H:00, E:00, L:00)

avrdude done.  Thank you.
cnc不动。帮助 #330

我相信我是完整的。谢谢。我已经包含了终端的输出。

user7@user7:~/Desktop/grbl8c$ sudo PROGRAMMER=”-c 接线 -P /dev/ttyACM0″
为 user7 制作干净的闪存 [sudo] 密码:
rm -f grbl.hex main.elf main.o motion_control.o gcode .o 主轴控制.o 冷却剂控制.o 串行.o 协议.o 步进器.o eeprom.o 设置.o 计划器.o 螺母螺栓.o 限制.o 打印.o 报告.o 主.d 运动控制.d gcode.d 主轴控制.d coolant_control.d serial.d protocol.d stepper.d eeprom.d settings.d planner.dnuts_bolts.d limits.d print.d report.d
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I . -ffunction-sections -c main.c -o main.o
在从nuts_bolts.h:30:0,
来自main.c:30的文件中:
pin_map.h:109:0:警告:“BLOCK_BUFFER_SIZE”重新定义[启用默认]
在 main.c:29:0 中包含的文件中:
planner.h:27:0:注意:这是前面定义的位置
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c motion_control.c -o motion_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c gcode.c -o gcode.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c 主轴控制.c -o 主轴控制.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -ccoolant_control.c -ocoolant_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c serial.c -o serial.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c 协议.c -o 协议.o
在来自nuts_bolts.h:30:0、
来自gcode.h:25、
来自protocol.c:25 的文件中:
pin_map.h:110:0:警告:重新定义“LINE_BUFFER_SIZE”[默认启用]
在来自协议的文件中.c:24:0:
protocol.h:33:0:注意:这是前面定义
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I的位置。-ffunction-sections -c stepper.c -o stepper.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c eeprom.c -o eeprom.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c settings.c -o settings.o
在包含在nuts_bolts.h:30:0的文件中,
来自settings.c:26:
pin_map.h:110:0:警告:“LINE_BUFFER_SIZE”重新定义 [默认启用]
在 settings.c:23:0:
protocol.h:33:0 中包含的文件中:注意:这是先前定义
avr的位置-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c planner.c -o planner.o
在从nuts_bolts.h:30:0 包含的文件中,
从planner.c:28:
pin_map.h:109:0: 警告:“BLOCK_BUFFER_SIZE”重新定义[启用default]
在 planner.c:27:0 包含的文件中:
planner.h:27:0: 注意:这是先前定义
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I 的位置。-ffunction-sections -c 螺母螺栓.c -o 螺母螺栓.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c limits.c -o limits.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c print.c -o print.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -c report.c -o report.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I。-ffunction-sections -o main.elf main.o motion_control.o gcode.o 主轴控制.o 冷却剂控制.o 串行.o 协议.o 步进器.o eeprom.o 设置.o 规划器.o 螺母螺栓.o 限制.o 打印。 o report.o -lm -Wl,–gc-sections
rm -f grbl.hex
avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex
avr-size –format=berkeley main. elf
文本数据 bss dec 十六进制文件名
26964 0 2811 29775 744f main.elf avrdude
-c 接线 -P /dev/ttyACM0 -p atmega2560 -B 10 -F -U flash:w:grbl.hex:i

avrdude:AVR 设备已初始化并准备好接受指令

阅读 | ################################################# | 100% 0.02 秒

avrdude:设备签名 = 0x1e9801 avrdude
:注意:已指定 FLASH 存储器,将执行擦除周期
要禁用此功能,请指定 -D 选项。
avrdude:擦除芯片
avrdude:读取输入文件“grbl.hex” avrdude
:写入闪存(26964 字节):

写作 | ################################################# | 100% 3.90 秒

avrdude:26964 字节的闪存写入
avrdude:根据 grbl.hex 验证闪存:avrdude:
从输入文件 grbl.hex 加载数据闪存数据:avrdude
:输入文件 grbl.hex 包含 26964 字节 avrdude
:读取片上闪存数据:

阅读 | ################################################# | 100% 3.03 秒

avrdude :正在验证… avrdude:已验证
26964 字节的闪存

avrdude:安全模式:保险丝正常

完成了。谢谢你。

user7@user7:~/桌面/grbl8c$

cnc不动。帮助 #330
贡献者

tmpvar 评论 2014 年 1 月 17 日

你可能会看到:warning: 'USART_RX_vect' appears to be a misspelled signal handler

这意味着串行连接将不起作用。要解决这个问题,您需要更新serial.c

  1. diff --git a/serial.c b/serial.c
  2. index 69fa717..9c2d6a3 100644
  3. --- a/serial.c
  4. +++ b/serial.c
  5. @@ -91,7 +91,7 @@ void serial_write(uint8_t data) {
  6. }
  7.  
  8. // Data Register Empty Interrupt handler
  9. -#ifdef __AVR_ATmega644P__
  10. +#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega2560__)
  11. ISR(USART0_UDRE_vect)
  12. #else
  13. ISR(USART_UDRE_vect)
  14. @@ -144,7 +144,7 @@ uint8_t serial_read()
  15. }
  16. }
  17.  
  18. -#ifdef __AVR_ATmega644P__
  19. +#if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega2560__)
  20. ISR(USART0_RX_vect)
  21. #else
  22. ISR(USART_RX_vect)

那么你可能会很好去..

cnc不动。帮助 #330
贡献者

tmpvar 评论 2014 年 1 月 17 日

哦,看起来你没有看到那个警告。应该可以在不打补丁的情况下工作,祝你好运!

cnc不动。帮助 #330

我将更新重新编译并重新闪存。我已经修改了 config.h 并且由于问题将是编译和闪存,所以在我测试之前我有一些重新固定要做。感谢您的帮助。我计划在教科书中发布这个结构,因为他们也向我展示了一些爱。我还将在此站点上添加引脚和软件。我不得不谷歌找到grbl。我对将我带到这里的决定感到满意。再次感谢所有的帮助。

cnc不动。帮助 #330
喜欢 (0)

您必须 登录 才能发表评论!