Windows Embedded Cookbook
Valter Minute's blog
February 2009 Entries
Windows Embedded Seminars in Rome
I'll be attending the Windows Embedded seminar in Rome this week (25-26th of February).
If you want to learn something new about Windows Embedded technologies and have a chance to test the tools during hands-on labs, this two days seminar is a very good opportunity.
If you want to attend the seminar you can still register at this page:
As you can see from the agenda I'll talk about Windows CE (showing some cool demos) on the first day and I'll do the hands-on labs on the following day.
I hope to post some material from the demo here soon.
I'm also happy to announce that
Fortech Embedded Labs
is a partner of this event and, thanks to my colleagues and our customers, is now a Windows Embedded Silver partner.
Share This Post:
Saturday, February 21, 2009 1:56 PM
Risotto pancetta, cipolle e vino rosso
Italian cooking is known for its pasta recipes, but in the part of Italy where I live (north-west) many recipes use rice instead of pasta.
This is a simple but tasty way to prepare it. It's a traditional recipe that use simple and cheap ingredients to add taste to rice.
Ingredients (for 4 people):
- 360g rice (the kind of rice I like more for this kind of risotto is "carnaroli")
- one large onion
- 300g sweet beacon (not smoked is better)
- two glasses of red wine (the best thing is to use the same wine you'll drink during the meal)
- 3lt vegetable broth
- grated parmigiano reggiano (parmesan) cheese
- olive oil, pepper.
Cut the onion in small pieces and put it inside a pot with a spoon of olive oil (many people prefer to use butter for risotto, try both kinds and tell me which one you like more) and let it fry.
Add the beacon cut in small pieces and cook it until it became transparent.
In the meantime, in another pot, heat the vegetable broth.
Add the rice and let it toast for one minute with bacon and onions.
Then add the wine and let it evaporate.
Now add some broth (don't cover the rice with water, just add a glass or two of broth to let it cook without sticking to the pot) and start to turn the mixture with a wood spoon (you can use also a plastic spoon... but wood sound more "traditional" for this recipe). Keep adding broth a glass a time until the rice is well cooked (10-15 minutes).
Remove the pot from the fire and add the grated parmesan (a spoon or two for each person) and mix the rice until the cheese melts.
Serve it hot and enjoy.
Share This Post:
Wednesday, February 4, 2009 9:44 PM
Debug Zones Blues
If you develop drivers in Windows CE you should know debug zones very well.
If you don't, you should read
article on the Windows CE base team blog, and promise that you'll never ever return an error code from your driver interface functions without adding a DEBUGMSG call! This will allow other poor developers working with your driver to understand what happened in a format less cryptic than a 32 bit integer!
Using debug zones is also a great way to document what's happening inside your code, print out status changes, hardware-related events etc.
Debug zones magically disappear in release and ship builds (in release you'll keep RETAILMSG calls, that should be used only for fatal errors), can be filtered using debug zones windows inside PB or registry settings (also detailed in the linked article), and debug zones that are not enabled won't impact much on your code performances.
Most of Windows CE modules came with debug zones and enabling them could be a good way to understand what's going wrong inside a specific component.
If your module is loaded by the OS and you have to enable debug zones at runtime you can open the Target\Debug zones dialog, select your module and enable the zones that you think may provide useful information.
But what you can do if the module is loaded briefly and then immediately unloaded (a driver that cannot be initialized, for example)?
If you have source code for that module, a simple search for DBGPARAM inside the code should find the declaration of debug zones.
The first parameter of the DBGPARAM structure is the name that the module uses to register its debug zones.
Using this name to create a dword entry under HKLM\DebugZones on the device or
HKEY_CURRENT_USER\Pegasus\Zones on your PC will allow you to enable zones before the module is loaded, and then read its debug output when the module is loaded/unloaded.
And what do you can do if you have only a binary module?
You can read the documentation. Everybody put his own module debug name in the doc, isn't it?
If you are not so lucky, you can still load that module yourself to access its debug information.
How can you do that?
Simply call LoadLibrary on it.
If it's a user mode DLL you can create a very simple executable that loads the module and stops there (showing a message box on an interactive device, for example). If it's a kernel mode DLL or driver you can still load it from your "dummy" application if it's not in the os image (not included with the "K" flag) and does not reference kernel-mode only APIs. If you can't load it in user mode, you can put your LoadLibrary call temporary inside the init function of another kernel mode driver.
If LoadLibrary fails you have a good int about why the module is not working. It may need some additional DLLs or some components to be added to your OS image.
Copy the module to your %_FLATRELEASEDIR% and open it using
It will show any missing DLL and any entry point that is expected by your module inside one of the existing DLLs.
If LoadLibrary succeeded, your module is loaded and you can see it and its debug zones inside the debug zones window, but this window does not show the module's debug name (that may be a suggestion for the PB development team...).
To find it
you should use the Target Control window.
Inside the debug shell you can use the:
command to list all loaded modules. Each module has a module id (number).
You can find the id of your module and then use the
zo M <id>
command to display its information.
Now you have your module name and you can create your registry keys and find what's wrong with that driver.
Share This Post:
Wednesday, February 4, 2009 2:00 PM
Cookies in Use
June 2015 (1)
December 2014 (1)
August 2014 (1)
July 2014 (1)
October 2013 (1)
July 2013 (1)
January 2013 (2)
December 2012 (2)
September 2012 (1)
June 2012 (2)
May 2012 (1)
December 2011 (2)
November 2011 (3)
September 2011 (2)
August 2011 (1)
June 2011 (1)
March 2011 (1)
February 2011 (1)
January 2011 (1)
December 2010 (2)
November 2010 (1)
August 2010 (2)
July 2010 (2)
June 2010 (2)
May 2010 (5)
April 2010 (1)
March 2010 (7)
February 2010 (3)
January 2010 (1)
November 2009 (3)
October 2009 (3)
September 2009 (4)
July 2009 (2)
June 2009 (1)
May 2009 (2)
April 2009 (1)
March 2009 (3)
February 2009 (3)
January 2009 (5)
CG & DSL
Toradex Developer's Website
Toradex Main Website
"Windows Embedded Compact 7"
"Windows Embedded Compact 7" "Silverlight for Windows Embedded"
Silverlight for Windows Embedded
Windows Embedded Compact 7
Copyright © 2005 Valter Minute
This work is licensed under a
Creative Commons License