105 | | streamdeviceも同じ。 |
106 | | |
| 105 | streamdeviceも同じ。[[br]] |
| 106 | 但し、streamdeviceはgitHubに入っているので、masterをダウンロード。 |
| 107 | |
| 108 | {{{ |
| 109 | root@beaglebone:/opt/epics/R315.5# mkdir -p modules/soft/stream |
| 110 | root@beaglebone:/opt/epics/R315.5# cd src |
| 111 | root@beaglebone:/opt/epics/R315.5/src# wget https://github.com/paulscherrerinstitute/StreamDevice/archive/master.zip |
| 112 | root@beaglebone:/opt/epics/R315.5/src# mv master.zip streamdevice.zip |
| 113 | root@beaglebone:/opt/epics/R315.5/src# cd ../modules/soft/stream |
| 114 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream# unzip ../../../src/streamdevice.zip |
| 115 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream# mv StreamDevice-master 2.7.7 |
| 116 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream# cd 2.7.7/ |
| 117 | |
| 118 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream/2.7.7# export PATH=/opt/epics/R315.5/base/bin/linux-arm:$PATH |
| 119 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream/2.7.7# makeBaseApp.pl -t support |
| 120 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream/2.7.7# emacs -nw configure/RELEASE |
| 121 | |
| 122 | SNCSEQ = $(EPICS_BASE)/../modules/soft/seq/2.2.4/ |
| 123 | ASYN = $(EPICS_BASE)/../modules/soft/asyn/4-31 |
| 124 | |
| 125 | ここで、/opt/epics/R315.5/modules/soft/stream/2.7.7以下の各ディレクトリにあるMakefileのTOPを変更。 |
| 126 | |
| 127 | TOP=.. -> TOP=. |
| 128 | TOP=../.. -> TOP=./.. |
| 129 | |
| 130 | |
| 131 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream/2.7.7# make |
| 132 | }}} |
116 | | |
117 | | |
118 | | |
| 146 | GPIOを使うためのドライバサポート。[[br]] |
| 147 | gitHubからダウンロード。 |
| 148 | |
| 149 | {{{ |
| 150 | root@beaglebone:/opt/epics/R315.5/src# wget https://github.com/ffeldbauer/epics-devgpio/archive/master.zip |
| 151 | root@beaglebone:/opt/epics/R315.5/src# mv master.zip bbb_devgpio.zip |
| 152 | root@beaglebone:/opt/epics/R315.5/src# cd ../modules/instruments/bbb |
| 153 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb# unzip ../../../src/bbb_devgpio.zip |
| 154 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb# mv epics-devgpio-master devgpio |
| 155 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb# cd devgpio |
| 156 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb/devgpio# emacs -nw configure/RELEASE |
| 157 | |
| 158 | SNCSEQ=$(EPICS_BASE)/../modules/soft/seq/2.2.4 |
| 159 | |
| 160 | # EPICS_BASE usually appears last so other apps can override stuff: |
| 161 | EPICS_BASE=/opt/epics/R315.5/base |
| 162 | |
| 163 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb/devgpio# make |
| 164 | }}} |
| 168 | 今度はI2Cを使うためのドライバサポート。[[br]] |
| 169 | asynとstreamdeviceでI2Cが使えるようになる。[[br]] |
| 170 | これもgitHubからダウンロード。[[br]] |
| 171 | |
| 172 | {{{ |
| 173 | root@beaglebone:/opt/epics/R315.5/src# wget https://github.com/ffeldbauer/drvAsynI2C/archive/master.zip |
| 174 | root@beaglebone:/opt/epics/R315.5/src# mv master.zip bbb_asyni2c.zip |
| 175 | root@beaglebone:/opt/epics/R315.5/src# cd ../modules/instruments/bbb |
| 176 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb# unzip ../../../src/bbb_asyni2c.zip |
| 177 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb# mv drvAsynI2C-master drvAsynI2C |
| 178 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb# cd drvAsynI2C |
| 179 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb/drvAsynI2C# emacs -nw configure/RELEASE |
| 180 | |
| 181 | EPICS_BASE=/opt/epics/R315.5/base |
| 182 | ASYN=$(EPICS_BASE)/../modules/soft/asyn/4-31 |
| 183 | |
| 184 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb/drvAsynI2C# make |
| 185 | }}} |
| 186 | |
| 187 | このままの状態ではstreamdeviceを使った通信ができないので、一緒に入っているパッチをStreamDeviceにあてる必要がある。[[br]] |
| 188 | パッチを当てるstreamdeviceは 2.7.7_I2Cとして別にコンパイルしなおす。[[br]] |
| 189 | |
| 190 | {{{ |
| 191 | root@beaglebone:/opt/epics/R315.5/modules/instruments/bbb/drvAsynI2C# cd /opt/epics/R315.5/modules/soft/stream/ |
| 192 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream# cp -r 2.7.7 2.7.7_I2C |
| 193 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream# cd 2.7.7_I2C |
| 194 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream/2.7.7_I2C# patch -p2 < /opt/epics/R315.5/modules/instruments/bbb/drvAsynI2C/streamDevice/0001-Added-asynI2C-interface.patch |
| 195 | patching file src/AsynDriverInterface.cc |
| 196 | patching file streamApp/Makefile |
| 197 | can't find file to patch at input line 87 |
| 198 | Perhaps you used the wrong -p or --strip option? |
| 199 | The text leading up to this was: |
| 200 | -------------------------- |
| 201 | |diff --git a/configure/RELEASE b/configure/RELEASE |
| 202 | |index bee74c1..b95de67 100644 |
| 203 | |--- a/configure/RELEASE |
| 204 | |+++ b/configure/RELEASE |
| 205 | -------------------------- |
| 206 | File to patch: ^C |
| 207 | |
| 208 | configure/RELEASEは自分で編集。以下の行を追加。 |
| 209 | |
| 210 | DRVASYNI2C=$(EPICS_BASE)/../modules/instruments/bbb/drvAsynI2C |
| 211 | |
| 212 | root@beaglebone:/opt/epics/R315.5/modules/soft/stream/2.7.7_I2C# make clean;make |
| 213 | |
| 214 | }}} |
| 215 | |
| 216 | IOCで使うときには、configure/RELEASEに |
| 217 | |
| 218 | {{{ |
| 219 | ASYN = $(EPICS_BASE)/../modules/soft/asyn/4-31 |
| 220 | STREAM = $(EPICS_BASE)/../modules/soft/stream/2.7.7_I2C |
| 221 | DRVASYNI2C = $(EPICS_BASE)/../modules/instruments/bbb/drvAsynI2C |
| 222 | }}} |
| 223 | |
| 224 | を設定する。 |