●ファイルの依存関係● hello_plugs ----+--> hello_plugs_menu +--> plugs +--> cs8900 ○Telnet, ACR, LEDの点滅などのテストができる。 germs_server ---+--> plugs +--> cs8900 ○GERMS MoniterのEthernet版。 germs_cliant (DOS用プログラム) a_cpp_test ("stdio.h"も含む) ○CPPの文法テスト hello_cs8900 ---+--> cs8900 ○CS8900のレジスタダンプ hello_debug hello_flush hello_nios ○99から0まで7segでカウントダウンする。 hello_watchdog hello_world ○周辺装置がいくつあるかを表示する。 lcd_demo1 (, "pio_lcd169207.h" を含む) ○LCDモジュールのテスト。 ○割り込みによるキーボード入力の取得 ○タイマー制御 nedk_brige -----+--> plugs +--> cs8900 nedk_example_web_server --------+--> plugs +--> wosfs +--> cs8900 ○Web Server ○終了コマンドをrs-232cからまたはスイッチで送れるように したいのだが、、。 recursion_test ○再帰呼び出しによるスタックテスト tcp_receiver ---+--> plugs +--> cs8900 tcp_sender (DOS用プログラム) tcp_test -------+--> plugs +--> pio_lcd16207 ●ANSI標準関数● ====== 利用できるもの ====== printf() RS-232Cへ出力。 rand(), srand() 定数 RAND_MAX は定義されていないが、利用できる。 sprintf(char *str, const char *fmt,...) strにfmtで定められた書式にしたがって文字を代入する。 ====== 利用できるないもの ====== time() 定義されていない。 NULL 定義されていない。 ●アルテラ提供ハードウェア制御関数● ====== nios.h ====== nr_pio_showhex(); 7 segment LEDへ数値を出力。 詳しくは nios_software_development_referece.pdf を参照。 nr_delay(t) tミリ秒だけ待つ。 nr_uart_rxchar(0) RS-232Cから文字を受け付ける。 if(nr_uart_rxchar(0) == 27) ... とするとESCキーが押されたときに...を処理する。 ====== pio_lcd16207.h ====== void nr_pio_lcdinit(np_pio *lcdPio); LCD初期化関数。通常は nr_pio_lcdinit(na_lcd_pio); である。 void nr_pio_lcdwritescreen(char * string); LCDへsを表示。 ●自作関数● int sdram_test_main(void) ・SDRAMの読み込み書き込みテスト ・nios.h内で定義されている na_sdram から na_sdram_end までの na_sdram_size byteを テストする。