【问题标题】:avrdude error: out of syncavrdude 错误:不同步
【发布时间】:2014-12-12 16:27:36
【问题描述】:

我在将一个简单的 hello world 程序上传到我的 Arduino Mega 2560 时遇到问题。我检查了它在使用 IDE 时是否可以工作,确实可以。但是,我不想使用 IDE。 (顺便说一句,我必须 chmod a+rw /dev/ttyACM0 才能让它工作。)

这个错误是众所周知的,并且在网上进行了很多讨论。到目前为止,我发现的任何解决方案都不适用于我,因为我使用的是 makefile 而不是 IDE,而且我在 Linux 上。我正在使用的 Makefile:

ARDUINO_DIR            = /usr/share/arduino
TARGET                 = test
ARDUINO_LIBS           =
MCU                    = atmega2560
F_CPU                  = 16000000
ARDUINO_PORT           = /dev/ttyACM0
AVRDUDE_ARD_BAUDRATE   = 115200
AVRDUDE_ARD_PROGRAMMER = arduino

include /usr/share/arduino/Arduino.mk

源代码编译正常,但在上传阶段,avrdude 抱怨:

/usr/share/arduino/hardware/tools/avr/../avrdude -q -V -D -p atmega2560 -C /usr/share 
/arduino/hardware/tools/avr/../avrdude.conf -c arduino -b 115200 -P /dev/ttyACM0 \
        -U flash:w:build-uno/test.hex:i
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

我认为这是错误设置标志的简单问题。有什么想法吗?

【问题讨论】:

    标签: makefile arduino avrdude


    【解决方案1】:

    AVRDUDE_ARD_PROGRAMMER = arduino

    Arduino MEGA (atmega2560) 使用与 Uno 不同的引导加载程序,并且需要不同的编程器类型。将“arduino”更改为“接线”(或“stk500v2”)

    【讨论】:

      猜你喜欢
      • 2015-12-12
      • 1970-01-01
      • 1970-01-01
      • 2013-01-11
      • 1970-01-01
      • 2014-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多