Search by Tags

iMX6 WinCE Bring-up

 
Applicable for

Tags

Article updated at 25 May 2022
Compare with Revision




Disclaimer

The image runs on all Apalis and Colibri iMX6 modules. The image has been tested using the Apalis and Colibri Evaluation Boards, those are the suggested platforms for experimenting with the image.

Use Toradex Easy Installer

Using the Toradex Easy Installer is the recommended way to install Windows Embedded Compact images onto any Colibri iMX6 or Apalis iMX6 module. Only WinCe release V1.2b2 and newer are supported by the Easy Installer.

For using the Easy Installer, make sure you activate the boot partition. All other information in this article is not relevant for you.

Side Notes:

  • The WinCe image V1.3b2 image may take more than five minutes for the first boot, and it will not mount the \FlashDisk folder. This is a know issue (#31253) and there are two applicable workarounds.

  • To update to image V1.3b4 using the Update Tool you'll need to use the update tool V7.6.0 or newer, because the format of compressed images has been changed. Make sure to update both the image and the bootloader without a reboot inbetween.

Prepare SD card

  1. Download the image
    Windows Embedded Compact image for the iMX6 modules (including Windows Embedded Compact 7 and Windows Embedded Compact 2013) can be downloaded here.

  2. Write the image on an SD card
    The SD card must be at least 1GB. The image can be written using the Win32 Disk Imager tool.

    • download the tool here: http://sourceforge.net/projects/win32diskimager/
    • launch it and select the eboot.imx file contained in the zip you downloaded. If you plan to use rev.1.2 and the new SPL bootloader you'll have to select eboot-colibri.img or eboot-apalis.img, depending on the module format you are using.
  • select the drive letter matching your SD card reader in the “Device” box (be careful, the devices are not filtered and you may overwrite a regular hard drive by mistake!)
  • select “write” and wait until the write process is completed
  • remove and re-insert the SD card, your PC will ask you to format it
  • format the card and copy eboot.imx, nk7.nbx and nk8.nbx to the card (check that those files are not read-only)

Update existing image

If you are already running at least the 1.0beta6 image you may use update tool to update the existing image. If a bootloader is provided in the download package you must update both the image and the bootloader (this require two separate operations in the update tool) before rebooting your device. If you are running 1.0beta6 there is an issue with the update tool version that is included in the image, so you should run the updatetool version included in the 1.0 image download (there are two executables, updatetool_ce7.exe for Windows Embedded Compact 7 and updatetool_ce8 for Windows Embedded Compact 2013). We also sometime experiences some issues with USB devices when the system is rebooted using the coldboot option of update tool, an hardware reset is recommended to avoid those problems. If you are updating to version 1.1beta2 please consider that the "output enabling polarity" (oep) parameter of the display configuration has been changed to match the behaviour it has on our other modules. This means that you should change its value from 0 to 1 or viceversa to keep the display working if you rely on this signal. If you are using default display configuration you can just clean the registry to keep default behaviour. If you are updating to version 1.1beta4 please consider that you need to clear registry or to change those registry entries to be able to access flashdisk and sd card

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\USDHC1]
    "Dll"="usdhc1.dll"
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\USDHC2]
    "Dll"="usdhc2.dll"
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\USDHC3]
    "Dll"="usdhc3.dll"
If you plan to move to release 1.2 or newer using the new bootloader you'll have to update both SPL and eboot before rebooting your devices. They appear as two separate file types (SPL and SPL bootloader) in update tool. For future updates you will be able to just update the SPL bootloader unless otherwise specified.

Enter recovery mode

Warning: Make sure there is no SD card inserted in the carrier board in order to enter recovery mode properly

If you already updated your bootloader and image using the update tool you don't need to use recovery mode or perform an update from the bootloader, so you can skip the next chapters. Recovery mode is needed only if your module is currently booting Linux or not booting at all. If you already installed a previous version of Windows CE you can jump to the "Flashing or updating bootloader" section.

Open a terminal application with 115200 baud, no parity, 1 stop bit and no flow control on your PC. Follow the iMX Recovery Mode article for instructions on how to enter recovery mode. Check that nothing has been written on the serial console. If you see some message this means that you did not do it correctly.

  • Open a MS-dos command prompt and navigate to the recovery sub-folder of the zipfile contents.
  • Launch imx6recovery.bat

    D:\work\releases\i.MX6\1.0B1\zipfile\recovery>imx6recovery.bat

    If you plan to update to rev. 1.2 and use the SPL bootloader you have to use imx6recoveryfull.bat instead.
    The expected output is:

    D:\work\releases\i.MX6\1.0B1\zipfile\recovery>sb_loader -trans 0x00907000 -f XLD
    
    R_RECOVERY.imx
    Found USB#VID_15A2&PID_0061#6&1A093338&0&3.
    Succeeded to download XLDR_RECOVERY.imx to the device.
    
    D:\work\releases\i.MX6\1.0B1\zipfile\recovery>sb_loader -exec 0x00909020
    Found USB#VID_15A2&PID_0061#6&1A093338&0&3.
    Jump to RAM successfully.
    
  1. On the serial port, you should see bootloader's first messages.

    Plug a bootable SD card in SD slot 0 and press [space]
    
  2. Insert the sd card in the slot (on the Apalis EVB you have to use the slot close to the DVI connector) and press space.


  3. The system will flash bootloader and ask you to power up and down the board

    Colibri iMX6 DualLite 512MB IT
    Version: 00000001 .00000000
    Flashing ............
    

    [...]

    ...
    Preparing board-specific DCD.
    ........
    Flashing completed.
    Power cycle your board to boot from eMMC and continue with module setup.
    

Flashing or updating bootloader

Before you can boot the image you need to update the eboot bootloader. To do that just power on your board with a serial terminal connected to it and press "space" to stop automated boot process.

    Toradex Bootloader 1.0 for Colibri Built Sept 30 2015
    Board: Apalis iMX6 Quad 2GB IT
    CPU is running at 792000MHz.
    Loading EBoot configuration...
    16 sectors of configuration data loaded.

    Press [SPACE] to enter Bootloader Menu

    Initiating image launch in 2 seconds.

    BootLoader Configuration:

    C) Clear Flash Registry
    X) Enter CommandPrompt Mode
    D) Download image to RAM now
    F) Download image to FLASH now
    L) Launch existing flash resident image now

    Enter your selection:

Press 'x' to enter the bootloader console and type the following command. If you are running bootloader version 1.0beta5 or earlier

on Colibri:

>flashloader 0 2

    Loading done.
    Flashing loader.
    Loader flashed successfully, reboot to run the new loader.

on Apalis:

>flashloader 1 2

    Loading done.
    Flashing loader.
    Loader flashed successfully, reboot to run the new loader.

If you are running bootloader version 1.0beta6 or newer on Colibri:

>flashloader 0

    Loading done.
    Flashing loader.
    Loader flashed successfully, reboot to run the new loader.

on Apalis:

>flashloader 1

    Loading done.
    Flashing loader.
    Loader flashed successfully, reboot to run the new loader.

If you want to update to rev. 1.2 you'll have to add "spl" at the end of flashloader command. for example:

>flashloader 0/1 eboot.spl spl

Booloader release 1.2b4 or newer will automatically recognize a file in the SPL format and flash it in the correct way, without the additional parameter. Now you can reboot your device and proceed with image flashing. You can power-cycle your board, use the reset button or type:

>reboot

on the command prompt. Since 1.0beta6 the flashloader command will no longer require the destination SD index, it will always write the loader on the internal eMMC, so the second parameter is no longer required. Typing "flashloader" with no arguments will show you the syntax supported by the current version of bootloader. The same applies to the flashimage command, used in the flashing image section.

Activate boot partition

We suggest activating boot partition if you plan to use version 1.2 of our BSPs and images. This is a reversible operation, so you may de-activate it if you plan to revert to an old image. The boot partition is used to store the bootloader and the config block. It's accessed during boot and then protected from accidental accesses during the runtime, this will prevent damages to the bootloader if something corrupts the data on the user (larger) partition of the eMMC. Old images of Windows CE and Linux did not take advantage of the boot partition available on the eMMC. Since version 1.0beta6 is possible to use the eMMC boot partition. Bootloader and OS will recognize the partion used and work appropriately. To switch to the new eMMC partioning mode type the following command on the boot console:

>usebootpartition true

You will get the following output

    Copy of initialization data.
    ..............Copy of factory info - 8191.

    done.
    Remember to use flashloader command to be able to boot your module.
    Configuration settings will be reset to factory default, you should re-apply any modification you made.

After enabling usage of the boot partition you'll need to re-flash the bootloader using the flashloader command described in the previous point of this article. New partition method is mandatory if you plan to use SPL bootloader.

Flash Windows CE

  1. The windows CE bootloader will start, stop boot by pressing space.

    Toradex Bootloader 1.0 for Colibri Built Jan 12 2016
    Initializing L2 Cache.
    Board: Apalis iMX6 Quad 2GB IT
    CPU is running at 792000MHz.
    Using eMMC boot partition (size: 8192 sectors).
    Loading EBoot configuration...
    16 sectors of configuration data loaded from boot.
    
    Press [SPACE] to enter Bootloader Menu
    
    Initiating image launch in 5 seconds.
    
    
    BootLoader Configuration:
    
    C) Clear Flash Registry
    X) Enter CommandPrompt Mode
    D) Download image to RAM now
    F) Download image to FLASH now
    L) Launch existing flash resident image now
    
    
    Enter your selection:
    
  2. Press 'x' to access the bootloader console.

  3. Prepare the partition that will be used for the filesystem by executing:

    >preparefs 2

  4. The system will show the amount of storage that will be used for file system (actual size depends on the module configuration)

  5. flash the windows ce image. Command changes depending on the board. On Colibri type: "flashimage 0 <nkname>" on Apalis: "flashimage 1 <nkname>". <nkname> is nk7.nbx for Windows Embedded Compact 7 and nk8.nbx for Windows Embedded Compact 2013. Here you can see output of the command on an Apalis module flashing Windows Embedded Compact 2013:

    >flashimage 1 nk8.nbx

    Expected output:

    Reading 23629291 bytes.
    Compressed image size is 23629291 bytes.
    
    File is a compressed bin file.
    ............................
    Loading done.
    Writing image from sector 40962 to sector 87113.
    ....................................Flashing completed.
    

    If you are running bootloader version 1.0beta5 or earlier you need to use:

    >flashimage 1 2 nk8.nbx

    instead. But if you plan to flash image 1.0beta6 or later you have to flash the corresponding bootloader first, otherwise the image will not boot correctly.

  6. You should force the module to boot from internal image and reduce boot delay to 2 seconds (or the value that fits your requirements):

    >set boot.dl 0

    >set boot.delay 2

    >save boot

    With the output:

    16 sectors of configuration data stored.
    
  7. Reboot your device and Windows CE will start configured for VGA output.

    Toradex Bootloader 1.0 for Colibri Built Jan 12 2016
    Initializing L2 Cache.
    Board: Apalis iMX6 Quad 2GB IT
    CPU is running at 792000MHz.
    Using eMMC boot partition (size: 8192 sectors).
    Loading EBoot configuration...
    16 sectors of configuration data loaded from boot.
    
    Press [SPACE] to enter Bootloader Menu
    
    Initiating image launch in 0 seconds.
    System ready!
    Preparing for download...
    Loading compressed image...
    Reading image from sector 40962.
    Extracting 37619904 bytes from compressed image of 23629275 bytes
    ...................................
    

Done.

Update Tool

If you plan to move to release 1.2 using the new bootloader you'll have to update both SPL and eboot before rebooting your devices. They appear as two separate file types (SPL and SPL bootloader) in update tool. For future updates you will be able to just update the SPL bootloader, unless otherwise specified. Starting from version 1.0beta6 the image contains the Update Tool, this means that bootloader and image could be updated using this tool and without any operation on the bootloader's console. The update tool in version 1.0beta6 has an issue that may lead to a non-bootable image, a fixed update tool release is included in the 1.0 image download package and it's suggested to run that version if you plan to do an update from 1.0beta6.

Windows CE Libraries

A first release of the Windows CE Libraries is available here. The API is the same supported on Vybrid and described in the official documentation here.
Currently only some of the features are supported:

  • CoprocLib
  • MapMem
  • IntLib
  • GPIOLib
  • I2C
  • ADC
  • CAN
  • PWM
  • SPI

Supported features

  • Display output on VGA and Universal Display connector.LVDS output on Apalis.
  • USB Host
  • SD Card (both slots, 4bit slot is used for booting, 8bit slot can be used to access an additional SD card)
  • Ethernet
  • Serial ports
  • I2C
  • CAN bus (driver only, no libraries at the moment)
  • USB client (via USB on-the-go)
  • USB on the Go host
  • Resistive touch screen
  • Analog audio
  • Update library
  • Update tool
  • SPI
  • PCI express
  • SATA
  • HDMI
  • Camera interface
  • For a complete list see WinCE BSP iMX Release Details

Fixed issues

Please check Release details page to get detailed information about the new issues that have been fixed in the different releases and those that are still pending.

Binary Image, BSP, and Workspace Downloads