FC2ブログ

[LEON-MJPEG]NEEK動作確認(2)

Lattice Mico32が実機で動かないので、こちらをまた試してみる。

環境: VMware CentOS6.4 64bit

■設計データの入手

[bob@localhost neek]$ git clone git://git.sourceforge.jp/gitroot/fpga-leon-mjpeg/leon-mjpeg.git

[bob@localhost leon-mjpeg]$ cd leon-mjpeg/
[bob@localhost leon-mjpeg]$ git branch -r

[bob@localhost leon-mjpeg]$ git checkout -b hoge origin/start-point
error: You have local changes to 'snapgear-2.6-p42/user/iptables/extensions/libipt_ECN.d'; cannot switch branches.

http://transitive.info/article/git/command/checkout/
ここを見て、-mオプションでやれば良いのかな?

[bob@localhost leon-mjpeg]$ git checkout -b hoge origin/start-point -m
Branch hoge set up to track remote branch start-point from origin.
Switched to a new branch 'hoge'




■必要なソフトウェアのインストール

http://ghdl.free.fr/site/pmwiki.php?n=Main.Download
ここからghdl-i686-linux-latest.tarをダウンロード。
cp -iprL /mnt/hgfs/vm_share/leon/download/ghdl-i686-linux-latest.tar .
tar xvf ghdl-i686-linux-latest.tar
cd ghdl-0.29-i686-pc-linux/
vi INSTALL
tar -C / -jxvf ghdl-0.29-i686-pc-linux.tar.bz2  → これで/usr/loca/bin/ghdlが生成される。



http://www.gaisler.com/anonftp/bcc/bin/linux/
ここからsparc-elf-4.4.2-1.0.45.tar.bz2をダウンロード。
cd /opt/
cp -iprL /mnt/hgfs/vm_share/leon/download/sparc-elf-4.4.2-1.0.45.tar.bz2 .
tar -C /opt/ -jxvf sparc-elf-4.4.2-1.0.45.tar.bz2



http://www.gaisler.com/index.php/downloads/debug-tools
ここからgrmon-eval-2.0.59.tar.gzをダウンロード。
cd /usr/local/bin/
cp -iprL /mnt/hgfs/vm_share/leon/download/grmon-eval-2.0.59.tar.gz .
tar zxvf grmon-eval-2.0.59.tar.gz
/usr/local/bin/grmon-eval-2.0.59/linux/bin を PATHへ追加




http://www.gaisler.com/anonftp/linux/linux-2.6/toolchains/sparc-linux-4.4.2/
ここからsparc-linux-ct-multilib-0.0.7.tar.bz2をダウンロード。
cd /opt/
cp -iprL /mnt/hgfs/vm_share/leon/download/sparc-linux-ct-multilib-0.0.7.tar.bz2 .
tar -C /opt/ -jxvf sparc-linux-ct-multilib-0.0.7.tar.bz2
ln -s sparc-linux-4.4.2-toolchains sparc-Linux



■設計フローの理解(NEEK)

cd /mnt/hgfs/vm_share/leon/neek/leon-mjpeg/grlib-gpl-1.0.22-b4095/designs/leon3-altera-ep3c25-eek
make xconfig > コンフィグ用のGUIがひらくが、特に変更せず終了。
touch systest.c
make soft
sparc-elf-gcc -c -I. -I../../software/leon3 ../../software/leon3/prom.S
cc1: error: .: Value too large for defined data type
cc1: error: ../../software/leon3: Value too large for defined data type
cc1: error: ../../software/leon3/prom.S: Value too large for defined data type
make: *** [prom.o] Error 1



http://stackoverflow.com/questions/2438890/cc1plus-error-include-value-too-large-for-defined-data-type-when-compiling-wi

よく分からないエラーだが、検索して以下のページを読んでてふと、VMwareの共有フォルダだからダメなのか?
と思い、VMware上のCentOS内のディスクへコピーして同じ手順をやってみた。
すると今度はコンパイルが進んだ。

/home/bob/leon-mjpeg/grlib-gpl-1.0.22-b4095/designs/leon3-altera-ep3c25-eek
[bob@localhost leon3-altera-ep3c25-eek]$ touch systest.c
[bob@localhost leon3-altera-ep3c25-eek]$ make soft
sparc-elf-gcc -c -I. -I../../software/leon3 ../../software/leon3/prom.S
sparc-elf-gcc -I../../software/leon3 -nostdlib -Tlinkprom -N -L./ -Ttext=0 -nostartfiles -o prom.exe prom.o
sparc-elf-objcopy -O srec prom.exe prom.srec
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/report_device.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/apbuart.c
sparc-elf-gcc -I../../software/leon3 -O2 -c -mcpu=v8 ../../software/leon3/divtest.c
sparc-elf-gcc -I../../software/leon3 -O2 -c -mcpu=v8 ../../software/leon3/multest.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/regtest.S
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/cache.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/gpio.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/ramfill.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/ramtest.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/irqmp.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/leon3_test.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/gptimer.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/mulasm.S
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/cacheasm.S
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/spwtest.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/mptest.c
sparc-elf-gcc -I../../software/leon3 -ffast-math -O3 -c ../../software/leon3/fpu.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/grfpu_ops.S
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/base_test.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/grfpu_test.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/can_oc.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/mmu.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/mmu_asm.S
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/pcitest.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/greth.c
../../software/leon3/greth.c: In function 'greth_test':
../../software/leon3/greth.c:191: warning: incompatible implicit declaration of built-in function 'malloc'
../../software/leon3/greth.c:349: warning: incompatible implicit declaration of built-in function 'free'
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/atactrl.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/amba.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/dsu3.c
sparc-elf-gcc -I../../software/leon3 -g -msoft-float -c ../../software/greth/greth_api.c
../../software/greth/greth_api.c: In function 'almalloc':
../../software/greth/greth_api.c:40: warning: incompatible implicit declaration of built-in function 'malloc'
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/grcan.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/spictrl.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/i2cmst.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/misc.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/spimctrl.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/svgactrl.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/apbps2.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/i2cslv.c
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float -c ../../software/leon3/i2c.c
sparc-elf-ar -cr lib3tests.a report_device.o apbuart.o divtest.o multest.o regtest.o cache.o gpio.o ramfill.o ramtest.o irqmp.o leon3_test.o gptimer.o mulasm.o cacheasm.o spwtest.o mptest.o fpu.o grfpu_ops.o base_test.o grfpu_test.o can_oc.o mmu.o mmu_asm.o pcitest.o greth.o atactrl.o amba.o dsu3.o greth_api.o grcan.o spictrl.o i2cmst.o misc.o spimctrl.o svgactrl.o apbps2.o i2cslv.o i2c.o
sparc-elf-gcc -I../../software/leon3 -O2 -g -msoft-float systest.c -L./ lib3tests.a -o systest.exe
sparc-elf-objcopy -O srec systest.exe sram.srec
sparc-elf-objcopy -O srec systest.exe sdram.srec



[root@localhost leon3-altera-ep3c25-eek]# make ghdl
Scanning libraries
grlib: stdlib util sparc modgen amba
altera: simprims
altera_mf: simprims
cycloneiii: simprims
dw02: comp
synplify: sim
techmap: gencomp inferred dw02 altera_mf cycloneiii maps
eth: comp core wrapper
opencores: occomp i2c spi ata ac97
gaisler: arith memctrl leon3 misc net uart sim jtag greth usb ddr ata
esa: memoryctrl
fmf: utilities flash fifo
spansion: flash
gsi: ssram
cypress: ssram
hynix: ddr2
micron: sdram ddr
work: debug
testbench.mpf
rm -rf gnu
make -f tmpmake.ghdl ghdl
make[1]: Entering directory `/home/bob/leon-mjpeg/grlib-gpl-1.0.22-b4095/designs/leon3-altera-ep3c25-eek'
mkdir gnu
mkdir gnu/grlib
ghdl -a -fexplicit --ieee=synopsys --workdir=gnu/grlib --work=grlib -Pgnu -Pgnu/grlib ../../lib/grlib/stdlib/version.vhd
gnu/grlib/version.s: Assembler messages:
gnu/grlib/version.s:209: Error: suffix or operands invalid for `push'
ghdl: compilation error
make[1]: *** [ghdl] Error 1
make[1]: Leaving directory `/home/bob/leon-mjpeg/grlib-gpl-1.0.22-b4095/designs/leon3-altera-ep3c25-eek'
make: *** [make.ghdl] Error 2


ちょっとrootでやってしまったが、chownとchgrpで所属権を変えてやっても同じエラー。

[bob@localhost leon3-altera-ep3c25-eek]$ make ghdl
rm -rf gnu
make -f tmpmake.ghdl ghdl
make[1]: Entering directory `/home/bob/leon-mjpeg/grlib-gpl-1.0.22-b4095/designs/leon3-altera-ep3c25-eek'
mkdir gnu
mkdir gnu/grlib
ghdl -a -fexplicit --ieee=synopsys --workdir=gnu/grlib --work=grlib -Pgnu -Pgnu/grlib ../../lib/grlib/stdlib/version.vhd
gnu/grlib/version.s: Assembler messages:
gnu/grlib/version.s:209: Error: suffix or operands invalid for `push'
ghdl: compilation error
make[1]: *** [ghdl] Error 1
make[1]: Leaving directory `/home/bob/leon-mjpeg/grlib-gpl-1.0.22-b4095/designs/leon3-altera-ep3c25-eek'
make: *** [make.ghdl] Error 2

スポンサーサイト



カレンダー
10 | 2014/11 | 12
- - - - - - 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 - - - - - -
累積訪問者
現在の訪問者
現在の閲覧者数:
最新記事
最新トラックバック
最新コメント
月別アーカイブ
カテゴリ
プロフィール

bobgosso

Author:bobgosso
FPGAのブログへようこそ!

検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QRコード