10. 1. gccのインストール(続き)
• 加えて、以下のライブラリ・プログラムを
Homebrewでインストール
$ brew install mpfr gmp libmpc libelf texinfo
mpfr
a C library for multiple-precision floating-point computations with correct
rounding.
gmp
a free library for arbitrary precision arithmetic, operating on signed integers,
rational numbers, and floating-point numbers.
libmpc
a C library for the arithmetic of complex numbers with arbitrarily high
precision and correct rounding of the result.
libelf ELF object file access library.
texinfo
single source file to produce output in a number of formats, both online and
printed (dvi, html, info, pdf, xml, etc.)
24. 6.mrubyのプログラム作成
• sample.rb作成
HIGH = 1
LOW = 0
cdigitalWrite(100, LOW);
cdigitalWrite(101, LOW);
cdigitalWrite(102, LOW);
cdigitalWrite(103, LOW);
k = Math.sqrt(4)
if k==2 then
cdigitalWrite(100, HIGH);
else
cdigitalWrite(101, HIGH);
end
loop do
end
27. 3. クロスコンパイル環境の構築(続き)
• mrubyのモジュールを作るのには必要ないですが、GDBはV14.02では以下のエ
ラーがでる。
• Undefined symbols for architecture x86_64:
"_n_high_128", referenced from:
_regcache_raw_write in regcache.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [gdb] Error 1
• ソースに以下のコメントあり
/* RX hack: add the high part of 128(96) bit register */
• V14.01は問題なくビルドできた