Заливка hex файла скетча в ардуину

Тема в разделе "Arduino & Shields", создана пользователем Алексей9809, 7 авг 2017.

  1. Airbus

    Airbus Радиохулиган Модератор

    И попробуйте скорость 57600 если на 115200 не получиться
     
  2. не правильно указал скорость порта в диспетчере задач(стоит по умолчанию 9600)?
    Действительно невнимательно посмотрел нашел строку avrdude -CD:\programs\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM4 -b115200 -D -Uflash:w:C:\TEMP\arduino_build_159080/Blink.ino.hex:i
    Чуть чуть переписал до такого вида
    avrdude -CD:\programs\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM4 -b115200 -D -Uflash:w:C:\avrblink.ino.hex:i
    Получил в командной строке
    C:\Users\Alexej>avrdude -CD:\programs\Arduino\hardware\tools\avr/etc/avrdude.con
    f -v -patmega2560 -cwiring -PCOM4 -b115200 -D -Uflash:w:C:\avrblink.ino.hex:i

    avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2014 Joerg Wunsch

    System wide configuration file is "D:\programs\Arduino\hardware\tools\a
    vr/etc/avrdude.conf"

    Using Port : COM4
    Using Programmer : wiring
    Overriding Baud Rate : 115200
    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 Max
    W ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
    -- ---------
    eeprom 65 10 8 0 no 4096 8 0 9000 90
    00 0x00 0x00
    flash 65 10 256 0 yes 262144 256 1024 4500 45
    00 0x00 0x00
    lfuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    hfuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    efuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    lock 0 0 0 0 no 1 0 0 9000 90
    00 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 : Wiring
    Description : Wiring
    Programmer Model: AVRISP
    Hardware Version: 15
    Firmware Version Master : 2.10
    Vtarget : 0.0 V
    SCK period : 0.1 us

    avrdude: AVR device initialized and ready to accept instructions

    Reading | ################################################## | 100% 0.02s

    avrdude: Device signature = 0x1e9801 (probably m2560)
    avrdude: safemode: hfuse reads as D8
    avrdude: safemode: efuse reads as FD
    avrdude: reading input file "C:\avrblink.ino.hex"
    avrdude: can't open input file C:\avrblink.ino.hex: No such file or directory
    avrdude: read from file 'C:\avrblink.ino.hex' failed

    avrdude: safemode: hfuse reads as D8
    avrdude: safemode: efuse reads as FD
    avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)

    avrdude done. Thank you.
    чтоб увидеть различие C программы ардуино загрузил скетч блинк постаил чтоб горел 10 сек 1 не горел
    В hex поставил 1 сек горит одна не горит
    НО почему то Hex не загрузило
    не правильно указал скорость порта в диспетчере задач(стоит по умолчанию 9600)?
    Действительно невнимательно посмотрел нашел строку avrdude -CD:\programs\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM4 -b115200 -D -Uflash:w:C:\TEMP\arduino_build_159080/Blink.ino.hex:i
    Чуть чуть переписал до такого вида
    avrdude -CD:\programs\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM4 -b115200 -D -Uflash:w:C:\avrblink.ino.hex:i
    Получил в командной строке
    C:\Users\Alexej>avrdude -CD:\programs\Arduino\hardware\tools\avr/etc/avrdude.con
    f -v -patmega2560 -cwiring -PCOM4 -b115200 -D -Uflash:w:C:\avrblink.ino.hex:i

    avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2014 Joerg Wunsch

    System wide configuration file is "D:\programs\Arduino\hardware\tools\a
    vr/etc/avrdude.conf"

    Using Port : COM4
    Using Programmer : wiring
    Overriding Baud Rate : 115200
    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 Max
    W ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
    -- ---------
    eeprom 65 10 8 0 no 4096 8 0 9000 90
    00 0x00 0x00
    flash 65 10 256 0 yes 262144 256 1024 4500 45
    00 0x00 0x00
    lfuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    hfuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    efuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    lock 0 0 0 0 no 1 0 0 9000 90
    00 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 : Wiring
    Description : Wiring
    Programmer Model: AVRISP
    Hardware Version: 15
    Firmware Version Master : 2.10
    Vtarget : 0.0 V
    SCK period : 0.1 us

    avrdude: AVR device initialized and ready to accept instructions

    Reading | ################################################## | 100% 0.02s

    avrdude: Device signature = 0x1e9801 (probably m2560)
    avrdude: safemode: hfuse reads as D8
    avrdude: safemode: efuse reads as FD
    avrdude: reading input file "C:\avrblink.ino.hex"
    avrdude: can't open input file C:\avrblink.ino.hex: No such file or directory
    avrdude: read from file 'C:\avrblink.ino.hex' failed

    avrdude: safemode: hfuse reads as D8
    avrdude: safemode: efuse reads as FD
    avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)

    avrdude done. Thank you.
    чтоб увидеть различие C программы ардуино загрузил скетч блинк постаил чтоб горел 10 сек 1 не горел
    В hex поставил 1 сек горит одна не горит
    НО почему то Hex не загрузило моргает также 10-1
     
  3. b707

    b707 Гуру

    Конечно файл не загрузился - у вас же в выводе все написано:

    avrdude: can't open input file C:\avrblink.ino.hex: No such file or directory

    проверяйте путь к исходнику.
    У вас исходник действительно называется avrblink.ino.hex ? - именно так, с двойным расширением? может просто avrblink.hex ?
     
    Алексей9809 нравится это.
  4. AlexU

    AlexU Гуру

    А внимательно прочитать вывод 'avrdude' не судьба?
    Код (Text):
    avrdude: reading input file "C:\avrblink.ino.hex"
    avrdude: can't open input file C:\avrblink.ino.hex: No such file or directory
    avrdude: read from file 'C:\avrblink.ino.hex' failed
     
    Алексей9809 нравится это.
  5. AlexU

    AlexU Гуру

    По крайней мере эти строки:
    Код (Text):
    avrdude: AVR device initialized and ready to accept instructions

    Reading | ################################################## | 100% 0.02s

    avrdude: Device signature = 0x1e9801 (probably m2560)
    говорят о том, что 'avrdude' "видит" контроллер и может с ним общаться. Соответственно настройки (кроме файла прошивки) правильные.
     
    Алексей9809 нравится это.
  6. Прошивка оказалась правильной, ошибся в имени файла когда копировал строку из ардуина при вставке в командную строку не удалил .ino у файла Но и после удаление он чето не вгружал решил перезапустить комп, после перезагрузки все стало нормально
    Большое спасибо за помощь сам я врятли бы понял что да как:)
     
  7. Airbus

    Airbus Радиохулиган Модератор

    И что мигает?А откуда там взялось расширение .ino?Что за компилятор такой?
     
  8. 13led моргает все окей компилятор с каторого скопирован путь- из программы ардуино.