devmem2とprudebugをインストール

PRUのデバッグを行うにあたり、user-land側からのSoCのレジスタ確認のためのdevmem2とprudebugをインストールする。

先ずはdevmem2をインストール。

debian@beaglebone:~$ mkdir devmem2
debian@beaglebone:~$ cd devmem2/
debian@beaglebone:~/devmem2$ wget http://download.atmark-techno.com/misc/accessng-any-address/devmem2.tar.gz
--2014-10-26 14:45:16--  http://download.atmark-techno.com/misc/accessing-any-adress/devmem2.tar.gz
Resolving download.atmark-techno.com (download.atmark-techno.com)... 121.101.71135
Connecting to download.atmark-techno.com (download.atmark-techno.com)|121.101.7.135|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2220 (2.2K) [application/x-gzip]
Saving to: `devmem2.tar.gz'

100%[======================================>] 2,220       --.-K/s   in 0s

2014-10-26 14:45:16 (22.9 MB/s) - `devmem2.tar.gz' saved [2220/2220]
debian@beaglebone:~/devmem2$ tar zxvf devmem2.tar.gz
devmem2/
devmem2/Makefile
devmem2/devmem2.c
debian@beaglebone:~/devmem2$ cd devmem2
debian@beaglebone:~/devmem2/devmem2$ gcc devmem2.c -o devmem2
debian@beaglebone:~/devmem2/devmem2$ sudo ./devmem2

Usage:  ./devmem2 { address } [ type [ data ] ]
        address : memory address to act upon
        type    : access operation type : [b]yte, [h]alfword, [w]ord
        data    : data to be written

debian@beaglebone:~/devmem2/devmem2$ sudo cp ./devmem2 /usr/bin
debian@beaglebone:~/devmem2/devmem2$ sudo chown root:root /usr/bin/devmem2
debian@beaglebone:~/devmem2/devmem2$ ls -la /usr/bin | grep devmem2
-rwxr-xr-x  1 root root       7550 Oct 26 15:01 devmem2
debian@beaglebone:~/devmem2/devmem2$ sudo devmem2

Usage:  devmem2 { address } [ type [ data ] ]
        address : memory address to act upon
        type    : access operation type : [b]yte, [h]alfword, [w]ord
        data    : data to be written

debian@beaglebone:~/devmem2/devmem2$

続いてprudebugのインストール。

debian@beaglebone:~$ mkdir prudebug
debian@beaglebone:~$ cd prudebug
debian@beaglebone:~/prudebug$ wget http://sourceforge.net/projects/prudebug/files/prudebug-0.25.tar
--2014-10-29 14:13:02--  http://sourceforge.net/projects/prudebug/files/prudebug-0.25.tar
Resolving sourceforge.net (sourceforge.net)... 216.34.181.60
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://sourceforge.net/projects/prudebug/files/prudebug-0.25.tar/download [following]
--2014-10-29 14:13:03--  http://sourceforge.net/projects/prudebug/files/prudebug-0.25.tar/download
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloads.sourceforge.net/project/prudebug/prudebug-0.25.tar?r=&ts=1414591983&use_mirror=softlayer-sng [following]
--2014-10-29 14:13:03--  http://downloads.sourceforge.net/project/prudebug/prudebug-0.25.tar?r=&ts=1414591983&use_mirror=softlayer-sng
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://softlayer-sng.dl.sourceforge.net/project/prudebug/prudebug-0.25.tar [following]
--2014-10-29 14:13:04--  http://softlayer-sng.dl.sourceforge.net/project/prudebug/prudebug-0.25.tar
Resolving softlayer-sng.dl.sourceforge.net (softlayer-sng.dl.sourceforge.net)... 216.12.198.152
Connecting to softlayer-sng.dl.sourceforge.net (softlayer-sng.dl.sourceforge.net)|216.12.198.152|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 163840 (160K) [application/octet-stream]
Saving to: `prudebug-0.25.tar'

100%[======================================>] 163,840      402K/s   in 0.4s

2014-10-29 14:13:04 (402 KB/s) - `prudebug-0.25.tar' saved [163840/163840]

debian@beaglebone:~/prudebug$ tar -xf prudebug-0.25.tar
debian@beaglebone:~/prudebug$ ls -la
total 172
drwxr-xr-x  3 debian debian   4096 Oct 29 14:14 .
drwxr-xr-x 12 debian debian   4096 Oct 29 14:12 ..
drwxr-xr-x  2 debian debian   4096 Mar  8  2014 prudebug-0.25
-rw-r--r--  1 debian debian 163840 Mar  8  2014 prudebug-0.25.tar
debian@beaglebone:~/prudebug$ cd prudebug-0.25
debian@beaglebone:~/prudebug/prudebug-0.25$ ls -la
total 192
drwxr-xr-x 2 debian debian  4096 Mar  8  2014 .
drwxr-xr-x 3 debian debian  4096 Oct 29 14:14 ..
-rw-r--r-- 1 debian debian  8698 Mar  8  2014 cmd.c
-rw-r--r-- 1 debian debian  1591 Mar  8  2014 cmdinput.c
-rw-r--r-- 1 debian debian  2264 Mar  8  2014 cmdinput.o
-rw-r--r-- 1 debian debian 10512 Mar  8  2014 cmd.o
-rw-r--r-- 1 debian debian  7302 Mar  8  2014 da.c
-rw-r--r-- 1 debian debian  8120 Mar  8  2014 da.o
-rw-r--r-- 1 debian debian  1510 Mar  8  2014 LICENSE
-rw-r--r-- 1 debian debian   136 Mar  8  2014 Makefile
-rw-r--r-- 1 debian debian  6176 Mar  8  2014 printhelp.c
-rw-r--r-- 1 debian debian  8484 Mar  8  2014 printhelp.o
-rw-r--r-- 1 debian debian 16769 Mar  8  2014 prudbg.c
-rw-r--r-- 1 debian debian  2607 Mar  8  2014 prudbg.h
-rw-r--r-- 1 debian debian 13240 Mar  8  2014 prudbg.o
-rwxr-xr-x 1 debian debian 41276 Mar  8  2014 prudebug
-rw-r--r-- 1 debian debian  9495 Mar  8  2014 README
-rw-r--r-- 1 debian debian  1238 Mar  8  2014 uio.c
-rw-r--r-- 1 debian debian   549 Mar  8  2014 uio.h
-rw-r--r-- 1 debian debian  2016 Mar  8  2014 uio.o
debian@beaglebone:~/prudebug/prudebug-0.25$ sudo ./prudebug
PRU Debugger v0.25
(C) Copyright 2011, 2013 by Arctica Technologies.  All rights reserved.
Written by Steven Anderson

Using UIO PRUSS device.
Processor type          AM335x
PRUSS memory address    0x4a300000
PRUSS memory length     0x00040000

         offsets below are in 32-bit word addresses (not ARM byte addresses)
         PRU            Instruction    Data         Ctrl
         0              0x0000d000     0x00000000   0x00008800
         1              0x0000e000     0x00000800   0x00009000

PRU0> q

Goodbye.

debian@beaglebone:~/prudebug/prudebug-0.25$ sudo cp ./prudebug /usr/bin/
debian@beaglebone:~/prudebug/prudebug-0.25$ sudo chown root:root /usr/bin/prudebug
debian@beaglebone:~/prudebug/prudebug-0.25$ sudo prudebug
PRU Debugger v0.25
(C) Copyright 2011, 2013 by Arctica Technologies.  All rights reserved.
Written by Steven Anderson

Using UIO PRUSS device.
Processor type          AM335x
PRUSS memory address    0x4a300000
PRUSS memory length     0x00040000

         offsets below are in 32-bit word addresses (not ARM byte addresses)
         PRU            Instruction    Data         Ctrl
         0              0x0000d000     0x00000000   0x00008800
         1              0x0000e000     0x00000800   0x00009000

PRU0> q

Goodbye.

debian@beaglebone:~/prudebug/prudebug-0.25$ 

どちらも特に問題無くインストール完了。
動作は追々見て行くことにする。

タイトルとURLをコピーしました