Embest SBC6300x User manual

SBC6300x
ARM9 Based Single Board Computer
WinCE Development Guide
Version 1.2
20th Jan 2014

Copyright Statement:
SBC6300x and its related intellectual property are owned by Shenzhen
Embest Technology Co., Ltd.
Shenzhen Embest Technology has the copyright of this document and
reserves all rights. Any part of the document should not be modified,
distributed or duplicated in any approach and form without prior written
permission issued by Embest Technology Co., Ltd
Revision History:
Version
Date
Description
1.0
24/10/2009
Original Version
1.1
26/02/2013
First Revision
1.2
20/01/2014
Localisation

Table of Contents
SBC6300X WinCE 6.0 User Manual. Error! Bookmark not defined.
Chapter I. Introduction of the ManualError! Bookmark not defined.
1.1 Terms and definitions ................................................................. 1
1.2 Disclaimer ...................................... Error! Bookmark not defined.
Chapter II. Introduction of WinCE 6.0 system ......................... 2
2.1 Image files related to SBC6300X WinCE 6.0 system......................... 2
2.2 Working principles of SBC6300X WinCE 6.0 system ......................... 2
2.3 The address of SBC6300X WinCE 6.0 system image files in flash ....... 4
Chapter III. Burning of WinCE system.................................... 7
3.1 Introduction to burning of SBC6300X WinCE 6.0 system image files ... 7
3.2 Burn SBC6300X WinCE 6.0 system image through SAM-BA (boot from Dataflash)
..................................................................................... 7
3.3 Burn SBC6300X WinCE 6.0 system image through SAM-BA (boot from NAND
flash) ....................................................................................19
Chapter IV. Boot WinCE 6.0 system......................................32
4.1 Boot WinCE system .......................... Error! Bookmark not defined.
Chapter V. Customization of WinCE system based on SBC6300X WinCE 6.0
BSP ..........................................................................33
5.1 Installation of SBC6300X WinCE 6.0 BSP ......................................33
5.2 The compilation of WinCE system based on SBC6300X WinCE 6.0 BSP33
5.3 The compilation of WinCE system based on SBC6300X WinCE 6.0 BSP33
5.4 Modules of SBC6300X WinCE 6.0 BSP driver..................................43

Page | 1
1Overview
This Manual mainly expounds the burning of WinCE 6.0 system image files
of the SBC6300X main board and system customization based on the
SBC6300X WinCE 6.0 BSP.
1.1 Terms and definitions
Development Workstation: Development Workstation means X86 PC
installed with Windows XP operating system, Microsoft Visual Studio 2005
and Windows Embedded CE 6.0 development environment. This PC must
have a serial port and a USB port.
SPI DataFlash: SPI DataFlash means the DataFlash AT45DB321D-SU
(4MB) of SPI interface on the SBC6300X main board.
NAND flash: NAND Flash the 8-bit 128MB SAMSUNG K9F1G08UB NAND
flash module on the SBC6300X main board.
SDRAM: SDRAM means the extended 64MB SDRAM on the SBC6300X
main board, which consists of 2 pieces of 16-bit 32MB HY57V581620FTP-
HKOR.
SRAM: SRAM means the 16KB SRAM inside the AT91SAM9263 chip that
SBC6300X main board uses.
DNW: The serial port tool running on the development workstation.

Page | 2
2Introduction to the WinCE 6.0
system
2.1 Image files related to the SBC6300X
WinCE 6.0 system
If the WinCE system is customized using the SBC6300X WinCE 6.0 BSP
that we provide and the compilation is successfully finished, the system
will generate 6 image files, i.e.: FIRSTBOOT.nb0, EBOOT.nb0, NK.nb0,
FIRSTBOOT.bin, EBOOT.bin, NK.bin, of which 4 files are usually used in
burning processes, i.e.: FIRSTBOOT.nb0, EBOOT.nb0, NK.nb0, NK.bin. The files
generated in .nb0 format will finally be burnt to DataFlash or NAND Flash,
and they can directly run in SDRAM; while the files in .bin format must
first be converted into .nb0 files by EBOOT running on SBC6300X main
board nb0, they are then burnt to DataFlash or NAND Flash.
2.2 Working principles of the SBC6300X
WinCE 6.0 system
At present, our SBC6300X WinCE 6.0 BSP supports two booting modes,
i.e.: SPI DataFlash and NAND flash. Below is their rough booting flow
chart:

Page | 3
Figure 1: Booting Flowchart
2.2.1 Principles for booting the SBC6300X WinCE 6.0 system
from DataFlash
After power on, the system inside the CPU ROMBOOT will
automatically copy the FIRSTBOOT image (the first-level user booting
code) from the SPI DataFlash 0x00000000 address to the SRAM inside
the CPU and execute it. FIRSTBOOT’s role is to initialize SDRAM
memory, SPI DataFlash, and copy EBOOT, the second-level user booting
code from the SPI DataFlash 0x00005000 address to SDRAM on the
SBC6300X main board and execute it; FIRSTBOOT also copies the Logo
from the SPI DataFlash 0x00100000 address of the SBC6300X main
board to SDRAM. In its default state, EBOOT will automatically copy the
WinCE system image NK from the NAND flash 0x00200000 address to
the SDRAM on the SBC6300X main board, and hand over system control
to the operating system. In addition, EBOOT undertakes the
management operations of the underlying hardware and shares the data
settings with the operating system.
2.2.2 Principles for booting the SBC6300X WinCE 6.0 system
from NAND Flash
After power on, the system inside the CPU ROMBOOT will automatically
copy the FIRSTBOOT image (the first-level user booting code) from the

Page | 4
SPI NAND flash 0x00000000 address to the SRAM inside the CPU and
execute it. FIRSTBOOT’s role is to initialize SDRAM memory, SPI NAND ,
and copy EBOOT, the second-level user booting code from the NAND Flash
0x00020000 address to SDRAM on the SBC6300X main board and execute
it; FIRSTBOOT also copies the Logo from the NAND flash 0x00080000
address of the SBC6300X main board to SDRAM. In its default state,
EBOOT will automatically copy the WinCE system image NK from the
NAND flash 0x00200000 address to the SDRAM on the SBC6300X main
board, and hand over system control to the operating system. In addition,
EBOOT undertakes the management operations of the underlying
hardware and shares the data settings with the operating system.
2.3 The Flash Address of System Image Files
2.3.1 When booted from DataFlash
If you choose to boot from Data flash:
FIRSTBOOT is located at the beginning of the 0x00000000 address
of SPI DataFlash, the capacity of FIRSTBOOT is 4KB;
EBOOT is located at the beginning of the 0x00005000 address of
SPI DataFlash, the capacity of EBOOT is 200KB;
The Logo is saved at the beginning of the 0x00100000 address of
SPI DataFlash;
WinCE system image files NK is located in NAND flash in an area of
40MB starting from the 0x00200000 address.
The area in NAND flash outside of this 40MB will provide functionality as a
NAND flash hard disk under the WinCE system. Therefore, users can
customize a WinCE system of no more than 40MB. If you need to store a
WinCE system bigger than 40MB or need reduce the NAND flash partition
reserved for WinCE system images, please feel free to contact our
technicians for assistance.

Page | 5
Figure 2: DataFlash Structure
2.3.2 When booted from NAND flash
If you choose to boot from NAND flash:
FIRSTBOOT is located at the beginning of the 0x00000000 address
of the NAND Flash, the capacity of FIRSTBOOT is 4KB;
EBOOT is located at the beginning of the 0x00020000 address of
the NAND flash, the capacity of EBOOT is 200KB;
The Logo is saved at 0x00080000 of the NAND Flash; WinCE
system images are located in NAND Flash in an area of 40MB
starting from the 0x00200000 address.
The area in NAND Flash after the 0x2860000 address will provide
functionality for use as a NAND Flash hard disk under the WinCE system.
Therefore, users can customize a WinCE system of no more than 40MB. If
you need store a WinCE system of bigger than 40MB or need reduce the
NAND Flash partition reserved for WinCE system images, please feel free
to contact our technicians for assistance.

Page | 6
Figure 3: NAND Flash Structure

Page | 7
3Burning a WinCE System
3.1 Introduction to Burning System Image
Files
The SBC6300X WinCE 6.0 BSP supports two burning modes:
1. Burn FIRSTBOOT, EBOOT and WinCE system image NK using
the SAM-BA software provided by ATMEL;
2. Connect VS2005 WinCE 6.0 development environment installed
on client development workstation or other TFTP servers (e.g.:
CEDownload.exe) to the SBC6300X main board, burn WinCE
system image files NK via net cable using EBOOT on the
SBC6300X (the EBOOT on the SBC6300X WinCE 6.0 BSP
doesn’t support the burning of user booting codes FIRSTBOOT
and EBOOT, it can only burn the WinCE system image file
NK.bin).
Note:
If you use EBOOT as the user booting code on the SBC6300X main board to
WinCE system image file NK, the actual process will be, EBOOT, the user
booting code on SBC6300X main board will first download WinCE system
image file NK.bin that VS2005 WinCE 6.0 generates from TFTP server running
on the development workstation to the SDRAM on the SBC6300X main board
via Ethernet cable, then the file will be converted into NK.nb0 before being
burnt to NAND flash. The TFTP server mentioned here can be the server
provided in VS2005 WinCE 6.0 development environment or other TFTP
servers. Please note that the port parameter of the TFTP server that you use
is 980 instead of 69, the standard TFTP port. The software CEDownload.exe,
which we will describe in Section 3.4 below is a TFTP server software, which
has changed the default TFTP port from 69 into 980.
3.2 Booting from DataFlash
3.2.1 Install the SAM-BA software
Install the AT91-ISP v1.12.exe application (located in \03 WinCE 6.0
Kit\04 Tools\) on the SBC6300X CD to your development workstation

Page | 8
with the default path and configuration of the program. After the
installation is complete, you will see the SAM-BA v2.8 icon on the
desktop:
Figure 4: SAM_BA Icon
3.2.2 Burning a system image using SAM-BA software
1. Make sure the three-way DIP switch is set to the OFF state and
make sure there is no SD card in the SD slot of the SBC6300X.
2. Connect the USB device port (J9) of the SBC6300X to the USB
Host of the development workstation using the supplied USB
cable.
3. Connect the supplied 12V power supply to the J1 port of the
SBC6300X main board.
4. Turn on the power switch (SWITCH B1) of the SBC6300X main
board; the SBC6300X main board should now be energized.
5. Double click the SAM-BA v2.8 icon as shown below to run the
SAM-BA v2.8 program, and select AT91SAM9263-EK and
\usb\ARM0 from the menu as shown below.
Figure 5: SAM-BA Initialisation
6. Click the Connect button to enter the interface as shown below.

Page | 9
Figure 6: SAM-BA Main Interface
7. Set the boards second and third DIP switches to the ON state
then configure the software as shown above (under the
DataFlash AT45DB/DCB tab).
8. Select Enable DataFlash (SPI0 CS0) in the Scripts box, and
click the Execute button to enable SPI DataFlash on the
SBC6300X main board. After this is successful, the SAM-BA
interface will resemble the following:

Page | 10
Figure 7: SAM-BA Interface After DataFlash is Enabled
9. As shown above, select Send Boot File in the Scripts menu and
click the Execute button. An open file dialog box as shown
below will display:
Figure 8: Open File Dialog Box
Comment [ML1]: Chinese

Page | 11
10. As shown below, select the FIRSTBOOT_SPIDATAFLASH.nb0 file under
the directory \03 WinCE 6.0 Kit\00 Image\ in the SBC6300X CD. In
the open file dialog box click the open button, SAM-BA will
automatically start burning the FIRSTBOOT_SPIDATAFLASH.nb0 file to
the beginning of the 0x00000000 address of SPI DataFlash on
the SBC6300X main board.
Figure 9: Selecting File
11. After the burning is successful, the window shown below will
appear:

Page | 12
Figure 10: SAM-BA Main Interface
12. Enter the address 0x5000 in the Address field in the
Download/Upload File section, select EBOOT_SPIDATAFLASH.nb0 file
under the path \03 WinCE 6.0 Kit\00 Image\ on the SBC6300X CD
in the Send File Name text box. Then click the Send File button
in the Download/Upload File area, the software will
automatically start burning EBOOT_SPIDATAFLASH.nb0 file to the
beginning of the 0x00005000 address of SPI DataFlash on the
SBC6300X main board.

Page | 13
Figure 11: Information to be Entered into SAM-BA
13. After the burning is successful, the interface as shown below
will appear:

Page | 14
Figure 12: Burning Successful
14. As shown below, enter the address 0x100000 in the Address
field in the Download/Upload File area, select the Logo.bin file
under the path \03 WinCE 6.0 Kit\00 Image\ on the SBC6300X CD
in the Send File Name text box. Then click the Send File button
in the Download/Upload File area. The software will
automatically start burning the Logo.bin file to the beginning of
the 0x00100000 address of SPI DataFlash on the SBC6300X
main board.

Page | 15
Figure 13: SAM-BA Logo Settings
15. As shown below, select the NAND Flash tab. In the Scripts
menu select Enable NAND Flash, and click the Execute button
to enable NAND Flash on the SBC6300X main board.

Page | 16
Figure 14: Enabling NAND Flash
16. After the enabling operation is successful, the interface as
shown below will appear:

Page | 17
Figure 15: Operation Successful
17. Select the SBC6300X CD \03 WinCE 6.0 Kit\00 Image \NK.nb0 file in the
Send File Name area, then click the Send File button in the
Download/Upload File section. The software will start burning
the NK.nb0 file to the beginning of the 0x00200000 address of
the NAND Flash on the SBC6300X main board.
Other manuals for SBC6300x
1
Table of contents
Other Embest Motherboard manuals

Embest
Embest SBC6345 User manual

Embest
Embest SBC6300x User manual

Embest
Embest EB-SAM3U User manual

Embest
Embest SBC9000 User manual

Embest
Embest BB-EPH1800 User manual

Embest
Embest SBC8018 User manual

Embest
Embest SBC8600B User manual

Embest
Embest SBC-EC9100 User manual

Embest
Embest Altera Lark Board User manual

Embest
Embest AM3517 User manual