Tuesday, 1 December 2009

Bit Twiddling for Dummies

Ever been annoyed by number conversion?

May be it's time to look at this tiny tool. During the last years it has evolved from a simple hex-dec converter to a quite powerful gadget. And depart from cooking and dishwashing you can use it for your everyday twiddling.




Here are some screen shots:


You can select a file which describes bits of a 32 bit value. The list view at the right side shows the status of the bits or bit masks.


Load a identifier-value list (here "VK_xx.lst") and simply select one of the defined values in the drop down list below. The value controls will be updated immediately - naturally

Convinced? You can download a setup executable or the standalone executable from http://cid-0eb8b2026ec93d96.skydrive.live.com/browse.aspx/.Public/BitTwiddler

or

BitFummler, Download bei heise

Oh, something I forgot to mention (one of my colleagues uses BitTwiddler since 2003 and didn't know :-) : In the bottom edit control you can enter c-like syntax, with variables 'a'-'z' where 'x' is the currently displayed value. The c-parser supports for/while/if/else statement, all c (?) operators (except pre-increment/-decrement etc.).

And if you want to monitor a value displayed in another applications control window just click the "Monitor" button and move the top of the arrow to the control.

Try it and have fun :-)

Read more! Post this to a friend!

Thursday, 26 November 2009

Microsoft Embedded Roadshow 2009

Ende November / Anfangs Dezember findet die Microsoft Embedded Roadshow - präsentiert von Elbacom - in verschiedenen Städten in der Schweiz statt.

Diese halbtägige Veranstaltung richtet sich an Entwicklungsleiter, Entwickler und Entscheider, die sich einen aktuellen Überblick über das Produkt Portfolio von Microsoft Embedded verschaffen wollen. Zusätzliche Informationen über technologische Neuheiten und Markttendenzen für den Embedded und Industriellen Markt runden diese Informationsveranstaltung ab.

Weitere Informationen finden Sie unter: http://www.embeddedroadshow.ch/

So long and thanks for all the fish!
Read more! Post this to a friend!

Wednesday, 25 November 2009

Enable wMMX2 for XScale

Hello,

if you need the wMMX2 Instruction Set for your XScale processor in your assembler code, add the following line in your sources file .

ADEFINES=$(ADEFINES) -cpu XSCALE

bye
Read more! Post this to a friend!

Missing QFE Links for September and October 2009

I was in the Embedded Chat yesterday wanting to get some further information on an L2 Cache issue addressed in one of the recent QFE's for Windows CE 6.0 - that's right recent; to be exact it was addressed in the October Update.

Unfortunately Microsoft seems to have problems with updating their Download Site as the most recent download you can find there is the August 2009 Update.

You can find the September 2009 Update here
and
the October Update here.

So long and thanks for all the fish!
Read more! Post this to a friend!

SPS / IPC / Drives Impressions

Hi folks,

Here are a couple of impressions from the Microsoft booth (Hall 7a-150) where EB has a Partner Pod.

Just come on by!


Have fun!
Read more! Post this to a friend!

Transcript from yesterdays Windows Embedded CE Live Chat

Hi folks,

Read more to see the transcript form yesterdays Windows Embedded CE Live Chat where you could ask the experts:

Current chat room activity:
More Answers...
msft_davbo (Moderator): Our chat today covers the topic of Windows Embedded CE!

1. This chat will last for one hour. During this hour, our Experts will respond to as many questions as they can. Please understand that there may be some questions we cannot respond to due to lack of information or because the information is not yet public.

2. We encourage you to submit questions for our Experts. To do so, type your questions in the send box, select the “ask the Experts” box and click SEND. Questions sent directly to the Guest Chat room will not be answered by the Experts, but we encourage other community members to assist.

3. We ask that you stay on topic for the duration of the chat. This helps the Guests and Experts follow the conversation more easily. We invite you to ask off topic questions after this chat is over, but not during.

4. Please abide by the Chat Code of Conduct.

--------------------------------------------------------------------------------

msft_davbo (Moderator)[17:59]: We are pleased to welcome our Experts for today’s chat. I will have them introduce themselves now.

Chat will begin in a couple of minutes.

mskim_MSFT (Expert)[18:01]: Hello, this is mskim from Windows CE JDP team.

RajeevDubey[MS] (Expert)[18:01]: Hi, this is Rajeev Dubey, Program Manager for Bluetooth.

mikehall_ms (Moderator)[18:02]: Hi, I'm Mike Hall, Software Architect

Sing Wee [MS] (Expert)[18:05]: Hello, I'm Sing Wee, member of the CoreOS/BSP Test Team.

FBlanq_MSFT (Expert)[18:05]: Hi, I'm Francisco Blanquicet, SDET with CoreOS/WinCE

msft_davbo (Moderator)[18:05]: Chat is started so ask any questions you may have about Windows CE.


rajran[MSFT] (Expert)[18:06]: Hi , I'm Rajeev Rangappa, PM in Core Team

kurtken_msft (Expert)[18:09]:
Q: [1] hi experts, is there any way to provide debug information for assembler files (.s) to the debugger so that i can step through the sources? currently only exported symbols are visible to the debugger

A: As far as I know, the only way to step into and through assembler sources is to either (1) first switch to the 'disassembly' pane of the debugger, then either set a breakpoint on a CPU instruction, or (2) switch to the disassembly view in the source view and "step into" a function call. (bl on ARM, call on X86)

kurtken_msft (Expert)[18:13]:
Q: [6] [1] so there is no way to get debug info for assembler files into the pdb files?

A: What kind of info are you wanting to get into the PDB files? What is missing and what way are you accessing information?

kurtken_msft (Expert)[18:16]:
Q: [11] [6] i know i can step i the disassembler view, but it is somewhat painful without the coments of the sourcefile. So I would like to see and step in the assembler sourcefile while debugging like when debugging c or cpp files

A: ah, so what you're wanting is a mixed assembler/code bytes view. I do not thing our tools currently have such a view for the Windows CE debugger. You would have to open a source code window side-by-side in platform builder to see the comments.

kurtken_msft (Expert)[18:17]:
Q: [12] [6] also local (not exported] labels are not known to the debugger

A: No, unfortunately local assembler labels are not accounted for in the debugging information.

kurtken_msft (Expert)[18:18]:
Q: [13] [11] well thats the way i spend most of my time

A: We can give this feedback to our tool chain developers. Thanks for the input.

mskim_MSFT (Expert)[18:22]:
Q: [15] XAML + Other Windows: I have an MFC app which contains window based user draw controls (caches and draws bitmaps and overlays data on them). I want to update the UI to use XAML. How can I embed some of these existing controls in the XAML app?

A: Here is MSDN link regarding Win32Control in Silverlight for Windows Embedded.

mskim_MSFT (Expert)[18:23]:
A: http://msdn.microsoft.com/en-us/library/ee502772.aspx

mskim_MSFT (Expert)[18:24]:
Q: [15] XAML + Other Windows: I have an MFC app which contains window based user draw controls (caches and draws bitmaps and overlays data on them). I want to update the UI to use XAML. How can I embed some of these existing controls in the XAML app?

A: Yes, you can use Win32Control in Silverlight for Windows Embedded. Here is the link on msdn regarding Win32Contro. http://msdn.microsoft.com/en-us/library/ee502772.aspx

Travis Hobrla [MS] (Expert)[18:25]:
Q: [2] hi experts, i have integrated lint in the build prrocess. to see the output i have used the build_markers for C files, so they are also shown as c files in the summary. is there any way to show them with the "other files", in other words which build marker

A: Drivers should get notifications when suspend is happening if there's a driver that's not responding to a notification properly (in this case the driver for the RAM file system), you can definitely expect resource leaks or other bad behavior. Since this problem occurs only after a few suspends/resumes, I suspect that a very large amount of memory is being leaked - much more than the size of the file you're opening and closing. To debug this, I think you will want to instrument your app. As a next step, can you track the available object store space in your thread and try to understand more deeply how the memory is being used? See GetStoreInformation (http://msdn.microsoft.com/en-us/library/aa916952.aspx). After that, it may be worthwhile to turn on DEBUGZONEs in filesys.dll to see if there are any useful messages that can help you understand the situation.

Travis Hobrla [MS] (Expert)[18:25]: Ack

Travis Hobrla [MS] (Expert)[18:25]: Answered the wrong question, one moment!

Travis Hobrla [MS] (Expert)[18:26]:
Q: [10] I'm creating the file in RAMFS, and I don't believe my thread can have any leak considering it's just opening and closing the same file. Do you have any idea what could go wrong ? Thank you.

A: Drivers should get notifications when suspend is happening if there's a driver that's not responding to a notification properly (in this case the driver for the RAM file system), you can definitely expect resource leaks or other bad behavior. Since this problem occurs only after a few suspends/resumes, I suspect that a very large amount of memory is being leaked - much more than the size of the file you're opening and closing. To debug this, I think you will want to instrument your app. As a next step, can you track the available object store space in your thread and try to understand more deeply how the memory is being used? See GetStoreInformation (http://msdn.microsoft.com/en-us/library/aa916952.aspx). After that, it may be worthwhile to turn on DEBUGZONEs in filesys.dll to see if there are any useful messages that can help you understand the situation.

Sing Wee [MS] (Expert)[18:26]:
Q: [13] [11] well thats the way i spend most of my time

A: I just tried something similar to this. In a debug build, I break into my C code, and go to disassembly view. I see the assembly code inline with my C code and my comments, so I would expect you should be able to see your assembly code inline with your comments as well.

mskim_MSFT (Expert)[18:26]:
Q: [16] XAML + Other Windows: Effectively I want to skin the current app using XAML. Maybe there are some examples shipped with R3?

A: In R3, there is a IEsample_exr in public\ie\oak you can reference. How to skin the existing application with Silverlight for Windows Embedded.

Travis Hobrla [MS] (Expert)[18:27]: @winceLover: use "Ask the Experts"

Travis Hobrla [MS] (Expert)[18:29]:
Q: [18] hi experts, is there an easy way to enable debug zones in advance for dlls that haven't been loaded yet? Some dlls only get loaded while an application is running and by the time I get to click on Target->CE Debug Zones-> it's already too late

A: I would recommend the "Host side (desktop) registry" method outlined here: http://blogs.msdn.com/ce_base/archive/2006/12/18/debug-messages-and-debug-zones-in-windows-ce.aspx

Travis Hobrla [MS] (Expert)[18:32]:
Q: [20] [10] - I will try to track the memory used in my thread more thoroughly. It's too bad I can't use KITL at that point as I'm doing suspend/resumes tests. So Travis, you're saying that there might be a leak in the RAM file system (which is public code) ?

A: It's certainly possible, but there is more investigation which is required before you can be sure.

Travis Hobrla [MS] (Expert)[18:33]:
Q: [19] Sing Wee [13] well that doesn't work for assembler files, at least in my environment, although I have to say I use trace32 vom lauterbach most of the time. But this is the behaviour i would wish for .s files.

A: It's a good feature request for the tools but I don't think we have any support for it right now. Sorry!

Travis Hobrla [MS] (Expert)[18:37]:
Q: [17] hi experts, is there a way to put additional items to the clean target without modifying makefile.def?

A: I believe the only way is during the WINCETARGETFILES or WINCETARGETFILES0 phase, you could completely override the clean rule in your own makefile.inc.

Sing Wee [MS] (Expert)[18:38]:
Q: [20] [10] - I will try to track the memory used in my thread more thoroughly. It's too bad I can't use KITL at that point as I'm doing suspend/resumes tests. So Travis, you're saying that there might be a leak in the RAM file system (which is public code) ?

A: I haven't tried this over suspend/resume cycles, but have you by any chance tried using AppVerifier to see if you can catch where memory may be leaking from?

Sing Wee [MS] (Expert)[18:39]:
Q: [23] Sing Wee [19] well, perhaps there are not much assembler junkies out there , thank you any way

A: No worries. Out of curiosity, are you doing this in CE6 or CE5? My observations were based on CE6.

msft_davbo (Moderator)[18:40]:
Q: [22] We need to give camera data to the appln for displaying it on the WINCE 6.0 device LCD or we need to send the camera frames to the device USB video class for displaying at the desktop PC app.IS both my requirement will be acheived by DSHOW camera driver?

A: Yes DirectShow is the best place to build your camera application. Check Mike Hall's blog for a USB Camera Driver download http://blogs.msdn.com/mikehall/archive/2007/06/07/download-ce-6-0-usb-camera-driver.aspx. This driver allows you to pull in frames into DirectShow from a USB attached camera on Windows CE. For communicating to a Desktop you'd need to build a custom communication sink filter to send the frames from Windows CE to a corresponding custom source filter on the Desktop. If interested can post a sample on codeplex w/ details on setting up the filters send email to davbo@microsoft.com.

kurtken_msft (Expert)[18:40]:
Q: [21] What is the best way to setup a filesystem storing hive registry ? In our system, the SD card will be the storage holding it. Should we setup the SD card as MountPermanent, and are there other registry keys worth setting ?

A: Is the SD card fixed in place in your unit? If so, you should be safe to mount the card permanently. Also, make sure it is set to mount at boot time. For reference, examine some existing drivers that use persistent store for their registry

mskim_MSFT (Expert)[18:40]:
Q: Prabu, what's UVC stack?

ks [MS] (Expert)[18:40]:
Q: [20] [10] - I will try to track the memory used in my thread more thoroughly. It's too bad I can't use KITL at that point as I'm doing suspend/resumes tests. So Travis, you're saying that there might be a leak in the RAM file system (which is public code) ?

A: And which public code RAMFS driver are you using? The RAMDISK, RAMFMD or?

Travis Hobrla [MS] (Expert)[18:41]:
Q: [21] What is the best way to setup a filesystem storing hive registry ? In our system, the SD card will be the storage holding it. Should we setup the SD card as MountPermanent, and are there other registry keys worth setting ?

A: In addition to what Kurt said, http://msdn.microsoft.com/en-us/library/aa914710.aspx gives you a good introduction. Basically you need to make sure the registry for your SD driver is wrapped in ;HIVE BOOT SECTION tags, as well as anything that driver depends on, so that it can get loaded in phase 0.

Sing Wee [MS] (Expert)[18:44]:
Q: [27] Sing Wee [23] i am doing CE6, porting to a OMAP platform, currently working on the bootloader, but work is proceeded to jump to BootloaderMain

A: Understood - thanks.

Sing Wee [MS] (Expert)[18:47]:
Q: [26] [20] Sing Wee : I haven't tried using AppVerifier, does it support well checking leaks while suspending/resuming the system ?

A: That's the part I haven't tried. AppVerifier keeps track of memory by monitoring calls to allocate/deallocate memory on processes/DLLs you point it at. *If* it works over suspend/resume, the checkpoint/delta feature might help you narrow down the problem more quickly. I'm having difficulty finding my original posting, but a copy of it has apparently made it here: http://www.pocketpcjunkies.com/Uwe/Forum.aspx/wince-test/481/Can-app-verifier-detect-memory-leak-in-a-driver

Travis Hobrla [MS] (Expert)[18:49]:
Q: [28] [21] - yes, this is setup correctly and works fine, until going to suspend/resume, where the SD gets unmounted and remounted. My question is : should we absolutely keep the power on to the SD card (it's never removed), and set it as MountPermanent ?

A: You should be able to call RegFlushKey (http://msdn.microsoft.com/en-us/library/aa917036.aspx) during your power-down code and unmount / remount.

msft_davbo (Moderator)[18:49]:
Q: [24] Using DSHOW layer can we give the camera frames to the client UVC stack?

A: Is you question about around if you have a Windows CE Web Camera and plug into a Desktop Machine how to provide the frames from Windows CE to the Desktop UVC Stack? Desktop MSDN info for UVC Stack http://msdn.microsoft.com/en-us/library/ee349147.aspx.

ks [MS] (Expert)[18:50]:
Q: [28] [21] - yes, this is setup correctly and works fine, until going to suspend/resume, where the SD gets unmounted and remounted. My question is : should we absolutely keep the power on to the SD card (it's never removed), and set it as MountPermanent ?

A: In addtion to keep the power (or handle the power cycle correctly), MountPermanent , you SD Host controller driver should never simulate a card replug after suspend/resume.

Travis Hobrla [MS] (Expert)[18:51]:
Q: [30] Travis [17] I am not sure if i understand you right, the WINCETARGETFILES targets are executed after building so not really good for cleaning, WINCETARGETFILE0 are executed before compiling, but what if only the clean target is performed?

A: Do you mean by calling 'nmake clean' ?

Travis Hobrla [MS] (Expert)[18:53]:
Q: [33] Travis [17] yes, for example, or clicking Build - Clean in VS2005

A: Unforunately I don't think there is a way to handle 'nmake clean' without modifying makefile.def. Build - Clean I believe executes "build -c" which would execute the WINCETARGETFILES0 pass - you could do cleanup at that point, before things get compiled.

Travis Hobrla [MS] (Expert)[18:56]:
Q: [34] Travis [33] ok, are there "best practices" for modifying makefile.def?

A: The 'best practice' is to make a backup, change as little as possible, and do so at your own risk! What exactly are you trying to accomplish?

Sing Wee [MS] (Expert)[18:56]:
Q: [31, 29] Can you point me to the KB entry or tell us what exactly has to be adapted in the OAL Cache routine?
In a previous QFE adressing the L2 cache it is documented that one has to adapt the OAL Cache routines. To found out how we were hoping for more information from the KB entry which however does not seem to exist. Question following.

A: Title: FIX: Kernel does not properly handle BSPs that distinguish between L1 and L2 cache flushing in Windows Embedded CE 6.0.

Symptoms:
A performance problem was found in Cortex-A8 based processors due to excessive PSL API call overhead caused by unnecessary L2 cache flush operations.

With the code changes included in this QFE, the kernel now maintains proper L2 cache coherence so that the system can benefit from performance enhancements obtained by separating L1/L2 cache flushing in the OAL. To take advantage of this performance improvement, the OAL should be modified to flush L1 and L2 cache only when necessary.

This QFE may also address L2 caching issues in other CPU architectures whose OEMCacheRangeFlush implementations properly respect L2 cache flags:
• CACHE_SYNC_WRITEBACK: write back L1 data cache to L2 data cache
• CACHE_SYNC_DISCARD: write back L1 data cache to L2 data cache and discard L1 data cache
• CACHE_SYNC_L2_WRITEBACK: write back L2 data cache to memory
• CACHE_SYNC_L2_DISCARD: write

msft_davbo (Moderator)[18:57]:
Q: [32] Multiple Displays: One of our projects requires two displays with independent content. Under CE6 is it possible using direct show to display different media (ie. different videos) on each of the display and two channels of Audio? We will write custom app.

A: Check out Microsoft Embedded Automotive who has support for up to 10 zones of AV content: http://www.microsoft.com/auto/ma.mspx. Typically they are just using 1-2 zones for front and rear AV zone control in the vehicle.

Sing Wee [MS] (Expert)[18:57]:
Q: [31] Can you point me to the KB entry or tell us what exactly has to be adapted in the OAL Cache routine?

A: Damian, can you please send me your email in a private message? I'll see if I can dig up the KB number for you.

Sing Wee [MS] (Expert)[18:58]:
Q: [31] Can you point me to the KB entry or tell us what exactly has to be adapted in the OAL Cache routine?

A: Looks like there was a limit to how much I could put in my response. Here's the final line in it's entirety:
• CACHE_SYNC_L2_DISCARD: write back L2 data cache to memory and discard L2 data cache

Travis Hobrla [MS] (Expert)[18:59]:
Q: [35] Travis [33] i am integrating lint, doxygen and some other tools (see previous question about build marker). so there are some non standard files to clean

A: I see. Well, the clean rules in makefile.def are pretty straightforward, so you should be able to alter them without affecting too much. I'd recommend adding a 'cleanlint' target to the clean rule, and implementing that.

ks [MS] (Expert)[18:59]:
Q: [31] Can you point me to the KB entry or tell us what exactly has to be adapted in the OAL Cache routine?

A: Basically, the OAL's OEMCacheRangeFlush implmentation needs to follow the guideline in http://msdn.microsoft.com/en-us/library/ee478186.aspx

msft_davbo (Moderator)[19:00]: Hello everyone, we are just about out of time.

Thank you for joining us for our Windows Embedded CE 6.0 chat today!

A special thank you to the product group members for coming out.

The transcript of today’s chat will be posted online as soon as possible. We’ll see you again for another chat next month.

If you still have unanswered questions, let me suggest that you post them on one of our newsgroups on http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?guid=a36dcdca-1116-4471-a19a-5eb263323e93

-Windows Embedded CE 6.0 R3 Now Available!


You can also find the transcripts from the October chat here and the September chat here - Microsoft is lagging behind getting these online.

Older chat transcripts can be found here.

Have fun!
Read more! Post this to a friend!

Monday, 23 November 2009

The fastest way to activate COMPILE_DEBUG=1


...is simply to select it in the menu. Look!
Huuuh? Your platform builder doesn't offer this option? What a shame! Okay, let's tune it up with a small add in! It won’t hurt – and besides, I already did the work: Please find it here.
I provide it with source code, therefore one appeal: Feel free to modify and improve it, but please share it with us and leave a comment where we’ll find it. Thanks! Also drop me a line if you find it useful at all, then I’ll think about more...

I also added shortcuts to open the release directory, reginit.ini and ce.bib...

One remark: "Compile as debug" is set globally in Visual Studio, so deactivate it before you do a blddemo.


Enjoy it!
Stefan

Background: COMPILE_DEBUG

This macro definition specifies that Build.exe must pass debug macro definitions to the linker and compiler even if WINCEDEBUG is set to retail. If COMPILE_DEBUG is set when WINCEDEBUG is set to retail, the libraries linked are the release libraries.

http://msdn.microsoft.com/en-us/library/ee478748.aspx



Read more! Post this to a friend!