Главная > Оборудование умного дома > Заливка скетча arduino через консоль linux

Заливка скетча arduino через консоль linux


14-01-2014, 00:27. Разместил: sluggard
где test.cpp.hex - наш скетч.

процесс прошивки будет выглядеть так:
root@OpenWrt:~# stty -F /dev/ttyUSB0 cs8 57600 hupcl
root@OpenWrt:~# avrdude -p m328p -P /dev/ttyUSB0 -c stk500v1 -b 57600 -C /etc/av
rdude.conf -U flash:w:/srv/ftp/test.cpp.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
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 "/srv/ftp/test.cpp.hex"
avrdude: input file /srv/ftp/test.cpp.hex auto detected as Intel Hex
avrdude: writing flash (2460 bytes):

Writing | ################################################## | 100% 0.73s

avrdude: 2460 bytes of flash written
avrdude: verifying flash memory against /srv/ftp/test.cpp.hex:
avrdude: load data flash data from input file /srv/ftp/test.cpp.hex:
avrdude: input file /srv/ftp/test.cpp.hex auto detected as Intel Hex
avrdude: input file /srv/ftp/test.cpp.hex contains 2460 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.50s

avrdude: verifying ...
avrdude: 2460 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

root@OpenWrt:~# stty -F /dev/ttyUSB0 cs8 57600 -hupcl
root@OpenWrt:~#

Вернуться назад