Friday, October 23, 2009

Thursday, October 22, 2009

What is the difference between *.nb0 and *.bin(nk.nb0 or nk.bin) !!! [WinCE]

Whenever we run the command romimage with one of the bib file like ce.bib then we get two images.
  1. nk.nb0 ( in case of ce.bib but name can vary like sam.nb0 depending on the target image name you want)
  2. nk.bin
So what is the difference between these two -

In case of .bin file, the following stuffs getting added one by one -

1. Image hdr "B000FF"

2. Image start address and image size.

3. Now make entry of dll/files under module sections.

4. Make entry for dll/files under FILES section in  bib file here( ce.bib) in nk.bin with proper offset and entry point with allignment.

5. Allocate the space for rom header but that will be filled later after toc and other stuff. And as all information related to toc and other stuff will be ready after build process hence we will fill it after build process.

6. Now make entry in TOC about all dll.

7. Now wrtite the toc information into kernel which is available for TOC entry.

8. Write ROM Signature with it's offset.

8. Next all xip or files get entered into files. Hence depending on the need only the size of the file grows. Not like the nknb0 which takes all space allocated to OS.

Now lets give a look at nk.nb0 -
1. There no compression or ToC in nk.nb0. So it does not require support to get executed. The nk.nb0 can execute on self.
2. It's size can be determine from config.bib by getting the size of OS size. If the image is lesser then also it will consume the whole space and filled the rest of the area with zero.

This apply to both nk.nb0 or any type of .nb0.

I am planning to add more stuff here related to differences.

Tuesday, October 20, 2009

A thought!!! [WinCE]

I was thinking about WinCE once. How can any improvement is possible in WinCE. I thought one part. Basically this part can be implemented by OEM as well but because of the special attribute of Microsoft to make OEM less worried about writing code and after that also they should get better performance by the WinCE compare to other competitive company.

Here I am going to suggest Microsoft that include DMA as native driver. These days every OEM always use DMA controller to do most of their transfer stuff and there is sort of standard in it too.Using those feature they can ask users to just fill some of their prototype and get the best DMA driver of it.

In the driver, even there can implement fuzzy logic which will increase the performance of the WinCE. As everybody know he benefit of fuzzy but many of coder don't use this technique as it is some what complex because it will affect RAM performance too. I guess MS can do it.

Saturday, October 17, 2009

What should be prefix name? [WinCE]

One day, I was writing a sample driver. In the registry file platform.reg, while making entry for my sample driver, by mistake, I used S8M as prefix and it works fine.
I was surprised. Because I referred the link http://msdn.microsoft.com/en-us/library/aa447463.aspx
Which clearly says that "When you implement the stream interface, you designate the three-letter prefix. It can be any three letters, although you should use a common prefix, if your driver is the same class of device as other drivers".

It means it should not support other type of prefix.But it does. Just by seeing at the logic, I think that is correct way as other name like SM8 or 8SM does not work.
I am thinking whether it is wrong or write. But logically I agree this bug or wrong logic is correct but at the same time, MS should clearify in the same in their msdn part too. I think the time has come when people rely on article to resolve their problem. At this time it is must.
I would like everybody to share their reason to support or not support.

Thursday, October 15, 2009

How to remove all prints from WinCE Image!!! [WinCE]

It is a common practice to remove all prints from the image which is going to ship to customer.

Now, depending on the requirement you can disable prints.
 Like, if you want to disable debugmsg and retailmsg, then set WINCE_SHIP=1. It does not mean that it will work for other OAL prints related funtion. But if you want that there should not be any prints at all then, you need to disable com port itself.

You need to check function OEMWriteDebugByte, which is taking care of debug port.