Hi there...

I'm currently working on a Windows CE 5.0 platform and were looking at
persistent registry possibilities.

Currently we have 32MB of flash and were wondering if it's possible to have
both an OS image and persistent registry in the same flash block ?

Does anyone have a hint to where I should start and how to get this working ?

Thanks in advance,
Mads.

Re: Persistent registry (Hive) by Piet

Piet
Thu Aug 25 07:43:31 CDT 2005

First tell us what your hardware is.

Piet


Re: Persistent registry (Hive) by Voidcoder

Voidcoder
Thu Aug 25 16:47:30 CDT 2005

The easiest way is to use existing (what flash chip is it?) or
write your own FMD driver. This will give you the persistent
storage which can be used to keep persistent registry hives
as well.


"Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
news:9D90BACC-F72A-49F1-8591-28B0703BEB2C@microsoft.com...
> Hi there...
>
> I'm currently working on a Windows CE 5.0 platform and were looking at
> persistent registry possibilities.
>
> Currently we have 32MB of flash and were wondering if it's possible to have
> both an OS image and persistent registry in the same flash block ?
>
> Does anyone have a hint to where I should start and how to get this working ?
>
> Thanks in advance,
> Mads.



Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Thu Aug 25 08:01:08 CDT 2005

Hi Piet

CPU: Intel XSCale PXA270 (ARMV4I)
Flash: 32MB (Flash ROM with the same specification as an Intel 28F256K18)
32bit
Ram: 32MB (SDRAM with the same specification as Micron MT48V16M16LFFG) 32bit
GPU: Intel 2700G graphics accelerator
VGA LCD

Currently we are using a Sophia Sandgate dev. board (SG2G) but will within
the next month begin using our own HW (same CPU, etc...).
On the dev. we also have USB Host, USB Slave, CF, SD, Ethernet etc.

Is this enough ?

/Mads



"Piet" wrote:

> First tell us what your hardware is.
>
> Piet
>
>

Re: Persistent registry (Hive) by Bruce

Bruce
Thu Aug 25 08:03:12 CDT 2005

Careful, only if running from RAM, not XIP from flash.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member




Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Thu Aug 25 08:12:03 CDT 2005

2x Intel flashchip RC 28F256K 18C120 Easy BGA-64pin ...

"Voidcoder" wrote:

> The easiest way is to use existing (what flash chip is it?) or
> write your own FMD driver. This will give you the persistent
> storage which can be used to keep persistent registry hives
> as well.
>
>
> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
> news:9D90BACC-F72A-49F1-8591-28B0703BEB2C@microsoft.com...
> > Hi there...
> >
> > I'm currently working on a Windows CE 5.0 platform and were looking at
> > persistent registry possibilities.
> >
> > Currently we have 32MB of flash and were wondering if it's possible to have
> > both an OS image and persistent registry in the same flash block ?
> >
> > Does anyone have a hint to where I should start and how to get this working ?
> >
> > Thanks in advance,
> > Mads.
>
>
>

Re: Persistent registry (Hive) by Steve

Steve
Thu Aug 25 08:18:33 CDT 2005

Do you intend to execute the OS image from the flash (XIP)? If so the only
option is to use the Intel PSM. Otherwise you can use the existing
strataflash driver. You can either keep an NK.BIN and user file system in a
single partition or you could do it in a secondary binary.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: Persistent registry (Hive) by Voidcoder

Voidcoder
Thu Aug 25 17:20:14 CDT 2005

Sorry, don't have a time to check it, but it seems this is
a normal "strata" type flash. So you can go on with a
stratafmd included in wince. BUT note (of course
Bruce is right) this will work for You only if running
from RAM.


"Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
news:19284A67-BEBA-4719-96E5-B8DF2A64EFEF@microsoft.com...
> 2x Intel flashchip RC 28F256K 18C120 Easy BGA-64pin ...
>
> "Voidcoder" wrote:
>
>> The easiest way is to use existing (what flash chip is it?) or
>> write your own FMD driver. This will give you the persistent
>> storage which can be used to keep persistent registry hives
>> as well.
>>
>>
>> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
>> news:9D90BACC-F72A-49F1-8591-28B0703BEB2C@microsoft.com...
>> > Hi there...
>> >
>> > I'm currently working on a Windows CE 5.0 platform and were looking at
>> > persistent registry possibilities.
>> >
>> > Currently we have 32MB of flash and were wondering if it's possible to have
>> > both an OS image and persistent registry in the same flash block ?
>> >
>> > Does anyone have a hint to where I should start and how to get this working ?
>> >
>> > Thanks in advance,
>> > Mads.
>>
>>
>>



Re: Persistent registry (Hive) by ooK

ooK
Thu Aug 25 10:07:57 CDT 2005

This is interesting. We also planned to place our Hive Registry on our
internal flash.
Is it possible to have the bootloader, (flash) ce-image, and our Hive
directory on the internal flash managed by
the strataflash driver? In this case, is it possible to see the Hive
files in a partition under CE?


Re: Persistent registry (Hive) by Paul

Paul
Thu Aug 25 10:40:13 CDT 2005

You can do this with the Intel Persistent Storage Manager, but not with any
drivers that come with Platform Builder. I don't use hives, but our devices
have the bootloader, the CE image, file storage (a \Flash folder in the
filesystem), and the registry all in on-board flash, using IPSM.

Paul T.

"ooK" <matzeooK@gmx.de> wrote in message
news:1124982477.095681.101920@g14g2000cwa.googlegroups.com...
> This is interesting. We also planned to place our Hive Registry on our
> internal flash.
> Is it possible to have the bootloader, (flash) ce-image, and our Hive
> directory on the internal flash managed by
> the strataflash driver? In this case, is it possible to see the Hive
> files in a partition under CE?
>



Re: Persistent registry (Hive) by Steve

Steve
Thu Aug 25 11:36:07 CDT 2005

Again - if the OS image is executing in place (XIP) from the flash that
flash CANNOT be used with the MS FAL/FMD. The only solution for XIP and data
storage from the same flash is for strataflash with the Intel IPSM.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Thu Aug 25 15:41:01 CDT 2005

Hi all

Thank you so much for your quick answers!

Now I am really a newbie on the Windows CE platform (used to work on much
smaller embedded devices) so please bear with me :-)

Currently we are just playing around with a Sophia Sandate SG2G board using
their supplied BSP. Now I really should read much more about program
execution etc. so

I am not really sure if programs is executed directly from flash or RAM ?

Is there an easy way to figure this out (since I have come across this
setting anywhere) ?

If programs are executed from RAM could I then setup a \Flash folder and
place the registry there ?

Is there a guide to how this is done ?

Thanks in advance,
The Newbie.


"Voidcoder" wrote:

> Sorry, don't have a time to check it, but it seems this is
> a normal "strata" type flash. So you can go on with a
> stratafmd included in wince. BUT note (of course
> Bruce is right) this will work for You only if running
> from RAM.
>
>
> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
> news:19284A67-BEBA-4719-96E5-B8DF2A64EFEF@microsoft.com...
> > 2x Intel flashchip RC 28F256K 18C120 Easy BGA-64pin ...
> >
> > "Voidcoder" wrote:
> >
> >> The easiest way is to use existing (what flash chip is it?) or
> >> write your own FMD driver. This will give you the persistent
> >> storage which can be used to keep persistent registry hives
> >> as well.
> >>
> >>
> >> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
> >> news:9D90BACC-F72A-49F1-8591-28B0703BEB2C@microsoft.com...
> >> > Hi there...
> >> >
> >> > I'm currently working on a Windows CE 5.0 platform and were looking at
> >> > persistent registry possibilities.
> >> >
> >> > Currently we have 32MB of flash and were wondering if it's possible to have
> >> > both an OS image and persistent registry in the same flash block ?
> >> >
> >> > Does anyone have a hint to where I should start and how to get this working ?
> >> >
> >> > Thanks in advance,
> >> > Mads.
> >>
> >>
> >>
>
>
>

Re: Persistent registry (Hive) by Steve

Steve
Thu Aug 25 16:49:43 CDT 2005

You need to consult the documentation for the BSP you have. To get you up to
speed you might also be interested in the Microsoft official training MSDN
2540N. (See www.EmbeddedFusion.com/msdn2540n.htm)

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Thu Aug 25 23:35:01 CDT 2005

Thanks Steve!

We are actually in the process of finding an instructor to hold the course
MS2540 (we should be able to attend this course late September, the course
will not be hold by a MS certified instructor and is will be customized for
our needs).

How is the MSDN2540N different from this course ?

So you would recommend ordering this DVD ?
(like for instance to get us jump started now)

I'm gessing that the DVD isn't adressing the persistent registry issue ?

Am I also right assuming that if we want to have persistent registry in the
same flash device as the bootloader & OS image, then the best solution would
be to have the Intel PSM ?

Thanks,
Mads.

"Steve Maillet (eMVP)" wrote:

> You need to consult the documentation for the BSP you have. To get you up to
> speed you might also be interested in the Microsoft official training MSDN
> 2540N. (See www.EmbeddedFusion.com/msdn2540n.htm)
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>
>

Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Fri Aug 26 00:45:01 CDT 2005


I wrote
>> How is the MSDN2540N different from this course ?
Just found a post about this course. It seems the MS2540 is based on Windows
CE 4.2 and the MSDN2540N is based on Windows CE 5.0.

Is the MS2540 course then completely outdated ?

So you would recommend ordering this DVD ?
(like for instance to get us jump started now)

I'm gessing that the DVD isn't adressing the persistent registry issue ?

Am I also right assuming that if we want to have persistent registry in the
same flash device as the bootloader & OS image, then the best solution would
be to have the Intel PSM ?

Thanks,
Mads.



"Steve Maillet (eMVP)" wrote:

> You need to consult the documentation for the BSP you have. To get you up to
> speed you might also be interested in the Microsoft official training MSDN
> 2540N. (See www.EmbeddedFusion.com/msdn2540n.htm)
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>
>

Re: Persistent registry (Hive) by Voidcoder

Voidcoder
Fri Aug 26 11:36:08 CDT 2005


You can obtain some info from the "config.bib" file. Post it here and we
will see where the image is executed from.

Yes, if running from RAM it is possible to setup \Flash folder
using the FMD driver, and keep your persistent data files there,
as well as to place registry files there.

Take a look at "ms-help://MS.WindowsCE.500/wceddk5/html/wce50conFlashMediaDriver.htm"
in wince 5.0 documentation.


Overwise (running from flash) you have two solutions:

1. Use Intel PSM, which is not free but time-verified and
quite stable solution.

2. Build you own solution. This is not really very defficult,
all You need is the piece of code for flash write/erase
operations to be copied to RAM and then called from
there, cause the most of flashes can not be read
(ie. no way to execute code from flash) when switched
to command mode.


"Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
news:3029E521-255B-42B3-BD61-974227A8BE8F@microsoft.com...
> Hi all
>
> Thank you so much for your quick answers!
>
> Now I am really a newbie on the Windows CE platform (used to work on much
> smaller embedded devices) so please bear with me :-)
>
> Currently we are just playing around with a Sophia Sandate SG2G board using
> their supplied BSP. Now I really should read much more about program
> execution etc. so
>
> I am not really sure if programs is executed directly from flash or RAM ?
>
> Is there an easy way to figure this out (since I have come across this
> setting anywhere) ?
>
> If programs are executed from RAM could I then setup a \Flash folder and
> place the registry there ?
>
> Is there a guide to how this is done ?
>
> Thanks in advance,
> The Newbie.
>
>
> "Voidcoder" wrote:
>
>> Sorry, don't have a time to check it, but it seems this is
>> a normal "strata" type flash. So you can go on with a
>> stratafmd included in wince. BUT note (of course
>> Bruce is right) this will work for You only if running
>> from RAM.
>>
>>
>> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
>> news:19284A67-BEBA-4719-96E5-B8DF2A64EFEF@microsoft.com...
>> > 2x Intel flashchip RC 28F256K 18C120 Easy BGA-64pin ...
>> >
>> > "Voidcoder" wrote:
>> >
>> >> The easiest way is to use existing (what flash chip is it?) or
>> >> write your own FMD driver. This will give you the persistent
>> >> storage which can be used to keep persistent registry hives
>> >> as well.
>> >>
>> >>
>> >> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
>> >> news:9D90BACC-F72A-49F1-8591-28B0703BEB2C@microsoft.com...
>> >> > Hi there...
>> >> >
>> >> > I'm currently working on a Windows CE 5.0 platform and were looking at
>> >> > persistent registry possibilities.
>> >> >
>> >> > Currently we have 32MB of flash and were wondering if it's possible to have
>> >> > both an OS image and persistent registry in the same flash block ?
>> >> >
>> >> > Does anyone have a hint to where I should start and how to get this working ?
>> >> >
>> >> > Thanks in advance,
>> >> > Mads.
>> >>
>> >>
>> >>
>>
>>
>>



Re: Persistent registry (Hive) by Bruce

Bruce
Fri Aug 26 07:14:39 CDT 2005

You probably want the training for the version of the OS that you are using.

Of course he recommends the DVD, he is selling it. I am not selling it, and
I also recommend it as it is quite good. You get video of Steve presenting
the material and the labs. The only thing that you don't get is interactive
questions/answers, for that you would need a live instructor.

Yes, if you want to XIP from flash then iPSM will work, while MSFlash will
not.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member




Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Fri Aug 26 07:31:46 CDT 2005

This is a dump of my config.bib file.

/Mads

;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
;
; Use of this source code is subject to the terms of the Microsoft end-user
; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
; If you did not accept the terms of the EULA, you are not authorized to use
; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
; install media.
;
; Memory Map
; ----------
;
; 8000.0000 -+
; | Bootloader Stack (64KB)
; 8001.0000 -+
; | Bootloader RAM (64KB)
; 8002.0000 -+
; | Bootloader Code (256KB)
; 8006.0000 -+
; | GAP (reserved for future)
; 800F.F000 -+
; | ARGS (4KB)
; 8010.0000 -+
; |
; | OS (NK) Code (48MB)
; |
; 8310.0000 -+ **auto-size**
; |
; | OS (NK) RAM (15MB)
; |
; 8400.0000 -+
;

MEMORY

IF IMGFLASH!

; Name Start Size Type
; ------- -------- -------- ----
RSVD 80000000 000FF000 RESERVED
ARGS 800FF000 00001000 RESERVED
NK 80100000 03000000 RAMIMAGE
RAM 83100000 00F00000 RAM
ENDIF

IF IMGFLASH

RSVD 80000000 000FF000 RESERVED
ARGS 800FF000 00001000 RESERVED
NK 86600000 03000000 RAMIMAGE
RAM 80100000 03F00000 RAM
ENDIF
; Reserve ZBANK virtual block (No physical memory
; is required to back this virtual range).
;
ZBANK 96500000 00100000 RESERVED


CONFIG

IF IMGFLASH !
AUTOSIZE=ON
ENDIF

KERNELFIXUPS=ON

; @CESYSGEN IF !NK_NKNOCOMP
COMPRESSION=ON
; @CESYSGEN ENDIF !NK_NKNOCOMP
; @CESYSGEN IF NK_NKNOCOMP
; @CESYSGEN ENDIF NK_NKNOCOMP

IF IMGPROFILER
PROFILE=ON
ELSE
PROFILE=OFF
ENDIF

;
; ROMFLAGS is a bitmask of options for the kernel
; ROMFLAGS 0x0001 Disallow Paging
; ROMFLAGS 0x0002 Not all KMode
; ROMFLAGS 0x0010 Trust Module only
;
IF IMGTRUSTROMONLY
IF IMGNOTALLKMODE
ROMFLAGS=12
ELSE
ROMFLAGS=10
ENDIF
ELSE
IF IMGNOTALLKMODE
ROMFLAGS=02
ELSE
ROMFLAGS=00
ENDIF
ENDIF





"Voidcoder" wrote:

>
> You can obtain some info from the "config.bib" file. Post it here and we
> will see where the image is executed from.
>
> Yes, if running from RAM it is possible to setup \Flash folder
> using the FMD driver, and keep your persistent data files there,
> as well as to place registry files there.
>
> Take a look at "ms-help://MS.WindowsCE.500/wceddk5/html/wce50conFlashMediaDriver.htm"
> in wince 5.0 documentation.
>
>
> Overwise (running from flash) you have two solutions:
>
> 1. Use Intel PSM, which is not free but time-verified and
> quite stable solution.
>
> 2. Build you own solution. This is not really very defficult,
> all You need is the piece of code for flash write/erase
> operations to be copied to RAM and then called from
> there, cause the most of flashes can not be read
> (ie. no way to execute code from flash) when switched
> to command mode.
>
>


Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Fri Aug 26 07:50:06 CDT 2005

I have been looking in my ce.bib file. There there is listed a ton of files
in the MODULES section. I guess that these files are all executed in place so
the only step forward is using the Intel PSM or can these be moved to RAM ?

/Mads

Some of the files in the module section
MODULES
; Name Path Memory Type
; -------------- --------------------------------------------- -----------
; @CESYSGEN IF CE_MODULES_NK

nk.exe
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\kern.exe NK SH

; @CESYSGEN ENDIF

; @CESYSGEN IF CE_MODULES_OSAXST0
; @CESYSGEN ENDIF

; @CESYSGEN IF CE_MODULES_NK



; @CESYSGEN ENDIF

; @CESYSGEN IF CE_MODULES_COREDLL
coredll.dll
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\coredll.dll NK SH
; @CESYSGEN ENDIF

; @CESYSGEN IF CE_MODULES_FILESYS
filesys.exe
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\filesys.exe NK SHM
; @CESYSGEN ENDIF

; @CESYSGEN IF CE_MODULES_OEMFS
; @CESYSGEN ENDIF

; TKTest replaces filesys for tiny kernel testing.
; @CESYSGEN IF !CE_MODULES_FILESYS
; @CESYSGEN IF CE_MODULES_TKTEST
; @CESYSGEN ENDIF CE_MODULES_TKTEST
; @CESYSGEN ENDIF !CE_MODULES_FILESYS

; @CESYSGEN IF CE_MODULES_GWES
gwes.exe
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\gwes.exe NK SHM
; @CESYSGEN ENDIF
; @CESYSGEN IF CE_MODULES_DEVICE
device.exe
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\device.exe NK SHM
devmgr.dll
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\devmgr.dll NK SHM
regenum.dll
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\regenum.dll NK SH
busenum.dll
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\busenum.dll NK SH
; @CESYSGEN IF DEVICE_PMIF
pm.dll
D:\Compile\PBWorkspaces\SG2G_Build6\RelDir\SandgateII_G_ARMV4I_Release\pm.dll
NK SHM
; @CESYSGEN ENDIF


+++++ a lot more


"Voidcoder" wrote:

>
> You can obtain some info from the "config.bib" file. Post it here and we
> will see where the image is executed from.
>
> Yes, if running from RAM it is possible to setup \Flash folder
> using the FMD driver, and keep your persistent data files there,
> as well as to place registry files there.
>
> Take a look at "ms-help://MS.WindowsCE.500/wceddk5/html/wce50conFlashMediaDriver.htm"
> in wince 5.0 documentation.
>
>
> Overwise (running from flash) you have two solutions:
>
> 1. Use Intel PSM, which is not free but time-verified and
> quite stable solution.
>
> 2. Build you own solution. This is not really very defficult,
> all You need is the piece of code for flash write/erase
> operations to be copied to RAM and then called from
> there, cause the most of flashes can not be read
> (ie. no way to execute code from flash) when switched
> to command mode.
>
>
> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
> news:3029E521-255B-42B3-BD61-974227A8BE8F@microsoft.com...
> > Hi all
> >
> > Thank you so much for your quick answers!
> >
> > Now I am really a newbie on the Windows CE platform (used to work on much
> > smaller embedded devices) so please bear with me :-)
> >
> > Currently we are just playing around with a Sophia Sandate SG2G board using
> > their supplied BSP. Now I really should read much more about program
> > execution etc. so
> >
> > I am not really sure if programs is executed directly from flash or RAM ?
> >
> > Is there an easy way to figure this out (since I have come across this
> > setting anywhere) ?
> >
> > If programs are executed from RAM could I then setup a \Flash folder and
> > place the registry there ?
> >
> > Is there a guide to how this is done ?
> >
> > Thanks in advance,
> > The Newbie.
> >
> >
> > "Voidcoder" wrote:
> >
> >> Sorry, don't have a time to check it, but it seems this is
> >> a normal "strata" type flash. So you can go on with a
> >> stratafmd included in wince. BUT note (of course
> >> Bruce is right) this will work for You only if running
> >> from RAM.
> >>
> >>
> >> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
> >> news:19284A67-BEBA-4719-96E5-B8DF2A64EFEF@microsoft.com...
> >> > 2x Intel flashchip RC 28F256K 18C120 Easy BGA-64pin ...
> >> >
> >> > "Voidcoder" wrote:
> >> >
> >> >> The easiest way is to use existing (what flash chip is it?) or
> >> >> write your own FMD driver. This will give you the persistent
> >> >> storage which can be used to keep persistent registry hives
> >> >> as well.
> >> >>
> >> >>
> >> >> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
> >> >> news:9D90BACC-F72A-49F1-8591-28B0703BEB2C@microsoft.com...
> >> >> > Hi there...
> >> >> >
> >> >> > I'm currently working on a Windows CE 5.0 platform and were looking at
> >> >> > persistent registry possibilities.
> >> >> >
> >> >> > Currently we have 32MB of flash and were wondering if it's possible to have
> >> >> > both an OS image and persistent registry in the same flash block ?
> >> >> >
> >> >> > Does anyone have a hint to where I should start and how to get this working ?
> >> >> >
> >> >> > Thanks in advance,
> >> >> > Mads.
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: Persistent registry (Hive) by Voidcoder

Voidcoder
Fri Aug 26 16:51:10 CDT 2005

Well, it should work for both FLASH and RAM images. Now
You have to look into platform sectting (Platform Builder->Platform->
Settings->Build Options) and check to see if "Write Runtime Image to Flash"
is checked. or just open "Platform Builder->Build OS->Open Release Directory"
and type "SET IMGFLASH".



"Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
news:3E4B288C-1AF7-4619-8FC4-F0E227C59A23@microsoft.com...
> This is a dump of my config.bib file.
>
> /Mads
>
> ;
> ; Copyright (c) Microsoft Corporation. All rights reserved.
> ;
> ;
> ; Use of this source code is subject to the terms of the Microsoft end-user
> ; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
> ; If you did not accept the terms of the EULA, you are not authorized to use
> ; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
> ; install media.
> ;
> ; Memory Map
> ; ----------
> ;
> ; 8000.0000 -+
> ; | Bootloader Stack (64KB)
> ; 8001.0000 -+
> ; | Bootloader RAM (64KB)
> ; 8002.0000 -+
> ; | Bootloader Code (256KB)
> ; 8006.0000 -+
> ; | GAP (reserved for future)
> ; 800F.F000 -+
> ; | ARGS (4KB)
> ; 8010.0000 -+
> ; |
> ; | OS (NK) Code (48MB)
> ; |
> ; 8310.0000 -+ **auto-size**
> ; |
> ; | OS (NK) RAM (15MB)
> ; |
> ; 8400.0000 -+
> ;
>
> MEMORY
>
> IF IMGFLASH!
>
> ; Name Start Size Type
> ; ------- -------- -------- ----
> RSVD 80000000 000FF000 RESERVED
> ARGS 800FF000 00001000 RESERVED
> NK 80100000 03000000 RAMIMAGE
> RAM 83100000 00F00000 RAM
> ENDIF
>
> IF IMGFLASH
>
> RSVD 80000000 000FF000 RESERVED
> ARGS 800FF000 00001000 RESERVED
> NK 86600000 03000000 RAMIMAGE
> RAM 80100000 03F00000 RAM
> ENDIF
> ; Reserve ZBANK virtual block (No physical memory
> ; is required to back this virtual range).
> ;
> ZBANK 96500000 00100000 RESERVED
>
>
> CONFIG
>
> IF IMGFLASH !
> AUTOSIZE=ON
> ENDIF
>
> KERNELFIXUPS=ON
>
> ; @CESYSGEN IF !NK_NKNOCOMP
> COMPRESSION=ON
> ; @CESYSGEN ENDIF !NK_NKNOCOMP
> ; @CESYSGEN IF NK_NKNOCOMP
> ; @CESYSGEN ENDIF NK_NKNOCOMP
>
> IF IMGPROFILER
> PROFILE=ON
> ELSE
> PROFILE=OFF
> ENDIF
>
> ;
> ; ROMFLAGS is a bitmask of options for the kernel
> ; ROMFLAGS 0x0001 Disallow Paging
> ; ROMFLAGS 0x0002 Not all KMode
> ; ROMFLAGS 0x0010 Trust Module only
> ;
> IF IMGTRUSTROMONLY
> IF IMGNOTALLKMODE
> ROMFLAGS=12
> ELSE
> ROMFLAGS=10
> ENDIF
> ELSE
> IF IMGNOTALLKMODE
> ROMFLAGS=02
> ELSE
> ROMFLAGS=00
> ENDIF
> ENDIF
>
>
>
>
>
> "Voidcoder" wrote:
>
>>
>> You can obtain some info from the "config.bib" file. Post it here and we
>> will see where the image is executed from.
>>
>> Yes, if running from RAM it is possible to setup \Flash folder
>> using the FMD driver, and keep your persistent data files there,
>> as well as to place registry files there.
>>
>> Take a look at "ms-help://MS.WindowsCE.500/wceddk5/html/wce50conFlashMediaDriver.htm"
>> in wince 5.0 documentation.
>>
>>
>> Overwise (running from flash) you have two solutions:
>>
>> 1. Use Intel PSM, which is not free but time-verified and
>> quite stable solution.
>>
>> 2. Build you own solution. This is not really very defficult,
>> all You need is the piece of code for flash write/erase
>> operations to be copied to RAM and then called from
>> there, cause the most of flashes can not be read
>> (ie. no way to execute code from flash) when switched
>> to command mode.
>>
>>
>



Re: Persistent registry (Hive) by Steve

Steve
Fri Aug 26 08:27:32 CDT 2005

Actually you can get questions answered from us as well, when you have the
self paced course, anyone who purchases the course can ask us questions
about the course contents and we'll answer them. We are in the process of
setting up a web based mechanism for that so we can manage it better but
e-mail currently works as well.

The MSDN 2540a is for V4.0 and MSDN 2540b includes V4.2 the MSDN 2540N
course is for V5.0 only.

And, yes, I do recommend the self paced version of the course! ;-) Not only
because we sell it but because it's so much less expensive than a live
event. Even if you do attend a live event it's a great supplement, as it
gives another instructor's perspective and allows you to refer back to
exactly what was said without the effects of fading memory or cryptic notes.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: Persistent registry (Hive) by Steve

Steve
Fri Aug 26 08:39:21 CDT 2005

You are confusing the terms, and in this case it's pretty easy to do. There
is XIP from flash and then there is XIP. Let me clarify if I can. Let's
start with the more general case of XIP. All modules in the modules section
are pre-located at a fixed virtual address by the makeimg process. Those
modules are not stored as normal files. They are considered Execute in place
(XIP). What address they are located at and what type of memory is at that
address is completely irrelevant to the fact that the code will XIP there.
If you store the NK.BIN file in flash and parse it out into RAM on every
boot then the OS image and XIP modules will be executing from RAM. If you
store the NK.NB0 directly in flash and your boot loader or startup code
jumps directly to the image in flash then the code is still XIP but it's
from FLASH. This is where the problem comes. In general, you can't just
erase a sector of the flash while you are executing code from the same flash
part! Some Flash types allow this sort of operation in hardware with special
programming. You can also relocate the flash code into RAM and disable
interrupts while performing flash operations, however that has a significant
impact on the performance and real-time response of the system.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Fri Aug 26 14:58:03 CDT 2005

The Write Runtime Image to Flash is set.

I guess this is always set when you want your CE image to be stored in non
volatile memory so it is present at next cold reboot ?

/Mads

"Voidcoder" wrote:

> Well, it should work for both FLASH and RAM images. Now
> You have to look into platform sectting (Platform Builder->Platform->
> Settings->Build Options) and check to see if "Write Runtime Image to Flash"
> is checked. or just open "Platform Builder->Build OS->Open Release Directory"
> and type "SET IMGFLASH".
>
>
>
> "Mads Lind Christiansen" <MadsLindChristiansen@discussions.microsoft.com> wrote in message
> news:3E4B288C-1AF7-4619-8FC4-F0E227C59A23@microsoft.com...
> > This is a dump of my config.bib file.
> >
> > /Mads
> >
> > ;
> > ; Copyright (c) Microsoft Corporation. All rights reserved.
> > ;
> > ;
> > ; Use of this source code is subject to the terms of the Microsoft end-user
> > ; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
> > ; If you did not accept the terms of the EULA, you are not authorized to use
> > ; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
> > ; install media.
> > ;
> > ; Memory Map
> > ; ----------
> > ;
> > ; 8000.0000 -+
> > ; | Bootloader Stack (64KB)
> > ; 8001.0000 -+
> > ; | Bootloader RAM (64KB)
> > ; 8002.0000 -+
> > ; | Bootloader Code (256KB)
> > ; 8006.0000 -+
> > ; | GAP (reserved for future)
> > ; 800F.F000 -+
> > ; | ARGS (4KB)
> > ; 8010.0000 -+
> > ; |
> > ; | OS (NK) Code (48MB)
> > ; |
> > ; 8310.0000 -+ **auto-size**
> > ; |
> > ; | OS (NK) RAM (15MB)
> > ; |
> > ; 8400.0000 -+
> > ;
> >
> > MEMORY
> >
> > IF IMGFLASH!
> >
> > ; Name Start Size Type
> > ; ------- -------- -------- ----
> > RSVD 80000000 000FF000 RESERVED
> > ARGS 800FF000 00001000 RESERVED
> > NK 80100000 03000000 RAMIMAGE
> > RAM 83100000 00F00000 RAM
> > ENDIF
> >
> > IF IMGFLASH
> >
> > RSVD 80000000 000FF000 RESERVED
> > ARGS 800FF000 00001000 RESERVED
> > NK 86600000 03000000 RAMIMAGE
> > RAM 80100000 03F00000 RAM
> > ENDIF
> > ; Reserve ZBANK virtual block (No physical memory
> > ; is required to back this virtual range).
> > ;
> > ZBANK 96500000 00100000 RESERVED
> >
> >
> > CONFIG
> >
> > IF IMGFLASH !
> > AUTOSIZE=ON
> > ENDIF
> >
> > KERNELFIXUPS=ON
> >
> > ; @CESYSGEN IF !NK_NKNOCOMP
> > COMPRESSION=ON
> > ; @CESYSGEN ENDIF !NK_NKNOCOMP
> > ; @CESYSGEN IF NK_NKNOCOMP
> > ; @CESYSGEN ENDIF NK_NKNOCOMP
> >
> > IF IMGPROFILER
> > PROFILE=ON
> > ELSE
> > PROFILE=OFF
> > ENDIF
> >
> > ;
> > ; ROMFLAGS is a bitmask of options for the kernel
> > ; ROMFLAGS 0x0001 Disallow Paging
> > ; ROMFLAGS 0x0002 Not all KMode
> > ; ROMFLAGS 0x0010 Trust Module only
> > ;
> > IF IMGTRUSTROMONLY
> > IF IMGNOTALLKMODE
> > ROMFLAGS=12
> > ELSE
> > ROMFLAGS=10
> > ENDIF
> > ELSE
> > IF IMGNOTALLKMODE
> > ROMFLAGS=02
> > ELSE
> > ROMFLAGS=00
> > ENDIF
> > ENDIF
> >
> >
> >
> >
> >
> > "Voidcoder" wrote:
> >
> >>
> >> You can obtain some info from the "config.bib" file. Post it here and we
> >> will see where the image is executed from.
> >>
> >> Yes, if running from RAM it is possible to setup \Flash folder
> >> using the FMD driver, and keep your persistent data files there,
> >> as well as to place registry files there.
> >>
> >> Take a look at "ms-help://MS.WindowsCE.500/wceddk5/html/wce50conFlashMediaDriver.htm"
> >> in wince 5.0 documentation.
> >>
> >>
> >> Overwise (running from flash) you have two solutions:
> >>
> >> 1. Use Intel PSM, which is not free but time-verified and
> >> quite stable solution.
> >>
> >> 2. Build you own solution. This is not really very defficult,
> >> all You need is the piece of code for flash write/erase
> >> operations to be copied to RAM and then called from
> >> there, cause the most of flashes can not be read
> >> (ie. no way to execute code from flash) when switched
> >> to command mode.
> >>
> >>
> >
>
>
>

Re: Persistent registry (Hive) by MadsLindChristiansen

MadsLindChristiansen
Fri Aug 26 15:04:02 CDT 2005

Hi Steve

"Steve Maillet (eMVP)" wrote:

> You are confusing the terms, and in this case it's pretty easy to do. There
> is XIP from flash and then there is XIP. Let me clarify if I can. Let's
> start with the more general case of XIP. All modules in the modules section
> are pre-located at a fixed virtual address by the makeimg process. Those
> modules are not stored as normal files. They are considered Execute in place
> (XIP). What address they are located at and what type of memory is at that
> address is completely irrelevant to the fact that the code will XIP there.
> If you store the NK.BIN file in flash and parse it out into RAM on every
> boot then the OS image and XIP modules will be executing from RAM. If you
> store the NK.NB0 directly in flash and your boot loader or startup code
> jumps directly to the image in flash then the code is still XIP but it's
> from FLASH. This is where the problem comes.
I guess this is all covered in the MSDN 2540N course ?
I think I will do some reading up on this part.

And we might actually be ordering your DVD within the next week or so! :-)
Then later we will probably hire a Windows CE consultant instead to do some
workshop which is more aimed at current impl. problems.

Thanks,
Mads.

The next part I am aware of :-)
> In general, you can't just
> erase a sector of the flash while you are executing code from the same flash
> part! Some Flash types allow this sort of operation in hardware with special
> programming. You can also relocate the flash code into RAM and disable
> interrupts while performing flash operations, however that has a significant
> impact on the performance and real-time response of the system.
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>
>