Arduino cheat sheet

From misc notes
Jump to navigation Jump to search

Arduino + cygwin + ino (ano) ハマりどころメモ

without Arduino IDE

Arduino from the Command Line
Arturo

ano は versions 1.6.1 は動くとのこと

  • cygwin 特有の問題
toolchain-avr を cygwin で compile
The AVR toolchain used by the Arduino IDE

1.6.1 用は release 3.4.5

git clone -b 3.4.5 https://github.com/arduino/toolchain-avr.git
  • toolchain-avr ハマりどころ

cygwin 32bit 版つかうこと (64bit でもうごきそうですか)

    git
    wget
    unzip
    zip
    gperf
    bison
    flex
    make
    patch
    *** automake
    *** autoconf
    gcc-g++
    *** texinfo (must be at version 4.13 since 5+ won't work)
    libncurses-devel
    python setuptools
    libusb (all)

Readme.md にあるように texinfo の指定バージョン 4.13 は cygwin にないので、自分でコンパイル。 ついでに (autoconf-2.64) automake-1.11.1 texinfo-4.13 は cygwin のパッケージつかわないで自分でコンパイルする。

arch.win32.build.bash はつかわない。なので MinGW 環境は不要。

bash build.all.bash

10時間ほどコンパイルにかかる。

  • 配置
Configuring Eclipse to point to the IDE location

をヒントに...


  • ano の環境

/etc/ano.ini or ~/.anorc

[build]
board-model = uno
cpu = 8MHzatmega328p
arduino-dist = /usr/share/arduino

[upload]
board-model = uno
cpu = 8MHzatmega328p
arduino-dist = /usr/share/arduino
serial-port = /dev/ttyS4

[serial]
serial-port = /dev/ttyS4

続行中メモ

ano build は成功。ano upload を挑戦中。TBC!

cygwin の stty はいろいろ制限あるらしい...

stty -F /dev/ttyS4 9600 cs8 -parenb -cstopb

おなじみの 9600 8N1

ano upload の hupcl があやしい

/dev/ttyS4 は Arduino IDE を一回起動すると見える。なにかイニシャルが要りそうだ。

avrdude コンパイル法さがす

  • more install
libusb (all)
setserial
# autoconf-2.59 is required
# automake-1.9.x is required
  • make
./bootstrap
./configure
make avrdude.exe
strip avrdude.exe