All Forums
 Microsoft Windows CE
 General CE
 Restarting
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

Consultpinnacle

29 Posts

Posted - 18 Nov 2004 :  04:25:03  Show Profile  Email Poster
Our developers are calling an application called Restart.exe that resides in the Windows folder of the wince 4.2 build provided from ADS.

I am worried about using this restart.exe as I believe it is not doing a full restart and any RAM resident objects will still persist - and over time this will lead to memory leaks.

How do we call a 'real' restart programatically - i.e. equivelant of pressing the reset button.

Thanks

Graham

akidder

1519 Posts

Posted - 18 Nov 2004 :  08:10:39  Show Profile  Email Poster
Thanks for your note. You shouldn't have to worry about memory leaks in the OS accumulating over time (if so, that's ADS or Microsoft's problem to fix!). If you have concerns about the integrity of your application, you might consider buying Entrek's CodeSnitch, which is a very cost-effective tool for sniffing out a variety of code trouble spots.

That said, if your application can handle a cold boot, all the better. You can effect a cold boot by triggering the watchdog timer. This forces a hardware reset on the CPU. CE sample code is posted at topic 726.
Go to Top of Page

Consultpinnacle

29 Posts

Posted - 21 Nov 2004 :  13:04:34  Show Profile  Email Poster
Thanks Drew.

A few comments from our development team...

Quote: “Note: The above project is an eVC 3.0 project. Since it uses MFC, and since the MFC library names changed from CE 3.0 to CE 4.x, you will have to create a new project with eVC 4.0 to generate a binary compatible with CE 4.x.”

To understand the code behind WatchDog Timer, to create a new project with eVC 4.0 – embedded Visual C++ (which we don’t have the compiler), and to make the binary compatible with CE 4.x might be a too much for us to handle within the next few days.

Is it possible for ADS to do this for us?, since you have the experience in doing this, whilst understanding the ‘dos’ and ‘don’ts. I think it might be risky for us to compile something as low level as this at this stage of the game. (i.e. provide us with an app called FullRestart.exe?)

Thanks

Graham

Go to Top of Page

akidder

1519 Posts

Posted - 22 Nov 2004 :  08:14:52  Show Profile  Email Poster
Yeah, I know what you mean about MFC applications. They add complexity when trying to illustrate simple concepts. Did you try the exe files in the download to see how the reset works?

For your application, you need only do three things to perform the hard reset with the watchdog:
  1. Make sure the watchdog timer constant is set for the XScale value.

  2. Include the watchdog timer class in your application project.

  3. Add a line like the following at the point in your app where you want the system to reset:

      WatchDog *wd = new WatchDog(1); // reset system in 1 second


That's it. The system will perform a hard reset when the watchdog times out in a few milliseconds.

Your suggestion to create a separate application for a cold boot is a good one, and we'll see about putting one together. However, your application should be the one to do this when it's appropriate.

Let us know how this works for you.


Edited by akidder 22-Nov-2004: Correct timing call for watchdog. Parameter is in seconds, not milliseconds.
Go to Top of Page

akidder

1519 Posts

Posted - 22 Nov 2004 :  19:12:41  Show Profile  Email Poster
Sample app created. Take a look at topic 726 for the app and source code.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.01 seconds. Snitz Forums 2000