sample1が動いた
ようやく、TOPPERS/JSP for Blackfinをgnuツールチェーンで動かすことができました。アプリケーションはsampl1。ステップはこんな感じです。
- VisualDSP++4.5/EZ-KIT Liteにsrecloaderによってjsp.srecをロード
- めちゃめちゃロードに時間がかかる。動かないが、何が悪いのかイマイチわからない。
- ヤケになってVisualDSP++から直接jspをロード⇒ロードできた。
- 走らせると、最初の2文字"Sy"のみターミナルに表示される。どこかで見た。
- 割り込みがイネーブルになっていない Σ( ̄□ ̄)*1
- ena_int()をsample.cのmain_task()に追加。
- 動いた!
また、sample1.hには以下の宣言をプロセッサ依存部分として追加しています。
#elif defined(BLACKFIN) #define CPUEXC1 0 /* CPU例外ハンドラ番号 */ #define RAISE_CPU_EXCEPTION asm(" excpt 0;") /* ソフトウェア割込み発生 */ #define STACK_SIZE 1024 /* タスクのスタックサイズ */ #define TASK_PORTID 1 /* 文字入力するシリアルポートID */
デバッガ
VisualDSP++経由での動作を確認したので、今度はEZ-KIT LiteのJTAGポートにDLC5を接続し、gdbproxyを立ち上げてSUSE Linux 10.1の上のbfin-elf-gdbからロードしてみました。太字がユーザー入力です。
suikan@linux-5u15:~/workspace/jsp/obj> bfin-elf-gdb jsp GNU gdb 6.3.50_2004-11-25-cvs Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-elf"... (gdb) target remote :2000 Remote debugging using :2000 0xffa00038 in start () at ../config/blackfin/start.S:129 129 LOADLABEL( r0, expEntry) // EXP Current language: auto; currently asm (gdb) load Loading section .text, size 0x465c lma 0xffa00000 Loading section .rodata, size 0xe76 lma 0xff800000 Loading section .data, size 0x44 lma 0xff800e78 Start address 0xffa00000, load size 21782 Transfer rate: 6008 bits/sec, 435 bytes/write. (gdb) display $pc 1: $pc = (void (*)()) 0xffa00000(gdb) (gdb) c Continuing.
これも成功。Eclipseでのデバッガ使用は失敗しましたが、まだZylinをいれていないのでこんなものでしょう。