Arduino cheat sheet

From misc notes
Revision as of 14:45, 26 August 2015 by Nxhack (talk | contribs)
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 版は hack は困難。32bit 版でおとなしく作ること)

    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

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

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

bash build.all.bash

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

メモ検証: avrdude '\\.\com5'

  • arduino usb serial の windows OS での初期化。

arduino の usb を刺しただけでは OS から serial device (COM5) としてみえてなので、windows OS で認識させる。

シリアルポートの使い方@windows
#!/bin/sh
mode.com $1: BAUD=115200 PARITY=N DATA=8 STOP=1 to=off xon=off odsr=off octs=on dtr=off rts=on idsr=off

このスクリプト動かす。

  • 配置
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