开源改变世界

cnc不动。帮助 #330

推推 grbl 3年前 (2023-01-21) 134次浏览
关闭
r01walker 开启了这个问题 2014 年 1 月 16 日 · 23条评论
关闭

cnc不动。帮助#330

r01walker 开启了这个问题 2014 年 1 月 16 日 · 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
贡献者

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

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

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

然后查看底部的 pin_map.h 将引导 Mega 引脚并发挥作用。

cnc不动。帮助 #330
作者

我运行 ubuntu linux。
我已经有了主 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
贡献者

问题是什么?如果出错,贴上

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:$ export GRBLHEX=grbl.hex
user7@user7:
$ export PATH=”$PATH:$AVRPATH/bin”
user7@user7:$ 光盘/Downloads/grbl-master
bash: cd: /home/user7/Downloads/grbl-master: 没有这样的文件或目录
user7@user7:
$
user7@user7:
$ 光盘/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$ make
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 spindle_control.c -o spindle_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c coolant_control.c -o coolant_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c serial.c -o serial.o
serial.c: In function ‘USART0_UDRE_vect’:
serial.c:94:1: warning: ‘USART0_UDRE_vect’ 似乎是拼写错误的信号处理程序 [默认启用]
serial .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 (第一次使用在此函数中使用)
make: *** [protocol.o] Error 1
user7@user7:~/Desktop/grbl8c$

cnc不动。帮助 #330
贡献者

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

cnc不动。帮助 #330
作者

好的,哪里?

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

您需要更改设备以对 arduino mega 进行数学运算。 atmega2560
应该有效
——
直接回复此电子邮件或在 GitHub 上查看。

cnc不动。帮助 #330
作者

我注意到缺少的子目录出现错误。制作了子目录。并运行。

用户 7@用户 7:/Desktop/grbl8c$ make
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’ 未声明(首次在此函数中使用)
protocol.c: 在函数 ‘__vector_5’:
protocol.c:81:8: error: ‘PINK’ undeclared (first use in this function)
make: *** [protocol.o] Error 1
user7@user7:
/桌面/grbl8c$

cnc不动。帮助 #330
贡献者

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

cnc不动。帮助 #330
作者

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

用户 7@用户 7:/Desktop/grbl8c$ make
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’ 未声明(首次在此函数中使用

protocol.c:53:3: 错误:’PORTK’ 未声明(首次在此函数中
使用
)函数)
make: *** [protocol.o] 错误 1
​​user7@user7:
/Desktop/grbl8c$ make
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”重新定义 [启用default]
在 planner.c:27:0 包含的文件中:
planner.h:27:0: 注意:这是前面定义
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 打印。 o report.o -lm -Wl,–gc-sections
/usr/lib/gcc/avr/4.7.2/../../../avr/bin/ld: avr:5 输入文件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: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 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 user7@user7:
/Desktop/grbl8c$ make
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 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
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 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 打印。 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
贡献者

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

现在你使用make flash

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

cnc不动。帮助 #330
作者

我假设因为我没有得到它已完成的错误代码。

在上,ROBERT WALKER r01walker@yahoo.com写道:

我感谢过去和未来的帮助。我的设置如上所述。我将自愿将这台机器作为未来版本的测试台。如果你愿意,但现在我已经按照要求做了,这就是输出。

用户 7@用户 7:/Desktop/grbl8c$ make clean
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 user7@user7:
/Desktop/grbl8c$ make
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 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
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 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 打印。 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
贡献者

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

cnc不动。帮助 #330
作者

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

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
avrdude: stk500_recv(): 程序员没有响应

avrdude 完成。谢谢你。

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 完成。谢谢你。

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

用户 7@用户 7:/桌面/grbl8c$ 
user7@user7:
/Desktop/grbl8c$ make: *** [flash] 错误 1​​未
找到命令“make:”,您的意思是:
 命令“makeg”来自包“xutils-dev”(主要)
 命令“make”来自包“make” (主要)
make:: command not found
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
贡献者

编辑:添加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 wiring -P /dev/ttyACM0″ make clean flash
[sudo] 用户7的密码:
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
在 nuts_bolts.h:30:0 包含的文件中,
来自 main.c:30:
pin_map.h:109:0: 警告:“BLOCK_BUFFER_SIZE”重新定义 [启用默认]
在 main.c:29:0 包含的文件中:
planner.h:27:0: note: this is the location of the previous definition
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
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c protocol.c -o protocol.o
In file included from nuts_bolts.h:30:0,
from gcode.h:25,
from protocol.c:25:
pin_map.h:110:0: warning: “LINE_BUFFER_SIZE” redefined [enabled by default]
In file included from protocol.c:24:0:
protocol.h:33:0: note: this is the location of the previous definition
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
In file included from nuts_bolts.h:30:0,
from settings.c:26:
pin_map.h:110:0: warning: “LINE_BUFFER_SIZE” redefined [enabled by default]
In file included from settings.c:23:0:
protocol.h:33:0: note: this is the location of the previous definition
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -c planner.c -o planner.o
In file included from nuts_bolts.h:30:0,
from planner.c:28:
pin_map.h:109:0: warning: “BLOCK_BUFFER_SIZE” redefined [enabled by default]
In file included from planner.c:27:0:
planner.h:27:0: note: this is the location of the previous definition
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

喜欢 (0)