avrdude upload error. content mismatch

未关闭
#198 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
20/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
arduino
领域
embedded-iot

调研方向

从提供的 platformio.ini 和详细的 avrdude 上传输出入手,尤其关注设备签名、写入和验证相关的行。完成的标准是找出字节不匹配的可复现原因,并记录受支持的配置或解决方案;该 issue 未指定目标文件或测试。

由索引模型根据 Issue 内容生成。

描述

Hi. I suppouse the problem is in erase flag. I use buton PlatformIO:Upload
Platformio.ini:

[env:megaatmega2560]
platform = atmelavr
board = megaatmega2560
board_build.f_cpu = 8000000L
board_build.mcu = atmega2560

framework = arduino
upload_protocol = usbasp -B4.0

This is verbose output of upload command:

Total                      9591
<lambda>(["upload"], [".pio\build\megaatmega2560\firmware.hex"])
AVAILABLE: usbasp -B4.0
CURRENT: upload_protocol = usbasp -B4.0
BeforeUpload(["upload"], [".pio\build\megaatmega2560\firmware.hex"])
avrdude -v -p atmega2560 -C C:\Users\Me\.platformio\packages\tool-avrdude\avrdude.conf -c usbasp -B4.0 -D -U flash:w:.pio\build\megaatmega2560\firmware.hex:i

avrdude: Version 5.11-Patch#7610, compiled on Aug 31 2011 at 08:02:19
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Users\Me\.platformio\packages\tool-avrdude\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
         Setting bit clk period        : 4.0
         AVR Part                      : ATMEGA2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: set SCK frequency to 187500 Hz
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9801
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as 99
avrdude: safemode: efuse reads as FF
avrdude: reading input file ".pio\build\megaatmega2560\firmware.hex"
avrdude: writing flash (1548 bytes):

Writing | ################################################## | 100% 0.98s

avrdude: 1548 bytes of flash written
avrdude: verifying flash memory against .pio\build\megaatmega2560\firmware.hex:
avrdude: load data flash data from input file .pio\build\megaatmega2560\firmware.hex:
avrdude: input file .pio\build\megaatmega2560\firmware.hex contains 1548 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.63s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
         0x17 != 0x01
avrdude: verification error; content mismatch

avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as 99
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK

avrdude done.  Thank you.
主要语言
Python
星标
288
派生
361
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

platformio/platformio-docs 的其他 Issue

查看 platformio/platformio-docs 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。