Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I download nk.bin to a harddrive

488 views
Skip to first unread message

Joseph Shu

unread,
Jan 29, 2002, 2:59:11 PM1/29/02
to
Hi, I'm a newbie to CE.

I have a PC running dos 6.22, so I use the loadcepc to boot up my system
with ethernet connection to talk to my platform builder without any problem.
I could develop applications and everything, and download to the CE box. Now
my question is how can I transfer the final nk.bin file to the hard drive
without having DOS on it? I'm really new to this, so hopefully someone can
give me a step by step walkthrough....or maybe this topic has been covered
some time ago in this newsgroup but I just missed it, so could somebody
point me to the right thread? Thanks.

Joe


Yadhu Gopalan (MS)

unread,
Jan 29, 2002, 4:37:17 PM1/29/02
to
If you do not want to boot to DOS first you will have to write a boot loader
that grabs the NK.BIN image out of the hard disk and loads into RAM.

-yadhu
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.


"Joseph Shu" <js...@handshakeinteractive.com> wrote in message
news:#KZUz9PqBHA.620@tkmsftngp02...

Joseph Shu

unread,
Jan 29, 2002, 5:00:14 PM1/29/02
to
I'm really new to this OS thing, so is it possible for you to tell me how to
do it? Or is there any websites or books that can teach me how to do that?
Thanks.

Joe

"Yadhu Gopalan (MS)" <_yad...@ONLINEmicrosoft.com> wrote in message
news:3c57160d$1...@news.microsoft.com...

Jeff Glaum [MS]

unread,
Jan 29, 2002, 7:40:57 PM1/29/02
to
Unfortunately, there isn't a good "how to" manual on this subject. We are
looking into a better solution to the problem currently. In general, the
types of things you'll want to look into are (and much of this can be easily
found with some Internet searches):

* Disk organization - how the master boot record (MBR) is used by the BIOS
to locate a boot sector and how this all plays together.
* BIOS int13 calls - see http://www.ctyme.com/intr/int-13.htm for some good
information.
* x86 protected mode programming
* BIN file formats - this is well documented in Platform Builder.

In Windows CE .NET, we provide a loader called "romboot" which is a
ROM-based loader for Geode platforms. While it's overkill for what you
need, it demonstrates some of this information
(%_WINCEROOT%\public\common\oak\csp\i486\romboot). Also, we provide the
sources to loadcepc.exe which also demonstrate some of this (but obviously
rely on DOS/himem.sys for other things). Hopefully this is enough to get
you started.

Jeff

--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.


"Joseph Shu" <js...@handshakeinteractive.com> wrote in message

news:OuBSUBRqBHA.460@tkmsftngp04...

Paul G. Tobey

unread,
Jan 30, 2002, 12:31:28 PM1/30/02
to
Expect to spend a lot of time or to hire someone to do it. We used loadcepc
and reimplemented the BIOS/DOS services which it uses in other terms,
allowing us to load the nk.bin image from a CompactFLASH card and jump to
it. It took several months to get it right, though.

Paul T.

"Jeff Glaum [MS]" <jeffgla@microsoft dot com> wrote in message
news:#kJyLbSqBHA.2452@tkmsftngp03...

Joseph Shu

unread,
Jan 31, 2002, 11:03:48 AM1/31/02
to
Let's confirm my thinking here...
In order to have my PC to be standalone running CE, I have to be able to
transfer the nk.bin to the harddrive (may I ask how? since it's so big and
can't really copy over using a disk, and also since when it boots up using
the ethernet card, it runs CE automatically, so how can I transfer the
nk.bin file?). And then all I have to do is to be able to write the MBR so
that it can load nk.bin? Is that the procedure that has to be done?
Paul, since you said you have tried something like that, is it possible that
you can give me some more hints? Thanks

Joe

"Paul G. Tobey" <pto...@instrument.com> wrote in message
news:OnQQtPbqBHA.2568@tkmsftngp04...

Joseph Shu

unread,
Jan 31, 2002, 11:20:23 AM1/31/02
to
I only have CE 3.0, so I couldn't find the loadcepc source code. Is it
possible to get it somewhere else? Thanks.

Joe


"Jeff Glaum [MS]" <jeffgla@microsoft dot com> wrote in message
news:#kJyLbSqBHA.2452@tkmsftngp03...

John McCabe

unread,
Jan 31, 2002, 12:31:24 PM1/31/02
to
On Thu, 31 Jan 2002 11:03:48 -0500, "Joseph Shu"
<js...@handshakeinteractive.com> wrote:

loadcepc -g nk.bin

will save your platform onto the harddrive.

How you go about getting rid of DOS is another matter - you need a
bootloader. Annasoft do one. You can always just leave loadcepc.exe
and DOS on there and set up your autoexec.bat and config.sys to load
it on bootup.

loadcepc nk.bin

runs the locally stored version.

Paul G. Tobey

unread,
Jan 31, 2002, 12:40:46 PM1/31/02
to
When we were running on a development board, before our own hardware was
complete, we set it up to use a version of LOADCEPC which would run from DOS
and copied the nk.bin file over the network using the DOS device drivers for
the network card. When we were developing our own bootloader which replaced
BIOS, we used Paradigm C++ to make sure that the bootloader was properly
opening and copying the nk.bin from the 'disk' to RAM and getting ready to
jump to it. When we were convinced that we had this part working, we would
just swap ROM chips (bootloader vs. BIOS), to switch between DOS and Windows
CE as the boot system. That is, the steps were:

1. Get LOADCEPC working on DOS-based system to verify that we have a working
Windows CE image. From DOS, it's easy to copy new versions of nk.bin to the
system.

2. Build a bootloader which replaces BIOS to load this known-good Windows CE
image. Since you have only one thing changing at a time, there's little
reason, in this step, to change nk.bin.

Once you have a working Windows CE image, you can use remote networking to
attach to a shared directory on your PC to download a new version of nk.bin
to the device (nk.bin is not in use once CE is running). In our case,
CompactFLASH is the 'disk', so we can pop that thing out of there and use a
$30 USB-based reader/writer to update the OS, if we want, or use a Web
server running on the CE device to upload a new nk.bin, etc., etc.

Paul T.

"Joseph Shu" <js...@handshakeinteractive.com> wrote in message

news:OPxkdDnqBHA.2088@tkmsftngp03...

Paul G. Tobey

unread,
Jan 31, 2002, 12:42:26 PM1/31/02
to
Isn't the loadcepc source code in Platform Builder? It looks to me like it
is, platform/cepc/loadcepc...

Paul T.

"Joseph Shu" <js...@handshakeinteractive.com> wrote in message

news:#hrmuMnqBHA.2560@tkmsftngp04...

Joseph Shu

unread,
Jan 31, 2002, 12:58:35 PM1/31/02
to
I could only find the header file or loadcepc, but all it has is the basic
definition of how the char and int are defined.

Joe

"Paul G. Tobey" <pto...@instrument.com> wrote in message

news:OMQHe6nqBHA.2172@tkmsftngp03...

Joseph Shu

unread,
Jan 31, 2002, 1:01:33 PM1/31/02
to
I'm sorry, but how can the platform knows where to get the nk.bin from? I've
tried to run "loadcepc -g nk.bin", but I got:
WaitForStatus: PPSH disconnected
nk.bin: File(s) not found
and then the command prompt

So what should I do?

Joe
"John McCabe" <john....@emrad.ns.com> wrote in message
news:3c597efc...@news.demon.co.uk...

John McCabe

unread,
Feb 1, 2002, 4:17:55 AM2/1/02
to
>I'm sorry, but how can the platform knows where to get the nk.bin from? I've
>tried to run "loadcepc -g nk.bin", but I got:
>WaitForStatus: PPSH disconnected
>nk.bin: File(s) not found
>and then the command prompt

Ah - I forgot to mention that loadcepc -g nk.bin will get the image
from Platform Builder via the parallel cable, as long as the filename
on your Platform is nk.bin. Also you need to run platform builder with
your platform loaded, select "Build" => "Open Build Release Directory"
then type in

cesh -p cepc

at the command prompt you're given.

I've never done this with Ethernet, but I imagine the cesh command
should be ok if you have the CEPC profile set to use ethernet, and you
make sure the loadcepc command is given a /E:xxxx option.

Try:

loadcepc/? - on your CEPC
cesh/? - in the command prompt got from Build=>Open Build...

for some information, or look in the help, or look at the M$ website
or try looking at old UseNet messages on
http://www.google.com/grphp?hl=en

John McCabe

unread,
Feb 1, 2002, 4:19:46 AM2/1/02
to
On Thu, 31 Jan 2002 13:24:24 -0700, "Paul G. Tobey"
<pto...@instrument.com> wrote:

>platform/cepc/loadcepc contains what looks to me like the source code for
>the whole thing. Maybe you chose not to install it when PB was installed or
>something. I've attached the directory listing from our master build
>machine...

It *is* all available in platform builder (although, as you point out,
it may be an option you can choose not to install). Also so is lots of
help information that could be used to work out how to do this stuff.

The difficult bit is the bootloader as far as I can see, which is why
we haven't bothered with one and just use DOS/loadcepc at the moment.

John McCabe

unread,
Feb 1, 2002, 6:14:25 AM2/1/02
to
>I'm sorry, but how can the platform knows where to get the nk.bin from? I've
>tried to run "loadcepc -g nk.bin", but I got:
>WaitForStatus: PPSH disconnected
>nk.bin: File(s) not found
>and then the command prompt

Ah - I forgot to mention that loadcepc -g nk.bin will get the image

John McCabe

unread,
Feb 1, 2002, 6:14:32 AM2/1/02
to

John McCabe

unread,
Feb 1, 2002, 8:33:23 AM2/1/02
to
On Fri, 01 Feb 2002 09:17:55 GMT, john....@emrad.ns.com (John
McCabe) wrote:

>I've never done this with Ethernet, but I imagine the cesh command
>should be ok if you have the CEPC profile set to use ethernet, and you
>make sure the loadcepc command is given a /E:xxxx option.

Obviously not - if you read the help file properly :-) You can't save
the image if you use the ethernet option, just parallel.

Joseph Shu

unread,
Feb 1, 2002, 9:17:32 AM2/1/02
to
Oops, my bad. I looked into the wrong directory.
Wooh, that's alot of code to just run that loadcepc thing.....hmm, maybe as
John has said, I should just stick with loadcepc for a while, and just
transfer the nk.bin through the parallel port.

So could you guys clear my head a bit, since it's been awhile from when I
took my microcontroller course.....
The nk.bin is an image file that is only for "burning" or "flashing" to a
EEPROM type of chip. So if this file is copied to a hard drive, it still
won't "boot" the machine properly. There are still some extra work to do in
order to transfer this os image to the memory of the PC. Is that right?

I have found out that Annasoft has a package that does all these? Have you
guys heard anything about that? Are they good?

Joe

"Paul G. Tobey" <pto...@instrument.com> wrote in message

news:uhYE$UpqBHA.1880@tkmsftngp07...


> platform/cepc/loadcepc contains what looks to me like the source code for
> the whole thing. Maybe you chose not to install it when PB was installed
or
> something. I've attached the directory listing from our master build
> machine...
>

> Paul T.
>
> "Joseph Shu" <js...@handshakeinteractive.com> wrote in message

> news:#h13mDoqBHA.2368@tkmsftngp03...

John McCabe

unread,
Feb 1, 2002, 10:11:55 AM2/1/02
to
On Fri, 1 Feb 2002 09:17:32 -0500, "Joseph Shu"
<js...@handshakeinteractive.com> wrote:

>The nk.bin is an image file that is only for "burning" or "flashing" to a
>EEPROM type of chip.

Pretty much - yes - you need the image *and* a bootloader. If you
haven't got it, "Building Powerful Platforms With Windows CE" by James
Y Wilson and Aspi Havewala (ISBN: 0-201-61636-X) tells you all about
this.

>So if this file is copied to a hard drive, it still
>won't "boot" the machine properly.

That's right.

>There are still some extra work to do in
>order to transfer this os image to the memory of the PC. Is that right?

Yes - which is where loadcepc comes in. Not only in terms of
transferring the OS into the PC memory, but of configuring the PC IO
Capabilities and so on - this is where MS-DOS is very handy.

>I have found out that Annasoft has a package that does all these? Have you
>guys heard anything about that? Are they good?

The Annasoft Jump Start Kit sounds like quite a good idea to me. We
haven't bought it yet, but you never know. We got this information a
few months ago:

Please review pricing for Jumpstart 3.0 for x86. You may also find
more
information on Jumpstart at our website:
http://www.annatechnology.com/annatech/softWindowsCEF.asp

Priding is as follows:

Jump Start 3.0 for x86

Description: PLK with Complete Jump Start DLK and Launcher

Price: $2,495
No Run-time license required if customer purchases Windows CE
licenses from Annasoft

Product Number: PLK300C

Package: Includes Binaries only for Jump Start, CE
Launcher,
C&T VDK, and Install Shield
______________________________________________

Run-time licenses:
Qty Cost
1-99 $6
100-999 $4
1000-2499 $3

Unlimited $2500


0 new messages