开源改变世界

串行监视器中的稀有字符。 #90

推推 grbl 2年前 (2023-01-21) 211次浏览

关闭
mcanes 打开了这个问题 2012 年 4 月 18 日 · 6条评论
关闭

串行监视器中的稀有字符。#90

mcanes 打开了这个问题 2012 年 4 月 18 日 · 6条评论

注释

串行监视器中的稀有字符。 #90

你好,

闪烁 grbl 后,当我尝试配置 grbl 选项时,在串行监视器上只出现一行稀有字符。喜欢这行:
4 ¿£�¿ 4 ¿£�¿4 ¿£�¿4 ¿£�¿4 ¿£�¿4 ¿£�¿4 ¿£�¿4 ¿£。 ¿¿4¿£�¿ …

我使用 minicom 和 Arduino IDE 检查 grbl 终端,使用 9600 波特率。

在编译和闪烁期间一切似乎都很好,但在那之后,串行监视器不工作。我使用串行输出与其他 Arduino 程序一起检查了它,它们运行良好。

有人知道如何解决这个问题吗?

谢谢!

这是我遵循的步骤:

$ make grbl.hex
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c main.c -o main.o
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 serial.c -o serial.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c protocol.c -o protocol.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c stepper.c -o stepper.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c eeprom.c -o eeprom.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c settings.c -o settings.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c planner.c -o planner.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c nuts_bolts.c -o nuts_bolts.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c limits.c -o limits.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -c print.c -o print.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega328p -I. -ffunction-sections -o main.elf main.o motion_control.o gcode.o spindle_control.o serial.o protocol.o stepper.o eeprom.o settings.o planner.o nuts_bolts.o limits.o print.o -lm -Wl ,–gc-sections
rm -f grbl.hex
avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex
avr-objdump -h main.elf | grep.bss | ruby -e ‘puts “\n\n— Requires %s bytes of SRAM” % STDIN.read.match(/0[0-9a-f]+\s/)[0].to_i(16)’

— 需要 1529 字节的 SRAM
avr-size *.hex *.elf *.o
text data bss dec hex filename
0 18010 0 18010 465a grbl.hex
18010 0 1529 19539 4c53 main.elf
350 0 0 350 15e eeprom.o
2278 0 33 2311 907 gcode.o
338 0 0 338 152 limits.o
48 0 0 48 30 main.o
1786 0 0 1786 6fa motion_control.o
160 0 0 160 a0 nuts_bolts.o 4290 0
1092 5382 o 15068 规划器。
0 608 260 打印.o
376 0 52 428 1ac 协议.o
334 0 4 338 152串行.o
1927 0 0 1927 787 settings.o
88 0 2 90 5a spindle_control.o
1778 0 37 1815 717 stepper.o

闪烁:
avrdude -C/etc/avrdude.conf -pm328p -carduino -P/dev/ttyACM1 -D -Uflash:w:grbl.hex

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

阅读 | ################################################## | 100% 0.00s

avrdude:设备签名 = 0x1e950f avrdude
:读取输入文件“grbl.hex” avrdude
:输入文件 grbl.hex 自动检测为 Intel Hex avrdude
:写入闪存(18010 字节):

写作 | ################################################## | 100% 3.19s

avrdude:18010 字节的闪存写入
avrdude:根据 grbl.hex 验证闪存:avrdude:
从输入文件 grbl.hex 加载数据闪存数据:avrdude
:输入文件 grbl.hex 自动检测为 Intel Hex
avrdude:输入文件 grbl.hex 包含18010 字节
avrdude:读取片上闪存数据:

阅读 | ################################################## | 100% 2.53s

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

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

avrdude 完成。谢谢你。

avrdude:版本 5.11.1

串行监视器中的稀有字符。 #90
作者

我测试了一个预编译的 grbl hex 文件,它工作正常。所以构建它是一个问题。

任何的想法?

串行监视器中的稀有字符。 #90
成员

唔。不确定这里会发生什么。你用的是IDE自带的Arduino avr-gcc环境吗?这是我一直严格使用的,以最大限度地减少其他安装中的问题。输出似乎与我以前看到的有点不同。我会尝试按照 WIKI 中列出的步骤进行操作。

此外,您之前遇到的“edge”编译错误似乎与 avr-size 函数与我们在 makefile 中进行的调用不兼容有关。你可以评论出来。它只会告诉您所需内存和闪存空间的大致大小。

串行监视器中的稀有字符。 #90
成员

看起来像是时钟速度问题。你在什么板上运行这个?香草 Arduino 或兼容的东西?

串行监视器中的稀有字符。 #90
作者

@chamnit我使用的是 Arch Linux 发行版附带的 avr-gcc 环境。除了使用 Arduino IDE 环境外,我遵循了 WIKI 中的所有步骤。我将对其他 avr-gcc 版本进行更多测试。

@simen我使用了一个 Arduino One 和一个 Arduino One 修订版 3。

串行监视器中的稀有字符。 #90
成员

你是说 Arduino Uno 吗?如果是这样,它应该可以正常工作。

我会尝试使用 Arduino IDE 工具来构建它。从您之前遇到的 avr-size 问题来看,这让我相信您的 Linux avr-gcc 环境存在一些轻微的错误/不同。让我们知道您的结果。

串行监视器中的稀有字符。 #90
作者

是的,Arduino Uno!对不起 :)

我没有时间尝试更多的avr-gcc版本,但我认为这是4.7.0 avr-gcc版本的问题。

喜欢 (0)