Skip to main content

Production Programming for iMX6 Modules

Use the Easy Installer (suggested)​

caution

Since release 1.3b2 you can use the Toradex Easy Installer to install automatically bootloader, image (if you use a custom image you'll need the image compression tool), registry, splash screen, and config block. You can then use the AutoCopy and EarlyAutoCopy to copy application and data files.

Prepare configuration files​

Once you have a running module that is configured in the way you want you can use update tool to save the configuration files you need to replicate the same configuration on other modules.

1. Launch update tool​

Launch update tool
If you are using our standard image you should be able to find update tool shortcut in the start menu, otherwise, you will have to launch it from your application or from external media using the AutoRun feature.

2. Backup registry​

Select "backup" button in the update tool main UI. backup
Select "registry raw" as file type, press ok
backup registry
save the file on a mass-storage device that you could use to transfer it to your PC.

3. Backup config block​

Select backup again but this time select "config block (raw)" and press ok.
backup config block
save the file on a mass-storage device that you could use to transfer it to your PC.

Download the Easy Installer Template​

You can find a template file for Windows Embedded Compact 7 and 2013 on our server, download it on your PC.
iMX6 WinCE Image

Prepare storage media​

You can extract the content of the template on a mass-storage device (SD card or USB thumbdrive that you will use for setup).
After extracting the folder and files contained in the zip file your mass-storage device should look like this:
template
You can now copy the two configuration files you saved before (they should be named Backup.cfg and Backup.i6r) and your OS image. Our default download use nk7.nbx for Windows Embedded Compact 7 images and nk8.nbx for Windows Embedded Compact 2013 image, you'll have to copy and rename the image file.
If you built your own image using our binary BSP you will have to compress it using our Image Compression Tool (available as paid tool) and keep its default name: nk.nbx.
You can optionally copy a splash screen image generated with our Splash Screen Tool (paid tool) and save it as Custom.tss, otherwise you will have the standard Toradex logo at boot.
At the end of the copy operations your mass storage device should look like this screenshot:
mass storage

Install custom image using the Toradex Easy Installer​

If you are installing your image on a brand-new module this should already come with the Toradex Easy Installer ready to run. If the module has been used with Windows CE or other operating systems, you may need to install/restore it as described in the Toradex Easy Installer documentation.

Select custom image​

Once you start the Easy Installer you should see available images, if you insert the mass-storage device you prepared on previous steps you should see your custom image in the list.
easy installer images
(if your device is not connected to the internet you'll probably see only your custom image in that list).
Select your custom image and then "install" to start installing it.
The Easy Installer will show a warning giving you a last chance to check that you have no valuable information stored on the module.
easy installer images
Then you'll have to acknowledge our Windows CE image license.
license
And the copy process will start.
copy
This should last a few minutes and if no errors are detected you should be able to power off your device.
power off
If you need to copy other files to the \FlashDisk folder or to run applications to further customize your device (ex: perform touchscreen calibration etc.), you can power off and on your device (reset will not work) and use the AutoCopy and EarlyAutoCopy and AutoRun features to perform those operations.

Fully automate easy installer setup​

Once you tested your image and checked that everything works as expected you may want to remove the manual selection steps and start the installation as soon as the Easy Installer is started.
To do this you have to open the image.json file that you can find in your custom image folder.
Replace the statement:

"autoinstall": false,   

at the beginning of the file with:

"autoinstall": true,    

In this way the only message you will see is the one that tells you that is safe to power-off the device.

Use recovery mode (deprecated)​

Those instructions apply to release 1.1 beta 4 of the Windows CE images and BSP. Some of the features described here may not work as described in this document on previous releases.

Collecting the required files​

To install Windows Embedded Compact 7 or 2013 on your module you need the following elements:

  • recovery mode tools
  • eboot bootloader
  • operating system
  • configuration block
  • registry entries for customization (optional)
  • splash screen (optional)
  • additional drivers and applications

By default modules come with Linux pre-installed, so during production programming, you have to switch from Linux to Windows CE, this switch operation does not impact module-unique settings, like MAC address or production information, so the exact same steps can be performed on each module, as long as you prepared the right files.

Recovery mode tools​

Those tools are part of our standard OS image downloads, available here.
In the zip file, you'll find a folder named "recovery" that contains all the files you need to perform recovery-mode operations.

Bootloader​

Bootloader is provided as part of our standard images and BSPs and can be downloaded here.
If you built your own bootloader, customizing it with our bootloader kit (available as paid additional tool), at the end of the build process, you will have the same eboot.imx file provided with our downloadables images and BSP.
You'll have to write eboot.imx on a SD card using the Win32 Disk Imager tool.

  • download the tool here: http://sourceforge.net/projects/win32diskimager/
  • launch it and select the eboot.imx file you want to write
  • 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 writing process is completed
  • remove and re-insert the SD card, your PC will ask you to format it
  • format the card as FAT32

Windows CE Image​

Our images are provided as compressed binaries with the .nbx file name extension.
You can use nk7.nbx if you plan to use the module with Windows Embedded Compact 7 or nk8.nbx if you plan to use Windows Embedded Compact 2013.
If you build your own image you'll have a file named nk.bin, this can also be flashed using the same procedure we will describe in the next steps.
Take your file (nbx or bin format) and copy it to the root partition of your SD card.

Config block settings​

Config block contains all the information required by the bootloader to initialize the module, show splash screen (if needed) and load and start the operating system. Different settings can be changed by the set command of the bootloader console.
Config block parameters are documented here (some may not apply to i.MX6).
Once you have configured the config block in the correct way you can save it using the update tool, as documented here.
This will generate a .cfg file containing those settings.

Splash screen​

Our standard OS images already contain a splash screen.
You can generate a custom one using our splash screen generation tool (paid tool, available on request) and this can be then flashed on each module during production programming.

Registry Settings​

You can use the registry editor that is integrated with our images or part of our binary BSP to export the registry settings you made to customize your image.
Changing display resolution, configuring IP address etc. are operations that could be performed using registry customization.
You'll have one or more text files, containing the registry entries you want to change. You can keep them as separate files or, to simplify installation and maintenance, consolidate them into a single file.

Applications, drivers, and additional files​

You can prepare your own application and any additional files you want to copy to the module, considering that the internal storage will be mapped as \FlashDisk folder by the operating system.
You can prepare all the contents in a subfolder named FlashDisk to remap the right organization of those files. If you need to transfer files to different folders (ex \Windows) at boot, you can use the autocopy feature and place files in a folder named "Autocopy" on Flashdisk, forcing those files to be copied on every boot.

Prepare storage with autocopy and autorun​

You can copy the Flashdisk folder you created in the previous step inside a folder named Autocopy on the storage media device(it can be the same SD where you put bootloader and OS image, if you use different storage media, this must be formatted as FAT or exFAT). In this way, the autocopy feature (documented autocopy) can be used to set-up application and other files on first boot. If you need to import config block, splash screen or registry settings you'll need to use the autorun feature described here.
Create a folder named Autorun in the root folder of your storage device where you can create shortcuts (text files with .lnk extension) to execute the commands required to import the different settings.

Importing registry files​

To silently import registry files you can run regedit.exe, passing the name of the registry file you want to import on the command line. So a shortcut pointing to:

Regedit.exe /S "\Sd card\settings.reg"

will import the contents of the file named settings.reg from the SD card.

Importing config block​

Config block can be imported by running update tool.
If you saved your settings as described before you can restore them by launching (again via a shortcut in autorun folder if you need fully automated setup):

update.exe /u configblock,raw,<configuration file path>

Flashing splash screen​

The procedure to flash a new splash screen is similar to the one used for config block since it also uses update tool.

update.exe /u splashscreen,raw,<configuration file path>

Flashing a new module​

To flash a new module you need:

  • Serial connection to UARTA (115200bps, 8 data bits, 1 stop bit, no parity, no flow control)
  • SD card with bootloader, image and additional files
  • USB connection from PC to device using USB-client port

If your custom carrier board does not provide access to UART A or does not support USB client (as on Viola carrier board with default mount options) you may need to use a Colibri or Apalis EVB to do production programming and then move the module to your own carrier board for final testing.
This document will describe the steps and command you have to perform.
Serial commands can be automated using scripting tools on PC to perform a completely unattended installation.

Entering recovery mode​

The modules come with Linux pre-installed. You can enter recovery mode from the u-boot console. To enter it press space in the first second after module power-up or reset.
From the console you can type:

bmode usb

This will put the module in recovery mode. On Colibri-based devices you should ensure that no SD card is in SD slot at this point, otherwise recovery mode will not work. If your module does not boot at all because u-boot has been corrupted, then you can enter recovery mode using hardware method described here.

Flashing bootloader​

To flash the bootloader you must run 'imx6recovery.bat' from the recovery folder of the OS image zip file.
The application will download recovery mode loader that, in turn, will wait for an SD card (in slot 1 for Apalis) and then flash the bootloader and create the correct settings depending on the module you are using.
At the end of this phase (reported with a message on the serial console) you'll have to power cycle your board. Reset will not work.

Flashing OS Image and preparing internal storage​

In this step you'll have to enter bootloader console by pressing space in the first 5 seconds after boot and then pressing 'x'. In the boot console you have to execute the following commands:

preparefs
flashimage &lt;sd slot&gt; &lt;filename&gt;

Where <sd slot> is 0 for colibri modules and 1 for Apalis ones and filenames is your OS image file, previously copied to the root folder of your SD card. At this point you can boot the OS image by entering:

exit
L

or just by rebooting your board using:

reboot

or hardware reset/power cycle

Import registry, splash screen and configblock and copy application and other files​

If you prepared your storage media (SD card or USB thumbdrive) as described in previous points, just having it inserted at boot will copy files and execute configuration steps, using the auto-copy and auto-run features.
With auto-run you may also execute some test applications to check that your hardware is behaving as expected, but this may require a reboot in between (after copy and registry import) and so a second mass-storage device with just your testing application inside autorun folder.
As an alternative you can copy the test application to \Flashdisk\autorun and have it executed at next reboot and then move itself to a different folder when testing has been completed.



Send Feedback!