8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[メモ] Visual C++ for Linux DevelopmentでRaspberryPiのOpenGLのデバッグ

Posted at

スクリーンショット

2016-04-05-132403_1920x1080_scrot.png

  • らずぱいのデスクトップで、
  • Remminaで、Windows10にRDP接続して、
  • OpenGLのプログラムをデバッグ実行し、
  • ブレークポイントを張って、
  • 停止させたところ。

# いままで書いてきた記事をつかっただけです。。

環境

  • Windows10 (64bit)
  • Visual Studio 2015 Update 2 (Enterprise)全部入り
  • Visual C++ for linux Development : インストールは、こちらの記事から
  • Raspberry Pi 2 model B + 8GB microSD + イーサネット接続 + HDMIで外部ディスプレイに接続
  • Raspbian Jessie (2016-03-18-raspbian-jessie.zip)

準備: RaspberryPi2

  1. 2016-03-18-raspbian-jessieのイメージを普段使い慣れたツールで焼く。

  2. pi/raspberryでログイン

  3. 使わなそうな大きめのパッケージを削除(apt-get upgradeで時間がかかる)

pi@raspberrypi:~$ sudo apt-get autoremove -y wolfram-engine sonic-pi scratch nodered libreoffice-common
.
.
.
0 upgraded, 0 newly installed, 65 to remove and 0 not upgraded.
After this operation, 1,214 MB disk space will be freed.

4. 初期設定 (`% sudo raspi-config`)
    - <font color='blue'>**GL Driver**</font>: `9 Advanced Options` => `AA GL Driver` => <font color='red'>**\<Enable\>**</font> を選ぶ(OpenGLの描画がはやくなる)
    - パーティションを広げたり: `1 Expand Filesystem`
    - ユーザパスワード、タイムゾーン、ホスト名 とかをかえたりする。
5. 再起動
6. パッケージ更新

    ```
sudo apt-get update
sudo apt-get upgrade
  1. VC++ for LinuxDevelopmentで必要なパッケージ
    sudo apt-get install -y openssh-server g++ gdb gdbserver freeglut3-dev
  2. リモートデスクトップクライアントとsamba:
    sudo apt-get install remmina
  3. sambaでincludeファイルの共有
    前の記事のおまけを設定して、らずぱいの/usr/includeをWindows側から参照できるようにする。
  4. お好みのツールなどあれば
    sudo apt-get install byobu lsof htop iotop bwm-ng

RDPで Visual C++

  1. Remmina起動して、Win10にRDP接続、VC++起動。
  2. 前の記事のVS2015: Getting Startedと同様の手順で進める。
  3. 上のメニューのとこで、ARMのビルドにするのを忘れないように。
  • => 上のようなスクショに。

おまけ

  • ディスク使用量(raspi-configで、Expand Filesystemしていない)

    2016-03-18-raspbian-jessie初回起動直後

pi@raspberrypi:~$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3747352 3418852 118428 97% /
devtmpfs 469688 0 469688 0% /dev
tmpfs 474008 0 474008 0% /dev/shm
tmpfs 474008 6404 467604 2% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 474008 0 474008 0% /sys/fs/cgroup
/dev/mmcblk0p1 61384 20368 41016 34% /boot
tmpfs 94804 0 94804 0% /run/user/1000


    ```shell-session:使わなそうな大きめのパッケージを削除後
pi@raspberrypi:~$ df -k
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root        3747352 2098484   1438796  60% /
...
```shell-session:VCでテスト後

pi@raspberrypi:~$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3747352 2197652 1339628 63% /

8
8
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
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?