LoginSignup
13
16

More than 5 years have passed since last update.

RaspberryPi 用のクロスコンパイル環境のメモ

Last updated at Posted at 2015-09-06

RaspberryPi3を使う限りにおいては、クロスコンパイルは、ほぼ不要だと思います。

共通点
・EclipseとCDTをインストールする。
・RaspberryPi用のクロスコンパイラをインストールする。

Eclipseベース(Windows)

WindowsのEclipseでraspberry pi用のクロス開発環境を作成
http://d.hatena.ne.jp/none53/20140813/1407880682

Eclipseベース(Linux)

Raspberry Piでboostの使えるクロスコンパイル環境を構築

RaspberryPiのクロス開発環境をセットアップする
http://qiita.com/atchy@github/items/fb9df9e5865d8c7f7a72

Raspberry Pi のクロス開発環境構築
http://junkroom2cyberrobotics.blogspot.jp/2013/02/raspberry-pi.html

Raspberry Piカーネルクロスコンパイル環境の構築
http://tomosoft.jp/design/?p=5257


コンパイル済みのライブラリ

Boost C++ libraries for Raspberry Pi
https://www.raspberrypi.org/forums/viewtopic.php?t=8111&p=195468

Libraries only (static + dynamic)
http://www.ojdip.net/raspberry-pi/boost_1_49_0.bin-only.tar.gz


RaspberryPiでのコンパイル作業の頻度が少なければ、クロスコンパイルせずに、直接RaspberryPi上でコンパイルするのが気楽です。RaspberryPiでも、マルチコアなので10年前のPCよりははるかに高性能といっていいでしょう。

最近RaspebbryPi3でのライブラリのビルドをRaspberryPi3の実機でしました。

クロスコンパイルをしなかった理由
- まずは、sudo apt-get install で 目的のライブラリをインストールするための前提条件のライブラリをインストールする必要はある。

例:
 OpenCV  Required Packages

  • クロスコンパイル環境を作ることを考えている暇があったら、RaspberryPi3でさっさとコンパイルするほうが早い。
  • 巨大なライブラリをビルドする際でも、USBのハードディスクドライブをUSBマウントがRaspberryPiではすぐにされるので、余計なことを考えずに、さっさとビルドするのがいい。
  • RsapberryPiでは標準として用意されているエディタが、使い勝手がほどほどよいので、ストレスを感じることなしに作業できる。

クロスコンパイルが意味を持つ状況
- 組み込み先のデバイスには、コンパイラを含む開発環境が用意できないほど貧弱な環境である場合

13
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
16