在packages/ecos.db文件中包含我们能够生成的所有targets,其中就包括我们需要的ep9312
target edb9312 {
alias {"Cirrus Logic EDB9312 evaluation board" ep9312 }
packages { CYGPKG_HAL_ARM
CYGPKG_HAL_ARM_ARM9
CYGPKG_HAL_ARM_ARM9_EP93XX
CYGPKG_DEVS_FLASH_STRATA
CYGPKG_DEVS_FLASH_EDB9312
CYGPKG_DEVS_ETH_ARM_EP93XX }
description "The EDB9312 target provides the packages needed to run eCos on the Cirrus Logic EP9312 based development boards."
set_value CYGHWR_HAL_ARM_EDB93XX_VARIANT "EP9312" }
下载ecos用到的toolchain
luther@gliethttp:/vobs/tmp/ep9312$ wget --passive-ftp ftp://ecos.sourceware.org/pub/ecos/ecos-install.tcl
luther@gliethttp:/vobs/tmp/ep9312$ sh ecos-install.tcl //然后选择安装就可以了
luther@gliethttp:/vobs/tmp/ep9312$ export ECOS_REPOSITORY=/vobs/works/ecos-2.0/packages
下面new target template,这里target就是packages/ecos.db中包含的ep9312;templates就是packages/templates下的redboot
生成一个新的ecos.ecc平台配置文件
luther@gliethttp:/vobs/tmp/ep9312$ /vobs/works/ecos-2.0/tools/bin/ecosconfig new ep9312 redboot
U CYGPKG_HAL_ARM_ARM9_ARM920T,new inferred value 1
U CYGSEM_HAL_USE_ROM_MONITOR,new inferred value 0 //========================
作如下修改,否则报错:tail: cannot open `+43' for reading: No such file or directory
以下方法参考:http://hi.baidu.com/xxwl04108/blog/item/5e0706ecd77e92d22f2e21c3.html
luther@gliethttp:/vobs/tools/arm-tools$ sed 's/^tail /tail -n/' arm-elf-tools-20030314.sh > arm-elf-tools-20030314.sh.luther
luther@gliethttp:/vobs/tools/arm-tools$ chmod +x arm-elf-tools-20030314.sh.luther
luther@gliethttp:/vobs/tools/arm-tools$ sudo ./arm-elf-tools-20030314.sh.luther 这样就可以正常安装了