ecos-3.0付属のredboot

ルネサスH8が乗っかっているの秋月のakih8-3069f-lanを使用する事があり、
bootloaderにredbootを採用してみた。
  注)redbootはnet経由でプログラムのロードが出来るので速て便利です。
netでまず環境構築(コンパイルなど)を調べたがecos-2.0版の記事のみだったので
ecos-3.0版の環境構築を書きます。(詳しくは書かない)
特に悩むところはありません。過去のパッチがすべて入っているのかな。


  1. ソースありか
  2. コンパイル環境 下記のverを使用した。-> TOPEERS-H8で推奨している版の新しい方。

    binutiles-2.16.1
    gcc-3.4.3
    newlib-1.13.0
    
    これを ELFで作成する。( --target=h8300-elf )
     -> TOPEERSのh8.txtとnetで調べてね!
    

  3. ecos-3.0を解凍したらecosconfigを行う。
    IPアドレスはBOOTPで割り当てられるようになる設定。
export 
ECOS_REPOSITORY=/cygdrive/d/...../ecos-3.0/packages
cd ecos-3.0 ; mkdir redbot_build ; cd redboot_build
../tools/bin/ecosconfig new aki3068net redboot
../tools/bin/ecosconfig add CYGPKG_DEVS_ETH_NS_DP83902A
../tools/bin/ecosconfig add CYGPKG_CYGMON
../tools/bin/ecosconfig add CYGPKG_IO_ETH_DRIVERS

  1. ecos.eccが出来るのでSCIの転送速度を設定する。
    ↓SCIの転送速度を38400bpsに設定。-> 38400が安定しいる様です。 
    cdl_option CYGNUM_HAL_H8300_SCI_BAUD_RATE {
        user_value 38400
    

  2. makefile生成とコンパイル
    ../tools/bin/ecosconfig tree
    make
    

  3. 出来たオブジェクトをモトローラSフォーマットへ変換
    h8300-elf-objcopy.exe -O srec redboot.elf redboot.mot
    

  4. akih8_3069f-lanのFlashへ書き込む

  5. lanケーブルとrs-232cケーブルを接続する。teraTermを立ち上げ38400 p無 stop-1bitを設定。
    -> ルーターでIP割り当てが出来ること。

  6. 電源ONで下記文字が出てくる。
    +DP83902A - eeprom ESA: xx:yy:zz:aa:bb:cc
    ... waiting for BOOTP information
    Ethernet eth0: MAC address dd:ee:ff:gg:hh:ii
    IP: 192.168.BOOTP割り当て/255.255.255.0, Gateway: 192.168.11.1
    Default server: 0.0.0.0
    
    RedBoot(tm) bootstrap and debug environment [ROM]
    Non-certified release, version v3_0 - built 09:57:39, 月 11 2009
    
    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
    RedBoot is free software, covered by the eCos license, derived from the
    GNU General Public License. You are welcome to change it and/or distribute
    copies of it under certain conditions. Under the license terms, RedBoot's
    source code and full license terms must have been made available to you.
    Redboot comes with ABSOLUTELY NO WARRANTY.
    
    Platform: Akizuki H8/3068 Network micom (H8/300H)
    RAM: 0x00400000-0x005f4000 [0x00400000-0x005f4000 available]
    RedBoot>
    

  7. この状態でgdb_stubも入っておりh8300-elf-gdb(GDBもELF版)にも接続できる。
  注)GDBでELFファイルのロードがうまくいってません。情報を求む。。
    netではecos-2.0にはGDBでELFプログラムロードにバグありの記述がある。
    ecos-3.0にもこのバグが残ってる??情報求む。。

追加情報 → c コマンドで暴走する。
        このコマンド以前のプログラムロード、レジスタ・メモリの参照は出来ている。(変更も出来る)
        注)いきなり cコマンドを打たずに命令毎のstpe実行もXです。