# README-WinCE.ronetix # Programming of WinCE 6.0 R3 on AT91SAM9G45 based board PM9G45 # # Ronetix GmbH # www.ronetix.at # # 1. Build Windows CE 6.0 R3 for PM9G45 1.1. get the BSP for AT91SAM9G45-EK board. http://www.at91.com/windows-ce-bsp-files/download.html?path=AT91SAM9G45_v1.0.0_secure.zip There is version 1.4.0 which I haven't use except USB changes from v1.0.0. 1.2. Get pm9g45 specific sources Get http://download.ronetix.info/boards/wince/pm9g45/src/WinCE-pm9g45-svn-r26.zip and extract it in WINCE600 directory (usually it is C:\WINCE600). Let the archive override all required files. 1.3. in Windows CE root directory create a directory "OSDesigns" if it do not exists. 1.4. get http://download.ronetix.info/boards/wince/pm9g45/src/OSDesign3-use-with-WinCE-pm9g45-svn-r26.zip and extract it in WINCE600\OSDesigns\ directory. 1.5. Start "Visual Studio 2005"( with "Windows Embedded 6.0 CE R3" installed) and open WINCE600\OSDesigns\OSDesign3\OSDesign3.sln 1.6. On "Solution Explorer" or "Catalog Items View" right click on "OSDesign3-minimal" and choose "Rebuild OSDesign3-minimal" 1.7. NB0 images will be in WINCE600\OSDesigns\OSDesign3\OSDesign3-minimal\RelDir\PM9G45_ARMV4I_Release directory. 1.8. FIRSTBOOT.nb0 have to beset with its correct size value at address 0x14, so open the file and at address 0x14 put 0x00420000(it is in bigendian). Note: The AT91SAM9G45 rom boot loader checks if the value at offset address 0x14 in NAND has a "proper" value to load that size form NAND to SRAM and run it. Now the NB0 are ready to be burned in NAND. 2. To check the installed components in a pre built images 2.1. Get dumprom form http://www.xs4all.nl/~itsme/projects/xda/dumprom/dumprom.exe or from http://download.ronetix.info/boards/wince/dumprom.exe (check for viruses from here http://www.virustotal.com) 2.2. Extract the NB0 file like this: >mkdir files >dumprom.exe NK.nb0 0x8006c000 -d files In most cases 0x8006c000 as a Physical Start Address or can be seen from the build log. 2.3. Take a look at files\ceconfig.h 3. Program the files A pre built images can be found here in http://download.ronetix.info/boards/wince/pm9g45/OSDesign3-minimal_svn-r26_pm9g45_v1.2 directory. The table below shows the addresses at with the images have to be written. FIRSTBOOT 0x00000000 EBOOT 0x00080000 NK 0x00200000 A. Program using PEEDI Be sure that the flash section you choose to program the images the parameter OOB_INFO is set to JFFS2 like this: OOB_INFO = JFFS2 peedi> flash set peedi> flash erase ; This erase the whole NAND peedi> flash program FIRSTBOOT.nb0 bin 0x0 peedi> flash program EBOOT.nb0 bin 0x80000 peedi> flash program NK.nb0 bin 0x200000 B. Programming using SAM-BA TODO: 4. Connect the RS232-DEBUG port from the BB9263 to the PC using a serial cable and start a terminal program (115200,8,N,1, no flow control). 5. Set EBOOT EBOOT needs some parameters to load and run the WinCE. These parameters have default values which in some cases are sufficient to run the WinCE, but often when the NK.nb0 size increases because of more included stuff. Physical Start Address : (0x8006c000) : 0x8006c000 Starting ip : (0x8006d000) : 0x8006d000 Total ROM size : (0x16174f0) : 0x192b710 These parameters can be seen from the Visual Studio Build log windows or from file C:\WINCE600\PLATFORM\PM9G45\build.log . 5.1. Power on the board and enter in the EBOOT menu by pressing [SPACE]: Press [ENTER] to download now or [SPACE] to cancel. 5.2. Select option "9" and change to: 9) Launch existing flash resident image at startup 5.3. Select option "n" ("Nand Flash Menu") and then sub-option "2" ("Enter manually the image parameters"): Physical Start Address : (0x8006c000) : 0x8006c000 Starting ip : (0x8006d000) : 0x8006d000 Total ROM size : (0x16174f0) : 0x192b710 5.4. Select sub-option "3" ("Quit") and then "s" ("Save configuration now") 6. Reboot the board Now it should run.