通过一个礼拜的痛苦折磨把9261这个板子环境搞定了写下来留个备份
一、安装WINCE5.0
二、安装 AT91ARM9261BSP1.7开发包
其中先编辑C:/WINCE500/PLATFORM/AT91SAM9261EK_BIN/FILES的config.bib
在最后加上
ROMSTART=80069000
ROMWIDTH=32
ROMSIZE=02000000
这个用来产生nk.bn0文件的设置
如果要使用hive设置请先编辑
C:/WINCE500/PLATFORM/AT91SAM9261EK_BIN/SRC/DRIVERS/NandFlash/NandFlashDll
Nandflash.reg
添加红色的如下:
IF BSP_AT91SAM9261EK_SAVEDREGISTRY_NAND
[HKEY_LOCAL_MACHINE/init/BootVars]
"SystemHive"="Documents and Settings//system.hv"
"PROFILEDIR"="Documents and Settings"
; Set the location and name of the system hive file
"Start DevMgr"=dword:1
; Start storage manager in boot phase 1 for hive-based registry
"Registryflags"=dword:1
ENDIF BSP_AT91SAM9261EK_SAVEDREGISTRY_NAND
三、制作自己的WINCE5系统
1、加入at91arm9261BSP File->Manage Catalog Item
Import cec 文件到安装at91arm9261BSP1.7 的安装目录下找到.cec 文件导入然后OK
2、开始定制WINCE
四、BSP驱动加好后就设置CONFIG
PlatForm ->Settings
完成设置后最后步把C:/WINCE500/PLATFORM/AT91SAM9261EK_BIN下Tools_ARMV4I整个文件夹复制粘贴到
C:/WINCE500/PBWorkspaces/at91arm9261ek/RelDir/AT91SAM9261EK_BIN_ARMV4I_Release下面也就是你自己建立的工程下
完成所有的设置就进行编译
Build OS ->Sysgen
当编译完成后你到工作输出区去找到
Table of contents 80378070 00000f90 ( 3984)
Writing ROM signature and TOC pointer at 80070040
Kernel data copy section 80550fb8 00000020 ( 32)
ROM Header 8037801c 00000054 ( 84)
First DLL code Address: 038c0000
Last DLL code Address: 04000000
First DLL Address: 01f501f5
Last DLL Address: 02000000
Physical Start Address: 80070000
Physical End Address: 8063aa58
Start RAM: 80640000
Start of free RAM: 8066a000
End of RAM: 82000000
Number of Modules: 86
Number of Copy Sections: 2
Copy Section Offset: 80550fb8
Kernel Flags: 00000002
FileSys 4K Chunks/Mbyte: 128 <2Mbyte 128 2-4Mbyte 0 4-6Mbyte 0 >6Mbyte
CPU Type: 01c2h
Miscellaneous Flags: 0002h
Extensions Pointer: 80072298
Total ROM size: 005caa58 ( 6072920)
Starting ip: 80071000
Raw files size: 0005dec6
Compressed files size: 0003248c
如红色的Total ROM size 记入在烧入时用到
最后制作自己的sdk
这样就生成自己的SDK了然后进入自己的工程下找到SDK 完全安装这样在VS2005下就会有你自己做的系统的SDK了
五、sam-ba的烧入
按装SAM-BA
一.
Dataflashboot.bin,u-boot.bin
1.
安装sam-ba软件在光盘->配套软件->sam-ba->Install AT91-ISP v1.10.exe
2.
连接开发板把开发板右上角的开关拨到OFF位置(这步很重要不然开发板没法烧写文件)
3.
打开SAM-BA软件如图
4.
点Connect进入
把开发板右上角的开关拨到ON位置
5.
选中DataFlash AT45DB/DCB选项卡在下拉列表中选择Enable DataFlash on CS0 然后执行Execute 完成如图所显示
6.
准备烧写之前要对DataFlash进行格式化,在下拉列表中选择Erase All 执行Execute
执行过程中会出现Please Wait窗口,等待数分钟,直到此窗口消失。
完成后如下图显示:
7.
开始烧写 firstboot.nb0文件
在下拉列表中选择Send Boot File 执行Execute
在点击[Execute]完后会弹出如下框
然后在烧写EBOOT.nb0文件注意在 address 里要写如0x5000
最后烧写NK.nb0 选择NandFlash
烧写完成关闭SAM-BA
打开重启开发板用DNW工具
进入CONFIGURATION
设置如下
0) Mac address .......... (00:12:72:72:20:20)
1) Ip address ........... (192.168.1.159)
2) Subnet Mask address .. (255.255.255.0)
3) DHCP ................. (Disabled)
4) Boot delay (seconds).. (5)
5) Frequency settings ... (core at 181, bus divider 2)
6) Download image to SDRAM
7) Launch existing flash resident image at startup
l) Launch flash resident image now
d) Download from ethernet now
s) Save configuration now
r) Restore default configuration and save now
n) Image flash menu
选N进入选2进入设置如下
Image Flash Menu :
1) Erase all sectors
2) Enter manually the image parameters
3) Quit...
>2
Enter the information found in the build report of the 'Make Image'. [entering 0 keeps present value]
Physical Start Address : (0x80069000) : 0x
Starting ip : (0x8006a000) : 0x
Total ROM size : (0x1230dd8) : 0x你刚刚在PB中看到的值
六、退出保存重启开发板完工