High Performance Low Cost Embedded Systems MINI2440 User’s Manual 2009-03-03 copyright@2007-2009 -1Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems COPYRIGHT STATEMENT The Chinese version of this manual is copyright © Friendly ARM. Acknowledgement is made to Friendly ARM for permission to translate and use the Chinese manual’s content (content being images, text, programs and scripts). The content (content being images, text, programs and scripts) of this English manual is copyright © Micro Arm Systems, Inc. All rights expressly reserved.
High Performance Low Cost Embedded Systems Table of Contents Chapter 1 Introduction............................................................................................................................................... 7 1.1 About this Manual........................................................................................................................................ 7 1.2 Benefits.............................................................................................................
High Performance Low Cost Embedded Systems 3.1.19 Using CMOS Camera ................................................................................................................... 72 3.1.20 Testing LCD.................................................................................................................................. 73 3.1.21 Backlight Control.......................................................................................................................... 74 3.1.22 A/D Conversion .
High Performance Low Cost Embedded Systems Chapter 6 Setting up WinCE Development Environment ..................................................................................... 149 6.1 Setting up WinCE 5.0 Development Environment .................................................................................. 149 6.1.1 Installing Platform Builder 5.0 (Including 2007 Patches) ............................................................ 149 6.1.2 Installing BSP ...........................................
High Performance Low Cost Embedded Systems CMOS Camera Interface ............................................................................................................................... 244 System Bus .................................................................................................................................................... 245 -6Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems Chapter 1 Introduction 1.1 About this Manual This manual is intended to provide the user with an overview of the MINI2440 board, its benefits, features, specifications, and set up procedures. 1.2 Benefits The MINI2440 Development Board is based on the Samsung S3C2440 microprocessor. Its PCB is 4-layer boarded, equipped with professional equal length wiring which ensures signal integrity.
High Performance Low Cost Embedded Systems 1.3.2 MINI2440 Hardware Features CPU - Samsung S3C2440A,400MHz,maximum 533Mhz SDRAM - On board 64M SDRAM - 32bit Data Bus - SDRAM, maximum clock frequency 100MHz FLASH Memory - On board 64M Nand Flash - On board 2M Nor Flash with preinstalled BIOS LCD - Four-wire touch screen interface -8Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems - Support black and white, 4 level grayscale, 16 level grayscale, 256-color、4096-color STN LCD, 3.5-inch to 12.1-inch, screen resolution 1024x768; - Support black and white, 4 level grayscale, 16 level grayscale, 256-color, 64K-color, true color TFT LCD, 3.5-inch to 12.1-inch, screen resolution 1024x768, - NEC 256K color 240x320/3.5-inch TFT true color touch screen, - 12 V power supply interface, it is for 12V CCFL backlight modules of big size TFT LCDs 1.3.
High Performance Low Cost Embedded Systems - NFS Drivers (all open source) - Drivers for 3 serial ports - DM9000 driver - Audio driver (UDA1341) (audio recording supported) - RTC driver - User LED driver - USB host driver - True color LCD driver (including 1024 x 768 VGA) - Touch screen driver - USB camera driver - Drivers for USB mouse, keyboard, flash drive and portable hard disk - SD card driver, supports maximum memory of 32 G - I2C-EEPROM driver - PWM buzzer driver - LCD backlight driver - A
High Performance Low Cost Embedded Systems 1.3.4.2 WinCE Features Version - Windows CE.net 5.0 Features - DM9000 driver source code - Drivers for USB keyboard, mouse, flash drive and portable hard disks - Drivers for 3 serial ports - USB ActiveSync - Audio driver - SD card driver - RTC clock - Registry archive - Power-down data save in flash drive - Screen rotation Default System Options (Simplified Chinese System) - XP screen - Windows Media Player 9.
High Performance Low Cost Embedded Systems Chapter 2 Getting Started 2.1 System Setup and Configurations 2.1.1 Boot Options You can select the booting mode by toggling the S2 switch: When toggling the S2 switch to the “Nor Flash” side the system will boot from on board Nor Flash. When toggling the S2 switch to the “Nand Flash” side the system will boot from on board Nand Flash. This board is shipped with the switch toggled to the Nand Flash side by default it will boot from Nand Flash.
High Performance Low Cost Embedded Systems Click on “Hyper Terminal” and a Window will pop up as below. Click on the “No” button Click on the “Cancel” button on the following window Click on the “Yes” button and the “OK” button to the next step A popup window will require you to name this connection. In this example we typed “ttyS0”. Windows does not accept names like “COM1” that have already been used by the system. - 13 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems After naming this connection another window will require you to select a serial port that will be used to connect the MINI2440 board. Here we selected COM1: Lastly, also the most important step is to set up the port properties. Note: you must select “No” in the data flow control field otherwise you will only be able to see outputs. In addition the bits per second should be set to 115200.
High Performance Low Cost Embedded Systems 2.2 Power Up 2.2.1 Entering BIOS The board is shipped with a preinstalled SUPERVIVI in Nor Flash. When the system boots from Nor Flash it will enter the BIOS and in the meantime the green LED1 on the board will be flashing. The startup interface is as below: - 15 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems SUPERVIVI is developed and maintained by Friendly Arm, it is based on vivi. It starts with a function menu. And users can switch between supervivi’s menu interface and command line. Supervivi can be burned into the Nor Flash with JTAG or run from the Nand Flash. When it is burned into the Nor Flash and run, users will see its menu.
High Performance Low Cost Embedded Systems driver will no longer be used. Installing this USB driver doesn’t need to connect to a board. It is just for the PC system. Open the shipped CD, double click on “windows 平台工具\usb 下载驱动\ FriendlyARM USB Download Driver Setup_20090421.exe” to start installing. The following window will show up: Click on (“Next”)the middle button. - 17 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems A warning message will pop up Click on the (“continue anyway”) the left button to finish the installation. - 18 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Now let’s test the USB connection: Connect the MINI2440 board to a host PC via a USB cable. Toggle the S2 switch to the “Nor Flash” side. Turn on the S1 switch, if this is the first time you connect, Windows XP will prompt that a new USB device is found. Follow the steps below to install a USB driver: (1) After the following window pops up, check the third option and click on the “Next” button - 19 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems (2) On the window shown below, check the first option and click on the “Next” button On the following popup window, click on the left button (“Continue anyway”). So far, our installation is done. - 20 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Open the shipped CD, click on the dnw.exe, if you can see “USB:OK”, this means the installation is a success. In the device manager, you will see the installed USB driver information: - 21 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 2.2.3 Entering Main Menu Note: the following programs that are downloaded via USB need to run together with the DNW application. - 22 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Item[x]: Partition Nand Flash with a default setting, it is the same as executing command: bon part 0 320k 2368k Item[v]: Download a linux bootloader vivi to the vivi partition of Nand Flash via USB Item[k]: Download a linux kernel to the kernel partition of Nand Flash via USB Item[y]: Download an image of the yaffs file system to the root partition of Nand Flash via USB Item[c]: Download an image of the cramfs file system to the root partition of Nand Flash via U
High Performance Low Cost Embedded Systems Partition Table Type “f”, you will be prompted to type a starting address and a end address, this table presents the address space of each partition Srarting Address End Address vivi partitions(block0-13) 0x0 0x50000 linux kernel partitions(block14-93) 0x50000 0x250000 file system partitions(block94-4095) 0x250000 0x4000000 complete address space of the Nand 0x0 0x4000000 Flash(block0-4095) Note:The on board Nand Flash has 4096 blocks,each block has 32 pages,each p
High Performance Low Cost Embedded Systems 2.2.4 Sub Menus This section will briefly introduces some submenu functions Type “p” to enter the interface shown below: (1) browsing partitions Type “v” to browse the current partition table, which is stored in the Nand Flash. If the Nand Flash has no data, it will show the default BIOS partition table. - 25 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (2) deleting partitions Type “d”, it will prompt you to enter the partition’s name you want to delete, e.g. “vivi” if you want to delete the vivi partition - 26 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (3) saving configurations Type “w” to save the current configuration. For instance, if you just deleted the vivi partition without saving it, next time when you browse the partition, it will still exist. - 27 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (4) adding partitions Type “a”, it will prompt you to enter some basic information (such as name, offset, size and so on) of the partition you want to add. You can just follow its default options. - 28 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (5) resetting partition table Type “r” to import the BIOS partition table and the current table will be overwritten. When you delete your Linux partition table by mistake, this command will restore it. After restoring our Linux partition you need to enter “w” to save this result. (6) returning to the main menu Type “q” to return to the main menu 2.2.5 Setting Linux Booting Parameters Item [s] allows users to configure how Linux should be booted.
High Performance Low Cost Embedded Systems (1) browsing current configuration Type “v” to browse the current configuration: - 30 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (2) setting parameters Type “s” to set parameters. There are two basic parameters (we don’t recommend to change other parameters): - Match_type - Linux command line The default value for MACH_TYPE is 782. For instance, if your compiled kernel’s MACH_TYPE is 867, you can change this value to boot your kernel. Firstly you need to type the parameter name “mach_type”, then type the value “867”, and finally, type “w” to save your change.
High Performance Low Cost Embedded Systems Linux_cmd_line is another very important parameter, for example, to change the kernel boot information and change the login port to serial port 1 (the default serial port is 0), you can do it this way: Linux_cmd_line:noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0 Type “s”, then the name of the parameter “linux_cmd_line”, enter and then type the new value.
High Performance Low Cost Embedded Systems Now when the system reboots, the booting and login messages will be output at serial port 1 and vivi’s messages will still be output at serial port 0. (3) Saving configuration Type “w” to save the new setting. (4) Restoring default value Type “r” to restore the default kernel setting. (5) Returning to main menu Type “q” to return to the BIOS main menu. 2.
High Performance Low Cost Embedded Systems Those devices include PWM buzzer, RTC real time clock, AD conversion, user test keys, touch screen, LCD, Infrared function, I2C bus, audio input/output and SD card. 2.3.1 Downloading Testing Utilities The 2440test program is an independent utility. It is based on Samsung’s 2440test utility. We just made some changes for easier use and better experience. In addition we compiled different executables for varied LCDs. Users can download it to RAM via USB and run it.
High Performance Low Cost Embedded Systems (3) Click on the “Configuration” menu, set the download address to “0x30000000”. (4) Select item [d] in the BIOS menu, you will see the following screenshot. (5) Click on “USB Port” -> “Transmit” on the DNW interface, select “2440test.bin,” and “open” - 35 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems to begin download. (6) When download is done, it will auto run, you will see the following screenshot - 36 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Meanwhile, the LCD will show the following picture. Note: when compiling the 2440test, you can set the “LCD_TYPE” in the header file “2440test\inc\Option.h” to choose the LCD type, but you cannot define more than one type value, here our default value is LCD_TYPE_N35, i.e. NEC3.5 inch true color screen. The header file 2440test\inc\Option.h has the following definitions: #define LCD_TYPE_N35 1; NEC3.
High Performance Low Cost Embedded Systems If the default setting is 7 inch LCD, you will see the following screenshot: If the default setting is VGA, you will see the following screenshot: - 38 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 2.3.2 Device Testing After installing the test utility, you can perform the MINI2440 device testing. (1) Testing PWM In the main menu, type “1”, enter and you will hear the sound of the PWM buzzer - 39 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Press the “-” key, the buzzer’s frequency will decrease, press the “+” key; the frequency will increase; press the “ESC” key, you will exit the test and return to the main menu. (2) RTC real time clock In the main menu, select “2”, enter and you will see the clock is changing which means the CPU’s RTC works normally (note: the time the clock shows is not the current time, it is initialized by the test utility) - 40 Copy right reserved © MicroArm Systems, Inc.
High Performance Low Cost Embedded Systems Press the “ESC” key you will exit the test and return to the main menu. (3) Testing AD conversion In the main menu, select “3” and enter to test AD conversion. You can use a screw driver to adjust the W1 or W2 (these two adjustable resistors are connected to AIN0 and AIN1) and will see the AD value is changing accordingly. - 41 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems Press the “ESC” key you will exit the test and return to the main menu. (4) Testing user keys In the main menu, select “4” and enter to test user keys. Press key K1 – K6, you will see corresponding key press messages come out from the serial port. - 42 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Press the “ESC” key you will exit the test and return to the main menu. (5) Testing touch screen If your package has a LCD, you can connect it to your MINI2440 for testing. In the main menu, select “5” and enter to test. Using a touch pen to click on the touch screen, you will see coordinator messages come out from the serial port. - 43 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems Press the “ESC” key you will exit the test and return to the main menu. (6) Testing LCD or VGA Before testing this module, please burn a correct 2440test utility. In the main menu, select “6” and enter to test. Follow the prompt to press any key you will see LCD show different screens towards the last one and return to the main menu. - 44 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems (7) Testing I2C In the main menu, select “7” and enter to test. The test utility will read from and write to I2C bus chip AT24C08. The test will write 0x - 0xFF to the chip and read them from it. - 45 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems After this test is done, it will automatically return to the main menu. (8) Testing audio output Connect a sound box to the green audio output port on the MINI2440 board, select “8” in the main menu and enter, you will hear the Windows XP startup music. - 46 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Press the “+” or the “-” button to turn up or down the volume. Press the “ESC” key you will exit the test and return to the main menu. (9) Testing SD card Note: this test will damage the data in your SD card, before testing please backup your SD data. Insert your SD card into the SD socket, select “9” in the main menu and enter to test. The test utility will read from and write to the card, and you will see the following information.
High Performance Low Cost Embedded Systems These messages show that SD card access is successful. After the test is done it will automatically return to the main menu. (10) Testing CMOS camera If you bought a CAM130 CMOS camera from us, you can test it with our utility. Before power on your board, please connect your camera to the “CAMERA” interface on the board. Then power on the board, select “10” in the main menu and enter to test.
High Performance Low Cost Embedded Systems With a 3.5 inch screen, you will see this: - 49 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Chapter 3 Running Linux 3.1 Software Applications and Configurations in Linux Qtopia Note: Qtopia 2.2.0 is developed by Qt based on Qt/Embedded 2.3 graphic interface. After Qtopia 2.2.0, Qt hasn’t released any new PDA versioned graphic interface. The latest Qtopia is for cell phones. But it is still developing Qt/Embedded libaries. For most of our released systems, we have installed Linux + Qtopia 2.2.0 by default. It has various useful utilities.
High Performance Low Cost Embedded Systems 2. After entering the system, go to “Start” -> “Settings” -> “Configurations” -> “Recalibrate”. Click on the “+” signal. 3.1.2 Main Interface After entering the Qtopia system you will see the following screenshot: - 51 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems On top of the interface, you will see five icons, which represent five types of programs/files. Single click on anyone you will enter its sub-interface. All of these interfaces are very similar. In addition, click on the “start” icon on the left bottom of the screen, you will see five sub-menus too, they are the same as the five ones on the top. Those five sub-interfaces are as follows: - 52 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems Among those programs, the ones in the “FriendlyARM” sub interface are developed or migrated by FriendlyARM. They are only for testing. All the other programs come with the system. 3.1.3 Playing MP3 Go to “Application Programs”, click on the “Music” icon, and it will popup a audio player window. Go to “Audio”, select a mp3 file and click on the “play” button, it will play this MP3 file.
High Performance Low Cost Embedded Systems 3.1.4 Playing Video In the “Application Programs” sub-interface, single click on the “video” icon, the video player interface will popup. Select a file in the “Video” list, and click on the “Play” button to enjoy your video. Note: the Video list lists all the video files in the “Documents” sub-interface. Note: you can also click on a file in the “Documents” sub-interface to play it. - 54 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems 3.1.5 Browsing Pictures In the sub-interface, single click on the “image” icon to open the image browser. The following screenshot shows 3 pictures the system has and some other images in an SD card. In Qtopia 2.2.0, the image browser has more features than the one in Qtopia 1.7.0 such as editing images. Editing Images: Select an image, single click to open it, and click on the pen icon to edit it.
High Performance Low Cost Embedded Systems Cutting Images: In the edit mode, click on the “scissors” button, the image will be shaded. Select an area within the image with a touch pen, release the pen, the selected area will be isolated and then you can edit this area. Zooming In/Out Images: In the edit mode, click on the magnifier icon, you will be able to zoom in or out an image. - 56 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems Note: the picture browser lists all the files in the “Documents” sub-interface. Note: you can also click on a file in the “Documents” sub-interface to open it. 3.1.6 Auto Mounting SD and USB Drives As long as your system is active, inserting a SD card (maximum of 32G) or USB portable storage, moments later a removable device icon will appear on the right bottom of the task bar. Our system supports mounting both cards simultaneously.
High Performance Low Cost Embedded Systems Go to “Application Programs” -> “System Info” -> “Storage”, you will be able to see more details about the SD or USB drive. 3.1.7 Calculator In the sub-interface “Application Programs”, click on the calculator icon you will see a calculator. You can choose its type by selecting different options (Simple, Fraction, Scientific, Conversion and so on) from the pull-down list. - 58 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems 3.1.8 Command Line The “terminal” is a commonly used interface in Linux. Users can command the system very easily via a command line window. There are various ways to open a terminal. For instance, you can set the system’s terminal to a serial port then this terminal will be a serial port terminal whose input and output are both through the serial port terminal without relying on a graphic interface. This is the most popular way in Linux.
High Performance Low Cost Embedded Systems When a graphic display interface is connected and a GUI is incorporated, a GUI based “command window” will be established. Users can interact with the system via either a real keyboard or a virtual “soft keyboard”. This is what this section describes. In the “Application Programs” subgroup, click on the “terminal” icon, a command line window will popup.
High Performance Low Cost Embedded Systems You can browse the directories and files in the system via this browser. Note: Qtopia-2.2.0 doesn’t have a file browser, FriendlyARM migrated one from Qtopia-1.7.0. They have the same functions and interface. 3.1.10 Configuring Network In the “FriendlyARM” subgroup, click on the “Network Settings” icon: From this interface we can set various network parameters: - Static IP address, default setting is 192.168.1.230 - Mask, default setting is 255.255.255.
High Performance Low Cost Embedded Systems 3.1.11 Testing Ping Please connect your board to a network, set up the network parameters such as gateway, DNS and so on. Then you can use our graphic interface to test network connection. In the “FriendlyARM” subgroup, click on the “Ping” utility: After you setup your DNS, your system will be able to recognize both character domain names and IP addresses. By default, ping will try four times. But if you check the “ping forever” option, it will ping forever.
High Performance Low Cost Embedded Systems Note: To ping an internet domain name, you need to set up your gateway and DNS correctly and make sure your systems is connected to the internet. Clicking on “Start” to ping, and “Stop” to end it. Before closing the interface you need to stop ping . Note: ping is a commonly used network utility, and it is in most of the released Linux and Windows systems. In a command line window, typing “ping” will start it.
High Performance Low Cost Embedded Systems 3.1.13 Testing LED In the “FriendlyARM” subgroup, click on the “LED” icon: On the popup window, the “Stop led-player” is enabled. This is because the led-player service is started on system startup. After the system boots up, you will see a “sequential led lighting” which is played by this service. To control a single LED, close this service to release the LED resources.
High Performance Low Cost Embedded Systems the “All On” button will turn on all the LEDs, and clicking on the “All Off” will turn off all the LEDs. Checking any LED box will turn on that LED, and unchecking will turn it off. Close the LED Testing interface the led-player service will be restarted. 3.1.14 Testing EEPROM In the “FriendlyARM” subgroup, click on the “I2C-EEPROM” icon to open the interface below: From top to bottom there are a “Write Data” button, Write area, “Read Data” button and read area.
High Performance Low Cost Embedded Systems “Write Data” button, the button will change to a process bar indicating the writing process; click on the “Read Data” button, it will change to a process bar too indicating the reading process. 3.1.15 PWM Buzzer In the “FriendlyARM” subgroup, click on the “PWM/Buzzer Testing” icon: By default, the output frequency of PWM is 1000Hz. Click on the “Start” button, the buzzer will beep. Clicking on the “+” or “-” button will change its frequency and sound as well.
High Performance Low Cost Embedded Systems 3.1.16 Serial Port Assistant Note: before start this program please connect the serial port your want to test to your board. - The on board CON1, 2 and 3 are CPU UART0, 1 and 2. UART0 has been converted to RS232, and extended to COM0 via DB9. On system startup it has been set to the console terminal, so it cannot be tested via this utility. The other two ports CON2 and 3 must be converted to RS232 before they can communicate with a PC serial port.
High Performance Low Cost Embedded Systems The title bar of the utility shows the default setting is “ttySAC1 115200 8N1 [C]”, and it implies the default port is: - Serial Port Deivce: /dev/ttySAC1, it corresponds to the second port UART1 - Bits Per Second: 115200 - Data Bits: 8 - Flow Control: None - Stop Bits: 1 - [C]: stands for the character mode; [H] stands for Hex There are two edit areas in the interface, the top one shows received data which cannot be edited; the bottom one shows sent data which ca
High Performance Low Cost Embedded Systems Click on “Disconnect” to disconnect the connection. Click on “Setting…” to enter the parameter setting interface which lists some basic serial port parameters: Comm Port: you can choose “/dev/ttySAC0,1,2” or the USB to Serial “/dev/ttyUSB0,1,2,3” Speed: bits per second Data: data bits, 8 or 7, usually 8. Hex: input and output data in Hex format - 69 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.
High Performance Low Cost Embedded Systems 3.1.17 Audio Recording In the “FriendlyARM” subgroup, click on the “recorder” icon: Click on the “REC” button to start recording. When you speak to the microphone on the board, you will see audio waves shown on the screen. Click on the “STOP” button to stop recording. - 70 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Click on the “PLAY” button to play what you recorded and you can see what you recorded has been saved as “WAV” files in the “Documents” directory. Note: Qtopia 2.2.0 has a recorder utility by itself. But it cannot record audio. We leave it as what it is. 3.1.18 Using USB Camera You can use any USB camera with our system which already has drivers for all existing USB cameras.
High Performance Low Cost Embedded Systems will take a picture which will be saved in the “Documents”. This utility has provides functions to adjust brightness, contrast and gamma value. When you start this utility, it will read the camera preset parameters. Note: although the system already has drivers for USB cameras, each camera might have different output format.
High Performance Low Cost Embedded Systems Click on the “Snap” button you will be able to take a picture which will be saved in the “Documents” subgroup (in the “/root/Documents/image/jpeg” directory). Then the “Snap” button will change to “Continue”. Click on it, you will be ready for picture taking again. When clicking on a taken picture in the “Documents” subgroup, it will be opened with Qtopia’s picture browser utility. 3.1.20 Testing LCD The LCD test utility is to test whether a LCD has dead pixels.
High Performance Low Cost Embedded Systems This utility has two test modes: auto and manual. Auto-loop loops automatically. By executing in this mode, it will display red, yellow, white, cyan, blue, green, pink and black eight colors sequentially. During this process, click anywhere on the screen, the system will end the test. Manual-control is run manually.
High Performance Low Cost Embedded Systems Follow the prompt, click on the blue area, you will close the backlight. Note:you just close the backlight, all the running program are still active. Click on the blue area again, the backlight will be turned on again. 3.1.22 A/D Conversion The Samsung S3C2440 chip has 8 A/D conversion channels but only one converter. In general, AIN4, AIN5, AIN6 and AIN7 are used as YM, YP, XM and XP channels via a four wire resistor. We extended AIN0-3 which reside on CON4.
High Performance Low Cost Embedded Systems Turning the W1 adjustable resistor, you will see the conversion changes. It has 10 digit precision, therefore the minimum value is close to 0 and the maximum value is close to 1024. When you click on the touch screen, the A/D converter will take the touch screen as the channel, you will see the result “-1”; when you move your touch pen away from the screen, the A/D converter will take AIN0 as the channel again.
High Performance Low Cost Embedded Systems Press down any buttons on the board, the corresponding button icons will change to blue, release them, their icons will change back to grey. 3.1.24 Testing Touch Pen To test whether or not a touch pen works accurately, you can draw a line on the LCD, check if there is any offset or vibration. This can be done via the “penpad” utility. Click on the “penpad” icon in the “FriendlyARM” subgroup: - 77 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems The “penpad” utility is an easy to use program developed by FriendlyARM. Start it, a yellow drawing area will show up. Draw whatever you like in the area (the pen color is black, its width is 1 pixel), go to “File” -> “Save”, you will save what you draw to a png file(in the “Documents” subgroup, the /Documents/image/png/ directory). The file name begins with 001. The maximum number of files that can be saved is 999.
High Performance Low Cost Embedded Systems 3.1.25 Barcode Scanning Our system supports USB barcode scanners which are actually a HID device very similar to a USB keyboard. Therefore a barcode scanner can work any where a USB keyboard works. Note: before start this utility, please make sure to plug in your scanner. Click on the “text editor” icon in the “Application Programs” subgroup, scan a code with your scanner, then you will see the code number displayed in the editor. 3.1.
High Performance Low Cost Embedded Systems It now supports three languages: English, Chinese and Japanese. When you select “English”, then click on “OK”, a message will popup asking you if you want to change your language setting. Clicking on “Yes” Qtopia will reboot; clicking on “No” it will return. (Note: the Chinese and Japanese versions only translate program names). - 80 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems 3.1.27 Setting up Time Zone, Date, Time and Alarm Clock When you get our system, the date and time usually might not be accurate. You can adjust them by yourself. Because the CPU has its own RTC and the board has a backup battery, after you adjust the date and time, they will be saved. To adjust them, click on the time zone area at the right bottom of the screen, a menu will show up, please select “Set time..
High Performance Low Cost Embedded Systems Besides you can set the alarm clock. When it is triggered, you will hear a beeping sound which lasts about one minute and the following popup window will show up. Click on “OK” to close the alarm clock. 3.1.28 Rotating Screen Click on the “rotation” icon in the “settings” subgroup to enter its interface. You can rotate the screen in four directions. - 82 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.
High Performance Low Cost Embedded Systems Select the direction you want, click on “OK” you will see the screen rotate. Note: sometimes you need to reboot Qtopia to see the rotation. It is a Qtopia utility and we hasn’t made any change to it. In addition the rotation effect is implemented via Qtopia software and has nothing to do with LCD drivers. 3.1.29 Setting up Auto Run Programs By setting “auto run” you can set Qtopia to run its own or your programs after it boots up.
High Performance Low Cost Embedded Systems Click on the “Auto Start Program” icon in the “FriendlyARM” subgroup. Those program listed are available programs which include all Qtopia programs, the status column indicates whether a program is set to auto start. The status is unique. For instance, if the “Serial Port Assistant” is checked, its status will show “Auto Start”, click on “Save”, a message box will pop up prompting that the net setting has been successfully saved.
High Performance Low Cost Embedded Systems 3.1.30 System Shutdown In the “Setting” subgroup, click on the “shutdown” icon you will see four options on the shutdown window. Shutdown: Press this button, Linux will end all the programs and services to shutdown the whole system. After the whole system is shutdown, the CPU will not be running and the system consumes lest power. However since our system doesn’t have a hardware power down circuit you still can see the power LED on the board is on.
High Performance Low Cost Embedded Systems There is a “brightness and power” icon in the “setting” subgroup. Since our system doesn’t have a power management circuit, this icon is not active. Note: the original Qtopia 2.2.0 system doesn’t “shutdown” or “reboot” effectively, we changed its code to make it work. 3.1.31 Watchdog The “Watchdog” is a very basic utility in embedded systems. The S3C2440 chip already has a watchdog. The latest Linux kernel has drivers for it.
High Performance Low Cost Embedded Systems Note: before take any action, please read the notes in the red area: once start, no way out, feed the dog, or else reboot! Here we set a countdown time 15 seconds. To feed the dog, click on the “Feed” button. Keep feeding, it will always have bones and the system will not reboot. 3.2 Operating MINI2440 Linux via Super Terminal This section will give a brief introduction on how to run Linux commands and various application programs in Linux via a super terminal.
High Performance Low Cost Embedded Systems 3.2.1 Mounting a USB Drive/Portable Hard Disk After inserting a USB drive, the system will automatically create a “/udisk” directory and mount the drive on it, you will see the following messages: - 88 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems The USB drive has a device name “/dev/udisk”. Entering the “/udisk” directory, you will be able to browse its contents. Note: if your drive cannot be detected, please check whether it is FAT32/VFAT. - 89 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 3.2.2 Mounting a SD Card Similar to USB drive mounting, a SD card will be automatically detected and mounted. After inserting a SD card, you will see the following messages: - 90 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems The system will create a “/sdcard” directory and mount the SD card on it. - 91 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 3.2.3 Mounting a CMOS Camera Connect a CAM130 camera to your board’s CAMERA interface, power on your board and login the system. Type the “camtest” command you will see the following screenshot: - 92 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 3.2.4 File Transfers to and from a PC via a Serial Port After login into the MINI2440 system via a serial port, you can transfer files to and from a host PC by using command “rz”or “sz” as follows: (1) Transfering files by using “sz” Open a super teminal, click on the mouse’s right button, then click on “Receive files” to set up the destination directory and the protocol this transfer will use, see the screenshot below: Type “sz /shanghaitan.
High Performance Low Cost Embedded Systems (2) Transfering files by using “rz” In your MINI2440 system, type “rz” to receive files from a host PC. Open a super terminal, click on the mouse’s right button, select “Send file”, set up the file being sent and the protocol the transfer will use. Then send the file: - 94 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems After the transfer is done, the current directory will get this file. You can verify it by using “md5sum” to check whether this file is the same as the original one. - 95 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Chapter 4 Running WinCE 4.1 Software Applications and Configurations in WinCE 4.1.1 Playing MP3 After starting WinCE, double click on the “Media Player” icon, the Windows Media Player will pop up as shown below. Select “File”-> “Open”, follow the prompt, locate an mp3 file you want to play, it will be run like what it does in a PC Windows system. In addition, the Media Player can also play the WMV files. 4.1.
High Performance Low Cost Embedded Systems 4.1.3 Configuring Web Server If the HTTP service is set to auto-run in WinCE, it will be started on startup. This service is what is commonly called “web server”. Connect the MINI2440 board which runs WinCE to a host PC, type the board’s IP address in IE’s address bar, if you see a preset home page as the example shown below, it indicates the web server has been started. - 97 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems 4.2 Testing Hardware in WinCE 4.2.1 Mounting a USB Drive Using a USB drive in WinCE is similar to Linux. After entering WinCE, plug a USB drive in the USB host port, the power led on the USB drive will be flashing, several seconds later this drive will be mounted on the system. Double click on the “My computer” icon, open the “resource manager”, you will observe that a USB device has been created.
High Performance Low Cost Embedded Systems 4.2.2 Mounting a SD Card Plug a SD card in the SD interface of the board you will be able to see a SD device “Storage Card” is created in the “resource manager”. Double click on the SD card icon, you will be able to browse its contents, read and write files. 4.2.3 Connecting a USB Device via ActiveSync Note: Please use the “\windows platform tools\CE ActiveSync USB driver” to install a USB driver.
High Performance Low Cost Embedded Systems 4.2.4 Testing Serial Ports Note: The MINI2440 system goes with a standard driver for three serial ports. To test ports 2 and 3, you need to utilize the shipped extended serial port board.
High Performance Low Cost Embedded Systems In your MINI2440, run the “SComAssistant” application, click on the “receive” button (it will be changed to “Stop”), type characters on the opened PC terminal, and you will see those characters simultaneously. Please see the screen shot below: Please follow the same procedure to set up COM3. - 101 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Chapter 5 Setting up Linux Development Environment 5.1 Setting up Fedora 9.0 Development Environment 5.1.1 Installing Fedora 9.0 Note: users can download a Fedora 9.0 DVD image from http://www.arm9down.cn/linux/fedora9.iso Step1: Insert the first disk in the CDROM/DVD, set the boot sequence to CDROM in the BIOS. After reboot the system, it will prompt the user to the following interface, just press “enter”. Step2:The system will check the installation disk.
High Performance Low Cost Embedded Systems Step3:it enters the graphic interface, click on the “Next” button. Step4:set the installation language. In this example, we chose the simplified English. - 103 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step5:set the keyboard, in this example, we chose the U.S. key board. - 104 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 6:configure the network. - 105 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems In our example, we didn’t set it as “DHCP”, we used a static IP instead, and typed the IP and subnet mask as follows. - 106 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Click on the OK button and go on to set the machine name, gateway and DNS. - 107 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 7:set the time zone. We chose “Asia/Shanghai”. - 108 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 8:set up the administrator’s password, i.e. the root’s password. “root” is the super user. It should be at least 6 characters - 109 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 9:disk partition. We followed the default option. Before do this, please back up disk data. - 110 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Click on “Next”, it will warn the user that all the data will be deleted. Usually we would do this installation in VMWARE, so we chose “Write changes to disk” and disk format would begin. - 111 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Here is the format process: - 112 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 11:select the installation type, in this example, we chose “customize” - 113 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 12:configure the “server” item as follows: - 114 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 13:begin installation - 115 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step14: installation complete. - 116 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step15: after installation completed, click on the reboot button on the page shown in step 14 - 117 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step16: skip this license page and go “forward” - 118 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step17: create new users. We ignored user creation and went to the next step. - 119 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Press “continue” to go on. - 120 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step18: setup date and time. We ignored this and went to the next step. - 121 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step19: confirm hardware information. We just clicked on “Finish”. - 122 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems On the popup window shown below, just click on the red marked button. - 123 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 20: on the login page, login as “root” - 124 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Input the password we just created for “root” - 125 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems When login as “root”, the following popup window will show up, just click on “Continue” - 126 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Below is the interface the user will see after a successful login. - 127 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 5.2 Basic Configurations and Applications 5.2.1 Adding a New User Account To create a new user (not root) account, here are the steps: Step 1: go to “Users and Groups” - 128 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 2: open the “Users Manager” window - 129 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step 3: click on the “Add User” button, type the user name and password - 130 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Click on “OK”, you will see that a new “plg” user has been created, and a “plg” directory has been created in the “/home” directory too. - 131 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 5.2.2 Accessing Windows Files You can easily access shared files in Windows from either a virtual machine or a real Fedora9 system as long as they can communicate. To connect to a Windows from a virtual machine, the easiest way is to set “Guest” to “Bridge” in the network configuration. To access shared files in Windows, please following the steps below: Step 1: set a shared directory in Windows.
High Performance Low Cost Embedded Systems Step 2: set Fedora9 Open the window below: - 133 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Select “Windows share” in the “service type” field Input the shared file’s name and its windows machine IP - 134 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Click on “connect”, the following window will show up: Go ahead and “connect” again, you will see the shared files you just set in your windows system. - 135 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems If you want to access this directory from the command line utility, you can do it by hitting the TAB key. - 136 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems To disconnect the shared directory, right click on the shared directory and following the operations in the screenshot below: 5.3 Setting up Cross Compile Environment A main step to build a development environment in the MINI2440 Linux system is to set up a cross compile environment. The following steps will introduce how to build a compile environment that can compile arm-linux kernels, drivers and applications. From our updated Linux-2.6.
High Performance Low Cost Embedded Systems . Step 2: run the command below to add the compiler’s path to system variables: #gedit /root/.bashrc This is to edit the “/root/.bashrc” file. Append line PATH=$PATH:/usr/local/arm/4.3.2/bin” in the opened file, save and exit the file. “export Logout and login the system again (no need to reboot the system, just go to “start”-> “logout”), the above settings will take into effect.
High Performance Low Cost Embedded Systems To configure a 2.95.3 compiler append line “export PATH=$PATH:/usr/loca/arm/2.95.3/bin” in the “/root/.bashrc” file. Logout and login system again, the configurations will be effective, in the command line, type “arm-linux-gcc -v”, you will see the following messages if it is a successful install. - 139 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 5.4 Uncompressing Source Code and Installing Application Utilities This section will introduce how to uncompress all the source code that users may need and install some application utilities including: - Linux-2.6.29 kernel source code - Qtopia source code (for x86 and arm) - Busybox-1.
High Performance Low Cost Embedded Systems (1) Get Linux source code ready In Fedora9, create a temporary director “/tmp/linux” by running the following command #mkdir /tmp/linux Copy all the files in the linux directory in the shipped CD to “/tmp/linux” (2) Uncompress the Linux kernel source code In the work directory /opt/FriendlyARM/mini2440, run the commands below: #cd /opt/FriendlyARM/mini2440 #tar xvzf /tmp/linux/linux-2.6.29-mini2440-20090331.tgz A linux-2.6.
High Performance Low Cost Embedded Systems A busybox-1.13.3 directory will be created, and its source code will extracted into this directory. Note: for the sake of users, we have made a default configuration file: fa.config. (5) Uncompress Linux sample programs In the work directory /opt/FriendlyARM/mini2440, run the commands below: #cd /opt/FriendlyARM/mini2440 #tar xvzf /tmp/linux/examples.tgz An examples directory will be created, all the source code will be extracted into this directory.
High Performance Low Cost Embedded Systems #cd /opt/FriendlyARM/mini2440 #tar xvzf /tmp/linux/mkyaffs2image.tgz –C / Note: C is a capital letter, there is a space after C, C here means to change the uncompress directory. Our previous kernel systems supported the yaffs file system, the current release is using the yaffs2 system, so it needs a different make tool, we call it “mkyaffs2image”. After running the above commands, it will be installed in the /usr/sbin directory, it has contains one file.
High Performance Low Cost Embedded Systems 5.4 Configuring NFS Service If you have installed Fedora9 on your system, all the corresponding NFS components will be installed by default, you can just follow the steps below to setup and configure the NFS service. 5.4.1 Setting up Shared Directories Note: to access a shared directory, you need to follow what were described in 5.4.2 to install the root_qtopia system.
High Performance Low Cost Embedded Systems Select (*) Disabled, and click on the “OK” button to disable the firewall permanently. Now you can start the NFS service: (1) Start and Stop the NFS service Run the command below: #/etc/init.d/nfs start This command will start the NFS service.
High Performance Low Cost Embedded Systems 5.5.3 Booting System via NFS After setting up and running the NFS service, the user can set the NFS as the root file system to boot the board. To boot the system via NFS, the board can fully utilize a “big” hard disk because the user can use the host PC’s hard disk, this trick is widely used in Linux development.
High Performance Low Cost Embedded Systems The third item, in this example “192.168.1.111” is the target board’s gateway IP, The fourth item, in this example “255.255.255.0” is the subnet mask, The fifth item is the board’s machine name (the user can give whatever name he likes) “eth0” is the network adaptor’s name This command is so long that it could be easily typed wrong. In this shipped CD, this command has been written in the “nfs.txt” file for the customer’s convenience. The user can copy it directly.
High Performance Low Cost Embedded Systems - 148 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Chapter 6 Setting up WinCE Development Environment 6.1 Setting up WinCE 5.0 Development Environment 6.1.1 Installing Platform Builder 5.0 (Including 2007 Patches) Note: the Platform Builder 5.0 patches are located in the “\WindowsCE5.0\PB5 Patches 2007\” directory in the shipped CD. The chapter will introduce how to install “Platform Builder 5.0”(abbriated as “PB5”) in WindowsXP. This is a popular tool for developing, configuring and debugging WinCE kernels.
High Performance Low Cost Embedded Systems (2)Locate the “Microsoft Windows CE 5.0.msi.exe” icon in the installation CD and double click on it to start installing PB5: (3)On the installation wizard window, click on the “Next” button: - 150 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (4) On the “License Agreement” window, check “I accept the terms in the license agreement” and go to “Next”: (5)Input the user information and serial number, go to “Next”: - 151 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (6)Select “custom” and go to “Next” (7)Select the destination folder, (in this example, we chose the default one) and go to “Next” - 152 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (8)Select the system platform. Please select the “ARMV4I” option, it would be better to check the “Shared Source for Windows CE 5.0” option as well. Go to “Next”: (9) On the license agreement window, select “I accept the terms in the license agreement” and go to “Next”: - 153 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (10) On the pop up window shown below, click on the “Next” button: (11)Enter the installation interface. This process may take a while - 154 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (12)Finish installation (13)The next step is to install the PB5 patches. They are in the “WindowsCE 5.0\PB5 Patches 2007” directory of the installation CD. Double click on the icon to start installing: - 155 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (14) On the instllation wizard, click on the “Next” button: (15) On the license agreement window, select “I accept the terms in the license agreement” and go to “Next”: - 156 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (16) On the public source code change agreement, select “I accept” and go to “Next”: (17) On the custom setup window, follow the default settings, go to “Next”: - 157 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (18) On the window shown below, click on the “Next” button: (19) Start the installation process. It may take a while: - 158 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (20)If the following pop up window shows up in the process, just click on the “OK” button to advance: (21) Finish installation - 159 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 6.1.2 Installing BSP Note: if the installation CD has a BSP i.e. “WindowsCE5.0\smdk2440”, it will support the following types of LEDs: NEC 3.5-inch touch screen 7-inch touch screen VGA, 1024x768 To make it work for a specific type, the user needs to make corresponding changes in the BSP: 1. Change the LCD_TYPE in the “\smdk2440\INC\s2440.h” file. Locate the following definitions: #define LCD_TYPE_N35 1 //for NEC 3.
High Performance Low Cost Embedded Systems Step2:Start “Platform Builder 5.0”, go to “File” -> “Manage CatalogFeatures” Click on the “Import” button to import the “platform\smdk2440\smdk2440.cec” file. - 161 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Step3:Expand the “Catalog” tree and its subtree “BSPs”, select the “Samsung SMDK2440:ARMV4M” option to complete the installation. 6.1.3 Compiling Kernel (1) Create a “C:\WINCE420\PBWorkspaces\mini2440” directory if it doesn’t exist. Copy the “WindowsCE 5.0\mini2440.pbxml” file into the “C:\WINCE420\PBWorkspaces\mini2440” - 162 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems directory and ucheck its readonly property. (2) Start the PB program and click on “File” -> “Open Workspace…” and select the “mini2440.pbxml” file The screen shot below is the PB’s interface: - 163 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (3) Select “Build OS” -> “Sysgen” to compile, or the user can click on the “ ” icon to compile. This process takes a while. - 164 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (4) After the compilation is done, an “nk.bin” and an “nk.nb0” files will be generated. The “nk.bin”is a release version and the “nk.nb0” is an executable version that can be run in RAM. The “nk.bin” is more often used than the other. Both are located in the “C:\WINCE500\PBWorkspaces\mini2440\RelDir\smdk2440_ARMV4I_Release” directory. - 165 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems In the compiling process, there could be various warnings, usually they don’t cause trouble and can be ignored. 6.1.4 Exporting SDK The compiled kernel can be exported as an SDK installation file which provides developers with platform related header files, libraries and documents. The user can develop platform based applications with Embedded Visual C++ after installing an SDK file. Note: it already contains an SDK file in the “\WindowsCE5.
High Performance Low Cost Embedded Systems (2) On the “Export SDK Wizard” window, click on the “Next” button (3) On the “Prodect Properties” window, fill in the fields with required information, go to “Next” - 167 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (4) On the “Development Language” window, check the languages the user wants the system to support, go to “Next” (5) Finish the setup process, click on the “Finish” button - 168 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (6) Go to “Platform” -> “SDK” -> “Configure SDK…” and a setup window will pop up. The user can set up more configurations here. Click on the “CPU” tab and the following window will come up: (7) Click on the “Edit” button, the window shown below will appear, check the “Samsung smdk2440: ARMV4I_Release” option: - 169 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems (8) Click on the “OK” button to return to the PB5 main menu then select “Platform” -> “SDK” -> “Build SDK…” (9) On the compile wizard window, start compiling an SDK file: - 170 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (10) The compiling process takes several minutes, after it is done, click on the “Done” button: (11) An SDK file will be generated in the directory shown in the following screen shot. - 171 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 6.1.5 Installing Embedded Visual C++ In order to develop API based WinCE applications, the user may need to install EVC and its corresponding SDK. The following are the installation steps: (1) An EVC package is located in the “Embedded Visual C++\” directory. Double click on the “setup.exe” program to start the installation process - 172 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems (2) On the installation wizard window, click on the “Next” button (3) On the license agreement window, select “I accept the agreement” and then go to “Next” - 173 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (4) Input the serial number and the user information, and go to “Next” (5) Select components. Follow the default setting and go to “Next” - 174 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (6) Choose the destination folder. Follow the default setting and go to “Next” (7) On the pop up window shown below, select “Yes” - 175 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (8) Start installing the EVC manager, the following window will pop up, wait till it is done. (9) After this installation is done, click on the “OK” button (10) On the pop up window shown below, click on the “Continue” button (11) Click on “OK” on the window shown below - 176 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (12) Select required components and the destination folder. Follow the default setting and go to “Next” (13) Start the installation process - 177 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (14) After the installation is done, click on the “OK” button Note: if the user now clicks on “Start” -> “Programs” -> “Microsoft eMbedded Visual C++ 4.0” -> “eMbedded Visual C++ 4.0”, it may not start successfully. The following window might show up. The user needs install an SDK file to run it. The next section will introduce such an installation procedure. 6.1.
High Performance Low Cost Embedded Systems (1) Double click on the SP4’s “setup” icon, on the wizard, click on “Next” (2) On the license agreement window, choose “I accept” and go to “Next” - 179 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (3) Ready to install SP4, go to “Next” (4) Start the installation process - 180 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (5) Done with the installation (6) It is time to install the SDK file that was exported in the last section. The user can export an SDK file by himself or use the one in the installation CD (located in the “WindowsCE5.0\SDK”, named “QQ2440_SDK.msi.exe”). Double click on the exported file and a wizard window will come up. Click on the “Next” button. - 181 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.
High Performance Low Cost Embedded Systems (7) On the window shown below, click on “Close” (8) On the license agreement window, select “Accpet” and go to “Next” - 182 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (9) On the “Customer Information” window, type corresponding information and go to “Next” (10) On the setup window, type the user information and click on the “Complete” button - 183 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (11) On the destination folder window, follow the default setting, go to “Next” (12) On the ready to install dialog, click on “Install” - 184 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (13) Start the installation process (14) After the installation is done, click on “Finish” - 185 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Now, the user can go to “Start” -> “Programs” -> “Microsoft eMbedded Visual C++ 4.0” -> “eMbedded Visual C++ 4.0”, and open the EVC main window - 186 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 6.1.7 Configuring WinCE Kernel This section will introduce a procedure to configure a WinCE kernel (1) Start PB5, go to “File” -> “New Platform…” and on the pop up window click on “Next” (2) On the project setup window, type “my2440”, go to “Next” (3) check the preferred BDP, (here we chose “2440”) and go to “Next” - 187 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems (4) On the design template window, choose a user preferred template (in this example, we chose “Mobile Handheld”) and go to “Next” (5) On the application configuration window, the user should check the “Standard SDK for Windows CE” box and then go to “Next” - 188 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (6) On the network configuration window, follow the default setting and go to “Next” (7) On the window shown below, directly go to “Next” - 189 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (8) On the window shown below, click on “Finish” (9) Go back to the PB5 main window, a new project has been created, the following steps show how to configure the compilation options - 190 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (10) Go to “Platform” -> “Setting…” to open a project configuration window - 191 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (11) On the setup window, click on the “Locale” tab to set up the kernel language, here we chose the simplified Chinese. - 192 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (12) Click on the “Build Options” tab, uncheck the “Enable CE Target Control Support” and the “Enable KITL”, keep the other options as what they are and click on “OK” - 193 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (13) Add support for a USB mouse and keyboard, expand the “Catalog” tree, the “Core OS” subtree -> “Windows CE device” -> “Core OS Services” -> “USB Host Support” -> “USB Human Input Device(HID) Class Driver”, right click on “Add to OS Design” to check “USB HID Keyboard and Mouse” shown as below - 194 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (14) Go through the same procedure to enable the support for USB storage devices - 195 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (15) Add support for file systems. Go to “Core OS” -> “File Systems and Data Store” -> “File System – Internal (Choose I)” -> “RAM and ROM File System”, to enable the support for the FAT32 system, the user needs to check “FAT File System” shown below (16) Add support for registry storage, go to “Core OS” -> “File Systems and Data Store” -> “Registry Storage (Choose I)” -> “Hive-based Registry” - 196 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems (17) Change the default IP. Open the “platform.reg” file and locate the items red depicted in the screen shot below. The user can change the default IP, gateway and DNS settings. - 197 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (18) Change the background. Copy a bmp file “C:\WINCE500\Platform\SMDK2440\Files” directory, and name it “bliss.bmp” to the Open the “platform.bib” file, add “bliss.bmp” in the “FILES” section - 198 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (19) Save the changes. Go to “File” -> “Save” to save the changes. Go to “Build OS” -> “Sysgen” or click on the icon to compile the kernel: - 199 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems For more details on how to configure a customized kernel, the user can search the internet for more information. - 200 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Chapter 7 System Backup and Reinstallation 7.1 System Backup and Reinstall 7.1.1 System Backup Note: this section assumes the system has already been installed a USB driver and boots from Nor Flash. The backup procedure will not hurt any flash data. Before backup, please check whether the system can run normally. (1) Connect the MINI2440 board to a host PC via a serial cable.
High Performance Low Cost Embedded Systems (3) Start the DNW application. Connect the board to the PC via a USB cable. If the DNW’s title bar shows “USB:OK”, it indicates the USB connection is a success. Go to “USB Port” -> “Backup NandFlash to File” On the pop up window shown below, pick up a destination folder and name a file that will store the data. In this example, we saved the data in a “backup.bin” file - 202 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems The backup process begins: After it is done, the DNW window will show the information below - 203 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems In this example, the generated file was 66M bytes. It contained all the information of Nand Flash, for more details about Nand Flash, please refer to its data file. - 204 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 7.1.2 System Restore Note: this section assumes the system has already been installed a USB driver and boots from Nor Flash. Make sure you have a backup file ready.
High Performance Low Cost Embedded Systems (3) Start the DNW application, connect the board to the host PC via a USB cable. If the DNW’s title bar shows “USB:OK”, it indicates the USB connection is a success. Go to “USB Port” -> “Transmit/Restore” Select a backup file and click on “Open” - 206 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems After the process is done, switch the boot mode to the Nand Flash side, and reset or power on the board. - 207 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 7.2 Installing Linux 7.2.1 Partition Note: partitioning will delete all the data in Nand Flash (1) Connect the MINI2440 board to a host PC, open a super terminal, power up the board and enter the BIOS main menu (2) Select item [x] to start partitioning the Nand Flash Note: in this process, some Nand Flash might report bad data sections but this doesn’t matter. - 208 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems 7.2.2 Installing Bootloader (1) Start the DNW application, connect the MINI2440 board to a host PC via a USB cable. If the DNW’s title bar shows “USB:OK”, it indicates that the USB connection is a success. Select item [v] to start downloading a supervivi - 209 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (2) Go to “USB Port” -> “Transmit/Restore”, select a supervivi (it is in the “images/linux/” directory) file (3) Once the download is finished, BIOS will automatically write this supervivi to Nand Flash’s corresponding section and return to the main menu - 210 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 7.2.3 Installing Linux Kernel (1) In the BIOS main menu, select item [k] to download a Linux kernel zImage (2) Go to “USB Port” -> “Transmit”, select a zImage file (it is in the “images/linux/” directory) and begin to download In the shipped CD: zImage_n35 – for NEC 3.5 LCD zImage_a70 – for 7-inch true color touch screen,800x480 zImage_VGA1024x768 – for VGA , 1024x768 For other cases please refer to the “readme.
High Performance Low Cost Embedded Systems (3) Once the download is finished, BIOS will automatically write the kernel in Nand Flash’s corresponding section and return to the main menu 7.2.4 Installing Root File System (1) In the BIOS main menu select item [y] to start downloading a yaffs root file system image (2) Go to “USB Port” -> “Transmit/Restore”, select a file system image file and start to download. In this example, we chose the root_default.
High Performance Low Cost Embedded Systems In the shipped CD: root_default.img - default image file, based on the arm-linux-gcc-3.4.1 library root_mizi.img - provided by mizi, it has Chinese hand writing recognizing and browsing functions root_qtopia_mouse.img - standard qtopia, mouse supported, based on arm-linux-gcc-3.4.1 library root_qtopia_tp.img - standard qtopia, touch screen supported, based on arm-linux-gcc-3.4.1 library For other cases, please refer to the readme.
High Performance Low Cost Embedded Systems Note: the process takes at least 2 to 3 minutes, the bigger the file is, the longer it takes After the download is done, please disconnect the USB connection, otherwise it could cause system crash on reset or power-on. In the BIOS main menu, select item [b] to reboot the board If the boot mode is switched to the Nand Flash side, the system will automatically boot on power on 7.3 Installing WinCE 7.3.
High Performance Low Cost Embedded Systems (2) Select item [x] to start partitioning Nand Flash Note: in this process, some Nand Flash might report bad data sections but this doesn’t matter. - 215 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems 7.3.2 Installing Bootloader The MINI2440 system has two bootloaders for WinCE: supervivi and nboot.bin, their differences are listed in the table below: supervivi Nboot Image location \images\wince5.0 \images\wince5.0 Source code No WindowsCE5.0\NBOOT location Project file No Nboot.mcp Compiler Arm-linux-gcc ADS1.
(3) After the download is done, BIOS will automatically write to Nand Flash’s corresponding section and return to the main menu 7.3.3 Installing Eboot Note: Eboot is only for writing an “nk.bin” (1) In the BIOS main menu, select item [e] to start downloading an Eboot (2) Go to “USB Port” -> “Transmit/Restore”, select the Eboot_2440.nb0 file. - 217 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (3) After the download is done, BIOS will automatically write this eboot to Nand Flash’s corresponding section and return to the main menu 7.3.4 Installing WinCE Kernel (1) In the BIOS main menu, select item [w] to stard downloading a WinCE kernel - 218 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems (2) Go to “USB Port” -> “Transmit/Restore”, select a kernel image file, in this example we chose an NK.bin file (It is located in the “\images\wince5.0” directory in the installation CD) and start downloading In the shipped WinCE CD NK_N35.bin – for NEC 3.5" LCD NK_A70.bin – for 7-inch true color screen NK_VGA1024x768.bin – for VGA, 1024x768 For other cases, please refer to the readme.txt in the “images/wince5.
High Performance Low Cost Embedded Systems (3) After the kernel has been burned to Nand Flash, WINCE will auto run as below - 220 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems - 221 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Appendix A: Resources in Shipped CD (1) SJF2440 flash burning tool for Windows (2) JFLASH-2440 flash burning tool for Linux, source code included (3) Serial Port utilities: CRT and DNW (4) Utility to translate an image file to a C language array. (5) USB driver for WindowXP/2000 (6) VIVI source code: bootloader for Linux (7) Independent LED test utility (including ADS1.20 project file) (8) 2440test utility (including ADS1.20 project file and source code).
High Performance Low Cost Embedded Systems Appendix B: Schematics and Device Details Board Schematic - 223 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Address Space The left drawing is the memory allocation diagram when the system is set to the Nor Flash boot mode with nGCS0 being set. The right drawing is the memory allocation diagram when the system is set to the Nand Flash boot mode.
High Performance Low Cost Embedded Systems SDRAM The mini2440 has two 32M bytes (64M bytes in total) SDRAMs (HY57V561620FTP), commonly known as memory. They are deployed in parallel to form a 32-bit data bus which speeds up data transmission. To work this way, both use nGCS6. According to section 5-2 of the CPU manual this configuration implies their physical addresses start at 0x30000000. The following SDRAM diagram is extracted from the mini2440 schematic.
High Performance Low Cost Embedded Systems FLASH The mini2440 is equipped with two types of Flash: one Nor Flash of type SST39VF1601, 2M bytes memory, and one Nand Flash of type K9F1208, 64M bytes memory. The S3C2440 supports system boot from either Flash. You can boot systems from either the Nor or the Nand flash by toggling the S2 switch. In fact most systems only have a Nand Flash. For the sake of users especially developers we add a Nor Flash, that way, you can have more control over the system.
High Performance Low Cost Embedded Systems Power System The mini2440’s power system is simple. It should be connected to an external 5V power supply, and utilizes a voltage step-down chip to generate three kinds of voltages: 3.3V, 1.8V and 1.25V. This system is not for hand-held devices, therefore it does not have a full-featured power management circuit. The system is turned on or off by toggling switch S1. It is not under software control. - 227 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems You can connect the mini2440 to other power supplies too. The mini2440 has a power inlet CON8, which is a white 2.0mm single row connector. 5V is applied to both ends and ground to the middle. One end can be connected to an external 5V power supply, and the other can be connected to a 5V power supply by toggling switch S1. - 228 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.
High Performance Low Cost Embedded Systems The diagram is presented below: - 229 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Reset System The mini2440 utilizes a microprocessor supervisory circuit MAX811 to reset its CPU: - 230 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems User LED A LED is commonly used as a status indicator. The mini2440 has 4 user programmable LEDs which are directly connected to GPIO. The LEDs will be on at a low level voltage. Detailed information is as follows: GPIO Multiplexing Name in the schematic LED1 GPB5 nXBACK nLED_1 LED2 GPB6 nXREQ nLED_2 LED3 GPB7 nXDACK1 nLED_3 LED4 GPB8 nDREQ1 nLED_4 - 231 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.
High Performance Low Cost Embedded Systems User Test Keys The mini2440 has 6 test keys. They all are CPU interrupt input signals and will be triggered at a low level voltage. They can also be multiplexed to GPIO and other function interfaces. To multiplex them users can extend them through CON12.
High Performance Low Cost Embedded Systems A/D Input Test The mini2440 has 4 A/D conversion channels. They reside on the CON4-GPIO interface (please refer to the GPIO introduction). AIN0 is connected to the adjustable resistor W1, the schematic is shown below: - 233 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems PWM Buzzer The on-board SPEAKER is controlled by PWM, the diagram is shown below. GPB0 can be set to PWM output via software control. - 234 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Serial Port The S3C2440 has three serial ports: UART0, 1 and 2. UART0 can be used in conjunction with UART1 as a full functioned serial port. In most applications, we only need very simple features of these three serial ports,(the Linux and WinCE drivers that are shipped with our system are set this way by default), i e. TXD and RXD. They correspond to CON1, CON2 and CON3 which are all TTL levels.
High Performance Low Cost Embedded Systems USB Interface The mini2440 has two USB ports: USB Host and USB Slave. The USB Host is the same as a USB port in a PC and can be directly connected to and works with a USB camera, USB keyboard, USB mouse, USB drive and other USB devices. The USB Slave is used to download programs to a target board. When the board is running WinCE, it can synchronize with Windows through ActiveSync.
High Performance Low Cost Embedded Systems LCD Interface The mini2440’s LCD interface is a 41-pin 0.5mm white connector. It has what a common LCD needs: control signals (line scan, clock, enable / disable) and complete RGB signals (RGB output is 8:8:8 and supports maximum 16000k color LCD). For test purposes, it has a PWM output (GPB1 can be configured as PWM) and a reset signal (nRESET). The LCD_PWR is the backlight control signal.
High Performance Low Cost Embedded Systems - 238 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems EEPROM The mini2440 has a EEPROM AT24C08 connected to CPU’s I2C. It has 256 bytes memory and is mainly for testing I2C bus. - 239 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave. SW PMB#108, Cullman, AL 35055 Website : www.microarmsystems.com Email: service@microarmsystems.
High Performance Low Cost Embedded Systems Network Interface The mini2440 incorporates the DM9000 chip and can communicate with 10/100M networks. The RJ45 connector includes coupling filters and does not need transformers. With a common network cable, you can connect a router or switch to the mini2440. Notes: all our mini2440 boards have the same MAC address, which can be set via software. For Linux users, please refer to section 3.1.1 of this user’s manual.
High Performance Low Cost Embedded Systems Audio Interface The S3C2440 has an I2S bus interface, it can be connected to an external 8/16 bit stereo CODEC. The mini2440 uses the I2S based UDA1341 chip to implement audio decode/encode system. This chip’s registers’ setting and initialization are controlled by the L3-bus. Here we adopted SAMSUNG’s design by using CPU’s GPB2, GPB3 and GPB4 to simulate the L3-Bus’s standard L3MODE, L3DATA, L3CLOCK. After they initialize the UDA1341 they will be idle.
High Performance Low Cost Embedded Systems JTAG Interface When a development board just comes off from production lines, it is just a bare board without any data. We will burn the first program to it through the JTAG interface, which is SUPERVIVI. With SUPERVIVI, we can download more programs and utilities to the board via USB further. In addition, the JTAG is more often used for debugging.
High Performance Low Cost Embedded Systems GPIO GPIO is the abbreviated form of General Purpose Input Output. The mini2440 has a 34 Pin 2.0mm GPIO interface, i.e. CON4. In fact, CON4 has not only quite a few GPIO pins but also some CPU pins such as AD0-AIN3, CLKOUT and so on. The SPI interface, I2C interface, GPB0 interface and GPB1 in the schematic are all GPIO, but they are marked as special function interfaces. They can be configured for other purposes too by setting related CPU registers.
31 33 High Performance Low Cost Embedded Systems GPB0 TOUT0/GPB0 32 GPB1 TOUT1/GPB1 CLKOUT0 CLKOUT0/GPH9 34 CLKOUT1 CLKOUT1/GPH10 CMOS Camera Interface The S3C2440 has a CMOS camera interface. It is marked as CAMERA on the schematic. It is a 20 pin 2.0mm connector, users can directly use the CAM130 module we provide. The CAM130 module does not have any circuits. It is basically just a converter and directly connects to a ZT130G2 camera module. Notes: the camera interface is a multiplexed port.
19 High Performance Low Cost Embedded Systems VDD18V 1.8V Power 20 GND GND System Bus The system bus is CON5. It contains 16 data lines (D0-D15), 8 address lines (A0-A6, A24), and some control signal lines (such as chip select, read/write, reset and so on). CON5 can provide 5V output. In fact very few users would extend interfaces through system bus. Below is the detailed information about CON5’s pins. - 245 Copy right reserved © MicroArm Systems, Inc. 1612 2nd Ave.
High Performance Low Cost Embedded Systems CON5 1 Name VDD5V 3 5 7 EINT17 EINT3 nGCS1 9 nGCS3 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 LnOE nWAIT nXDACK0 LADDR0 LADDR2 LADDR4 LADDR6 LDATA0 LDATA2 LDATA4 LDATA6 LDATA8 LDATA10 LDATA12 LDATA14 Notes 5V Power (Input or Output) Interrupt 17 (Input) Interrupt 3 (Input) Chip Select 1 Physical Address: 0x08000000 Chip Select 3 Physical Address: 0x18000000 Read Enable Signal Wait Signal nXDACK0 Address 0 Address 2 Address 4 Address 6 Data Line 0 Data Li