Solved

Windows CE, persist changes to ROM?

Posted on 2010-11-16
4
1,740 Views
Last Modified: 2013-12-27
I have an application i am loading onto a SYMBOL MC3070. I deploy the application from VS 2005, however when i power cycle the device it loses all the changes. How can i write the data from the RAM to the ROM so it boots my configuration with my application every time?
0
Comment
Question by:HADDADD3
4 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 34146264
oops, I have to change my default comment type, sorry :)
0
 
LVL 12

Expert Comment

by:NormanMaina
ID: 34146770
you have to install your application to a memory card.-or store the settings there.
Had teh same problem with a HP Ipaq and having the software run from an SD card did the trick.
0
 
LVL 16

Accepted Solution

by:
hjgode earned 500 total points
ID: 34152467
Hello

the MC3000 series is based on Windows CE Net 4.2, The 3070 Color should run CE Net 4.2 and will loose all settings which are not made persistent using the \Application folder. On a cold boot the whole object store including the registry and the file system is reset to the factory default except for the \Applications folder on the device. On Intermec devices this persistent folder is called Flash File Store, CCK_MMS or DiskOnChip. These special folders are not cleared and will allow you to setup a device following a clean boot.

If your app changes the registry and needs to restore them after a cold boot, you have to include the changes in the startup process of the symbol device.

From the MC3000 Integrator Guide:
"Flash Storage
In addition to the RAM-based storage standard on Windows CE mobile computers, the mobile computer is also equipped with a non-volatile Flash-based storage area which can store data (partitions) that can not be corrupted by a cold boot. This Flash area is divided into two categories: Flash File System (FFS) Partitions and Non-FFS Partitions.
FFS Partitions
The mobile computer includes two FFS partitions. These partitions appear to the mobile computer as a hard drive that the OS file system can write files to and read files from. Data is retained even if power is removed.
The two FFS partitions appear as two separate folders in the Windows CE file system and are as follows:
Platform: The Platform FFS partition contains Symbol-supplied programs and Dynamic Link Libraries (DLLs). This FFS is configured to include DLLs that control system operation. Since these drivers are required for basic mobile computer operation, only experienced users should modify the content of this partition.
Application: The Application FFS partition is used to store application programs needed to operate the mobile computer.
Working with FFS Partitions
Because the FFS partitions appear as folders under the Windows CE file system, they can be written to and read like any other folder.
For example, an application program can write data to a file located in the Application folder just as it would to the Windows folder.
However, the file in the Application folder is in non-volatile storage and is not lost on a cold boot (e.g., when power is removed for a long period of time).
Standard tools such as ActiveSync can be used to copy files to and from the FFS partitions. They appear as the “Application” and “Platform” folders to the ActiveSync explorer. This is useful when installing applications on the mobile computer. Applications stored in the Application folder are retained even when the mobile computer is cold booted, just as the Demo 3000 program is retained in memory.
There are two device drivers included in the Windows CE image to assist developers in configuring the mobile computer following a cold boot: RegMerge and CopyFiles.
RegMerge.dll
RegMerge.dll is a built-in driver that allows registry edits to be made to the Windows CE registry. Regmerge.dll runs very early in the boot process and looks for registry files (.reg files) in certain Flash File System folders during a cold boot. It then merges the registry changes into the system registry located in RAM.
Since the registry is re-created on every cold boot from the default ROM image, the RegMerge driver is necessary to make registry modifications persistent over cold boots.
RegMerge is configured to look in the root of two specific folders for .reg files in the following order:
\Platform
\Application
Regmerge continues to look for .reg files in these folders until all folders are checked. This allows folders later in the list to override folders earlier in the list. This way, it is possible to override Registry changes made by the Platforms partitions folders. Take care when using Regmerge to make registry changes. The DCP for MC3000 contains examples of .reg files.
Regmerge only merges the .reg files on cold boots. The merge process is skipped during a warm boot.
Making modifications to registry values for drivers loaded before RegMerge is not recommended. However, these values may require modification during software development. Since these early loading drivers read these keys before RegMerge gets a chance to change them, the mobile computer must be cold booted. The warm boot does not re-initialize the registry and the early loading driver reads the new registry values.
Do not use Regmerge to modify built-in driver registry values, or merge the same registry value to two files in the same folder, as the results are undefined.
CopyFiles
Windows CE expects certain files to be in the Windows folder, residing in volatile storage. Windows CE maintains the System Registry in volatile storage. CopyFiles copies files from one folder to another on a cold boot. Files can be copied from a non-volatile partition (Application or Platform) to the Windows or other volatile partition during a cold boot. During a cold boot CopyFiles looks for files with a .CPY extension in the root of the Platform and Application FFS partitions (Platform first and then Application). These files are text files containing the source and destination for the desired files to be copied separated by “>”. The following example from the file application.cpy is contained on the demo application partition included in the DCP for MC3000. It can also be obtained from the Symbol web site at http://devzone.symbol.com/.
Files are copied to the Windows folder from the Flash File System using copy files (*.cpy) in the following order:
\Platform
\Application
Example:
\Application\ScanSamp2.exe>\Windows\ScanSamp2.exe
This line directs CopyFiles to copy the ScanSamp2.exe application from the \Application folder to the \Windows folder.
"
 
Regards

Josef
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now