Colibri VF50/VF61 WinCE Bring-up
Introduction
This page describes how to bring-up a module which has no Windows Embedded Compact (WEC) running. If the module is able to boot into WinCE BSP V1.2 or newer you can just use the Update Tool instead of following the instructions below.
The image has been tested on Toradex Evaluation Board V3.1 and V3.2. These are the recommended platforms for initial testing and development on the Vybrid. Additional testing has been performed on the Iris board. Using recovery mode on the Iris board requires an adapter to access the debug serial port as described here Iris Carrier Board Peripherals.
Module Update Procedure
Setup SD card
To prepare the SD card, download the WinCe Image Package from the following page:
Once you got the ZIP file, proceed with the following steps:
Extract the content of the zip file on your PC.
Make sure you have an SD Card ready which was formatted using the FAT32 filesystem.
Copy the following files to the root folder of the SD card
eboot.img
nk6.bin
(Windows CE 6.0 R3)nk7.bin
(Windows Embedded Compact 7)nk8.bin
(Windows Embedded Compact 2013)
Some SD card may not work because of the way they are structured. On that SD card, we need to restore https://docs.toradex.com/103544-vybrid-recovery-image.img and replace the files from the latest package to make SD card work.
Setup UART connection
To flash the bootloader we need to connect the Colibri module to a terminal program on the PC (e.g. TeraTerm or putty) using an RS232 connection.
The Colibri Evaluation Board V3.1 / V3.2 has a built-in RS232-to-USB converter, therefore the connection to the terminal program can be made through a regular USB cable.
On the Colibri Evaluation Board, there are two options to connect to the PC's terminal program:
- Connect a USB cable to the X27 (RS232) connector.
Verify that the JP17 and JP19 are in the USB position. - Connect a Null-Modem cable to the X25 (UART-A) connector.
Verify that the JP17 and JP19 are in the non-USB position.
Open your favorite terminal application and configure the serial port as 115200, 8N1:
- 115'200bps
- 8 data bits
- 1 stop bit
- no parity
Flashing the Bootloader
Flashing the Bootloader From EBoot
Make sure you have connected the SD Card and the PC terminal program as described above.
Power-on the system. You'll see the e-boot welcome message on the Terminal:
Toradex Bootloader 1.5 for Vybrid Built Dec 18 2017
CPU : 500 Mhz
Flash: 512 MB
RAM : 256 MB
Colibri VF61 module version 1.2A Serial No.: 19388
Press [SPACE] to enter Bootloader Menu
Initiating image launch in 0 seconds.Press SPACE in the terminal program to terminate the automatic boot sequence.
Press c to clear the registry
Clear Registry is mandatory command when updating different WinCE version images. If skipping this command would cause module may not boot or filesystem problem may occur
Press x to enter the command prompt.
Write Eboot to the flash memory
flashloader Bootloader image size: 262144 bytes.
Loading done. Flashing bootloader. Writing 128 sector(s) of bootloader code from sector 64.
Erasing block 1 ................................................................ Erasing block 2 ................................................................ Erasing block 3 . Flashing completed.
Flashing the Bootloader From U-Boot
Make sure you have connected the SD Card and the PC terminal program as described above.
Power-on the system. You'll see the U-Boot welcome message on the Terminal
Press SPACE in the terminal program to terminate the automatic boot sequence.
Enter the following commands to read the latest E-boot version of the module's RAM:
Colibri VF61 # mmc rescan
Colibri VF61 # mmc list
FSL_SDHC: 0
Colibri VF61 # mmc dev 0
mmc0 is current device
Colibri VFxx # fatload mmc 0:1 ${loadaddr} eboot.img
reading eboot.img
262144 bytes read in 68 ms (3.7 MiB/s)Erase the flash memory and write the bootloader
Colibri VFxx # nand erase.part u-boot
NAND erase.part: device 0 offset 0x20000, size 0x160000
Erasing at 0x160000 -- 100% complete.
OK
Colibri VFxx # nand write ${loadaddr} u-boot 0x80000
NAND write: device 0 offset 0x20000, size 0x80000
524288 bytes written: OK
Flashing the Bootloader On Non booting modules
Early sample versions of the Colibri VF50/VF61 were shipped without fusing. Such modules require a different recovery method described here.
Follow the steps described in this document: VFxx Recovery Mode to run Eboot from recovery mode.
Make sure you have connected the SD Card and the PC terminal program as described above.
Power on the system. You will see a message printed out every second that asks to press space to access serial console:
Press [SPACE] to enter boot console.
Press SPACE
At this point you'll see the e-boot welcome message (part of it may be missing due to some delay opening the serial console on your PC):
Toradex Bootloader 1.5 for Vybrid Built Dec 18 2017
FCB is not valid!
FCB sector is not empty, restore failed!
Config block is empty, restoring it using static config block data.
Invalid temp static config block checksum on byte 0
Error restoring config block.
Boot console, use the "exit" command to return to boot menu.
Write Eboot to the flash memory
>flashloader
Bootloader image size: 262144 bytes.
Loading done.
Flashing bootloader.
Writing 128 sector(s) of bootloader code from sector 64.
Erasing block 1
................................................................
Erasing block 2
................................................................
Erasing block 3
.
Flashing completed.
Flashing the OS
This step is valid for all the version of VF50 and VF61 modules and must be performed to store a Windows CE image on the NAND flash.
Power on or reset your module.
It will boot the latest release of e-boot you flashed with one of the options described above in this article.Toradex Bootloader 1.5 for Vybrid Built Dec 18 2017
CPU : 500 Mhz
Flash: 512 MB
RAM : 256 MB
Colibri VF61 module version 1.2A Serial No.: 19388
Press [SPACE] to enter Bootloader MenuPress space to stop the automatic boot process
Press C to clear the registry.
The new image contains additional drivers and features and not cleaning the registry may prevent them from working. After registry cleanup you may need to reconfigure your display resolution, network setting and save them again.
Press X to enter command prompt mode.
Write the OS image from the SD card to the NAND Flash.
Specify nk6.bin to flash the CE6 image, nk7.bin to flash the Windows Embedded Compact 7 image or nk8.bin to flash Windows Embedded Compact 2013.>flashimage nk6.bin
Image base address 80000000 - size: 19898196 bytes.
......[...]....
Loading done.
.......[...]....
Writing Completed.
Finding bootargs block...
Writing 2 sector(s) of bootargs data from sector 64.
Done.
Flashing completed.The image-flashing process requires a few minutes.
You have to erase the area used for the filesystem, to prepare it for a new filesystem. This must be done if you are installing Windows CE on the module for the first time or if you are switching from Linux to Windows CE or from a Windows CE release (ex: 6.0 R3) to a different one. If you are just updating your module with a new release of the same Windows CE version you can skip this step and keep the contents of your flash filesystem untouched.
>eraseflash filesystem
Are you sure you want to erase flash(0x4020000-0x1FFFFFFF)?y
Erasing 3583 flash blocks from 513.
....[...]............ donedangerEraseFlash Filesystem is mandatory command when updating different WinCE version images. If skipping this command would cause module may not boot or filesystem problem may occur
Now you can configure the system for booting from flash instead of downloading the image at boot.
>set boot.dl 0
>save boot
Finding bootargs block...
Writing 2 sector(s) of bootargs data from sector 64.By default you have 30'' to stop boot and enter the bootloader menu by pressing space on the boot console. You can reduce this time by setting the boot.delay parameter as in this sample:
>set boot.delay 2
>save boot
Finding bootargs block...
Writing 2 sector(s) of bootargs data from sector 64.
Reset your device and see it booting to the Windows CE desktop (configured as VGA 640x480).
This is the serial output of a successful Windows CE boot.Toradex Bootloader 1.5 for Vybrid Built Dec 18 2017
CPU : 500 Mhz
Flash: 512 MB
RAM : 256 MB
Colibri VF61 module version 1.2A Serial No.: 19388
Press [SPACE] to enter Bootloader Menu
Initiating image launch in 0 seconds.
Loading OS Image
...............................................................................................................................................
Done.
OEMLaunch 80004000
Windows CE Kernel for ARM (Thumb Enabled) Built on Mar 8 2013 at 17:05:33
Toradex Windows CE 6.0 1.5 for Vybrid Built Dec 18 201Verify that you see no error messages, as described in the FCB and Factory Information chapter.
You may see a message that signals that the driver for UART1 was not loaded because the port is currently used for debug messages.
To disable debug messages from the operating system, enter the command prompt mode in the bootloader and type:>set ser.keep 0
>save ser
Finding bootargs block...
Writing 2 sector(s) of bootargs data from sector 64.
- You'll see the following message on the serial console:
Registry - error retrieving registry blocks. This just means that there is no saved registry and the device will use default boot configuration, it will disappear as soon as you save the registry.
FCB and Factory Information
On a successful boot the bootloader outputs the following messages on a serial terminal:
Toradex Bootloader 1.5 for Vybrid Built Dec 18 2017
CPU : 500 Mhz
Flash: 512 MB
RAM : 256 MB
Colibri VF61 module version 1.1B Serial No.: 4835805
Press [SPACE] to enter Bootloader Menu
If you see messages about invalid FCB or invalid static config block or the module type/version number you see don't match what is printed on the sticker attached to your module you can use the following procedure to restore your modules' factory configuration. Having invalid FCB or an invalid static configuration block will force the boot delay time to 30'' to give you a chance to access the serial console and fix the issue.
We must erase the first block of flash:
>eraseflash 0 128kb
Are you sure you want to erase flash(0x0-0x1FFFF)?y
Erasing 1 flash blocks from 0.
. done.Then we have to write the BCB:
>writebcb
Writing FCB...
Checking FCB...
System is ready to boot.
Use flashloader to write a bootloader before you reset the device.The boot block contains also some device-specific ids. We need to restore them.
Each module has a sticker with this information in the following format:
Col type
V version
serial
Type the restorefactoryinfo command using the information on your module's sticker:>restorefactoryinfo *modulecode* *serial* *ver*
The modulecode parameter has four valid values: VF50128, VF50128IT, VF61256, and VF61256IT. Example:
>restorefactoryinfo VF61256 04790168 1.0B
Restoring U-Boot from EBOOT
Starting from release 0.3 the eboot bootloader provides a command to restore the u-boot bootloader on the NAND flash, allowing you to restore Linux on your module.
Linux can be installed by booting the Evaluation Board using an SD card or recovery mode, as described in the image flashing document for the Linux BSP.
Prepare an SD card that contains the u-boot image (u-boot-nand.imx, you can download latest Linux image here: https://developer.toradex.com/software/linux/linux-software#Binary_Images)
Power on your module, stop the boot process by pressing space and enter the command prompt pressing X.
Write U-Boot to the NAND flash:
>flashloader u-boot-nand.imx
Bootloader image size: 311960 bytes.
Loading done.
Flashing bootloader.
Writing 153 sector(s) of bootloader code from sector 256.
Erasing block 4
................................................................
Erasing block 5
................................................................
Erasing block 6
..........................
Flashing completed.You'll need to reboot and following instructions provided in the Linux BSP to restore the kernel and filesystem images.
Additional Resources
We created and collected many useful resources that can be used for the development with Colibri VF50/VF61 modules: