Hi!

I have developed an image that suites my needs and I am gonna start
developing a driver. The image is pretty large (~20MB) and takes about five
minutes to download.

Is there any way to develop the driver in PB, download it (I can do that
manually with e.g. ActiveSync, it's not a problem) but I want to be able to
debug it using the kernel debugger.

My question in short is: it takes a long while to download the whole image
so can I just download and debug a driver using PB?

Re: Use Platform Builder as debugger by Norman

Norman
Mon Jun 19 08:46:00 CDT 2006

If you build a debug image with KITL - exclude your driver, download it
once and burn it to flash make sure it boots ok. Everytime the unit
trys to load the driver it will not find it and check via KITL for a
copy. Your PC should have the driver (as well as the PDB files), and
the OS will load the driver over KITL. This should speed up the
download since you OS doesn't change between boots.

--
I hope this helps

--
Norman Rericha
Senior Software Engineer
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member



Re: Use Platform Builder as debugger by Henrik

Henrik
Mon Jun 19 08:59:40 CDT 2006

First of all, 5 minutes sounds extraordinalrily slow, atleast if you're
using ethernet as transport. You're not by any chanse using a debug
built bootloader?

Anyway: yes you can develop a driver without having to download the
entire image for every change. I assume you have a working kitl
connection up and running:

First of all a good thing is to be able to load the driver dll over
relfsd (the "release" directory), so ensure you have this up and
running (this gives your device direct access to all files under your
platform project's falat release directory).

Second, you want the CE loader to load the driver from your flatrelease
directory rather than from your OS image's windows directory. This you
can do by setting up the module (driver dll) as a release directory
module (under menu Target->Release Directory Modules). This enures the
specified dll will be loaded from the flat release directory
("release"), which is handy since that's where your driver output dll
will end up everytime you do a "build project".

The thirt part of the equation may involve a (little) bit of extra work
depending on the driver. To be able to work effectively with the driver
in the release directory you need a mechanism to load and unload the
driver on command or else you won't be able to reload the new version
of the driver (in fact you won't be able to build the project if the
driver is loaded through the release driectory sincce the file is in
use). If it's a PnP driver, you might get away with simply unplug
whatever hardware you're driver interfaces for it to unload. Otherwise,
you need to write a small utility that can load and unload the driver
programatically.

Henrik Viklund
http://www.addlogic.se

Fredrik Jansson wrote:
> Hi!
>
> I have developed an image that suites my needs and I am gonna start
> developing a driver. The image is pretty large (~20MB) and takes about five
> minutes to download.
>
> Is there any way to develop the driver in PB, download it (I can do that
> manually with e.g. ActiveSync, it's not a problem) but I want to be able to
> debug it using the kernel debugger.
>
> My question in short is: it takes a long while to download the whole image
> so can I just download and debug a driver using PB?


Re: Use Platform Builder as debugger by Fredrik

Fredrik
Mon Jun 19 09:05:19 CDT 2006

Norman, thanks for your answer.

Just to clarify (I am newbie with PB), if the registry settings exist for a
driver but the actual dll is missing: KITL will try to download it?

Does the driver project have to be part of the image and just excluded (how
do you exclude the project if that's the case?)? If not, how do I tell PB
where to find driver, pdb and source?

Thanks!
Fredrik

"Norman Rericha" <Rayogen_dontyou_spam_gmail@thing.com> wrote in message
news:mn.9a4a7d6655ba030d.47749@thing.com...
> If you build a debug image with KITL - exclude your driver, download it
> once and burn it to flash make sure it boots ok. Everytime the unit trys
> to load the driver it will not find it and check via KITL for a copy. Your
> PC should have the driver (as well as the PDB files), and the OS will load
> the driver over KITL. This should speed up the download since you OS
> doesn't change between boots.
>
> --
> I hope this helps
>
> --
> Norman Rericha
> Senior Software Engineer
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
>



Re: Use Platform Builder as debugger by Henrik

Henrik
Mon Jun 19 09:22:26 CDT 2006

The loader has an ordered list of places to search for the dll (among
other things it uses the registry entry "HKEY_LOCAL_MACHINE\Loader").
When KITL and RELFSD is active it will add the "\Release" directory to
the list right after the windows directory.

Personally, I prefer to use the release directory module approach which
has the same effect as excluding the dll alltogether, but do not
physically remove anything from the image and do not tamper with any
.bib files etc. (which you will have to remember to revert before
shipping the image or submitting to the automated build system).

Henrik Viklund
http://www.addlogic.se

Fredrik Jansson wrote:
> Norman, thanks for your answer.
>
> Just to clarify (I am newbie with PB), if the registry settings exist for a
> driver but the actual dll is missing: KITL will try to download it?
>
> Does the driver project have to be part of the image and just excluded (how
> do you exclude the project if that's the case?)? If not, how do I tell PB
> where to find driver, pdb and source?
>
> Thanks!
> Fredrik
>
> "Norman Rericha" <Rayogen_dontyou_spam_gmail@thing.com> wrote in message
> news:mn.9a4a7d6655ba030d.47749@thing.com...
> > If you build a debug image with KITL - exclude your driver, download it
> > once and burn it to flash make sure it boots ok. Everytime the unit trys
> > to load the driver it will not find it and check via KITL for a copy. Your
> > PC should have the driver (as well as the PDB files), and the OS will load
> > the driver over KITL. This should speed up the download since you OS
> > doesn't change between boots.
> >
> > --
> > I hope this helps
> >
> > --
> > Norman Rericha
> > Senior Software Engineer
> > Applied Data Systems
> > www.applieddata.net
> > An ISO 9001:2000 Registered Company
> > Microsoft WEP Gold-level Member
> >
> >


Re: Use Platform Builder as debugger by Fredrik

Fredrik
Mon Jun 19 09:52:49 CDT 2006

Yes, five minutes is slow... The platform is a Intel PXA27x Processor
Developers Kit, and I only get ~85KB/s when downloading. On a samsung board
I got ~250KB/s... I haven't been able to figure out the problem is here.

Thanks for all your idéas!

Best regards,
Fredrik


"Henrik Viklund" <henrik.viklund@gmail.com> wrote in message
news:1150725580.609419.90910@c74g2000cwc.googlegroups.com...
> First of all, 5 minutes sounds extraordinalrily slow, atleast if you're
> using ethernet as transport. You're not by any chanse using a debug
> built bootloader?
>
> Anyway: yes you can develop a driver without having to download the
> entire image for every change. I assume you have a working kitl
> connection up and running:
>
> First of all a good thing is to be able to load the driver dll over
> relfsd (the "release" directory), so ensure you have this up and
> running (this gives your device direct access to all files under your
> platform project's falat release directory).
>
> Second, you want the CE loader to load the driver from your flatrelease
> directory rather than from your OS image's windows directory. This you
> can do by setting up the module (driver dll) as a release directory
> module (under menu Target->Release Directory Modules). This enures the
> specified dll will be loaded from the flat release directory
> ("release"), which is handy since that's where your driver output dll
> will end up everytime you do a "build project".
>
> The thirt part of the equation may involve a (little) bit of extra work
> depending on the driver. To be able to work effectively with the driver
> in the release directory you need a mechanism to load and unload the
> driver on command or else you won't be able to reload the new version
> of the driver (in fact you won't be able to build the project if the
> driver is loaded through the release driectory sincce the file is in
> use). If it's a PnP driver, you might get away with simply unplug
> whatever hardware you're driver interfaces for it to unload. Otherwise,
> you need to write a small utility that can load and unload the driver
> programatically.
>
> Henrik Viklund
> http://www.addlogic.se
>
> Fredrik Jansson wrote:
>> Hi!
>>
>> I have developed an image that suites my needs and I am gonna start
>> developing a driver. The image is pretty large (~20MB) and takes about
>> five
>> minutes to download.
>>
>> Is there any way to develop the driver in PB, download it (I can do that
>> manually with e.g. ActiveSync, it's not a problem) but I want to be able
>> to
>> debug it using the kernel debugger.
>>
>> My question in short is: it takes a long while to download the whole
>> image
>> so can I just download and debug a driver using PB?
>



Re: Use Platform Builder as debugger by Norman

Norman
Mon Jun 19 09:59:03 CDT 2006

Simply put yes. The only issue is that the driver has to reside in the
"FLATRELEASE" directory on your machine. There are a few issues you
need to know however.

1 - You can exclude DLLs by removing them from your Platform.bib.
2 - You can still require the DLL to be loaded through the registry.
3 - Personally I am a command line builder. Therefore I build my source
code manually in the directory I am working. By setting WINCEREL=1 my
code automagically copies to my FLATRELEASE directory.

Remember using this setup is for debugging only. Don't forget to
include the driver in your Platform.bib when you are finished.

--
I hope this helps

--
Norman Rericha
Senior Software Engineer
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member



Re: Use Platform Builder as debugger by Henrik

Henrik
Mon Jun 19 10:18:59 CDT 2006

If we're talking about the same kit (and if i remember correctly), you
should be able to get 600-800kb/s download performance over ethernet.

I definately think you should make sure you're not running a debug
built bootloader. The numbers you say you get correspond pretty closely
to what you can expect from a debug guilt bootloader.

Also, you'll see a huge performace degredation if you're downloading
images that are stored and run directly from flash. However, since I
don't think that's supported out of the box for that kit, that's
_probably_ not the case.

Henrik Viklund
http://www.addlogic.se

Fredrik Jansson wrote:
> Yes, five minutes is slow... The platform is a Intel PXA27x Processor
> Developers Kit, and I only get ~85KB/s when downloading. On a samsung boa=
rd
> I got ~250KB/s... I haven't been able to figure out the problem is here.
>
> Thanks for all your id=E9as!
>
> Best regards,
> Fredrik
>
>
> "Henrik Viklund" <henrik.viklund@gmail.com> wrote in message
> news:1150725580.609419.90910@c74g2000cwc.googlegroups.com...
> > First of all, 5 minutes sounds extraordinalrily slow, atleast if you're
> > using ethernet as transport. You're not by any chanse using a debug
> > built bootloader?
> >
> > Anyway: yes you can develop a driver without having to download the
> > entire image for every change. I assume you have a working kitl
> > connection up and running:
> >
> > First of all a good thing is to be able to load the driver dll over
> > relfsd (the "release" directory), so ensure you have this up and
> > running (this gives your device direct access to all files under your
> > platform project's falat release directory).
> >
> > Second, you want the CE loader to load the driver from your flatrelease
> > directory rather than from your OS image's windows directory. This you
> > can do by setting up the module (driver dll) as a release directory
> > module (under menu Target->Release Directory Modules). This enures the
> > specified dll will be loaded from the flat release directory
> > ("release"), which is handy since that's where your driver output dll
> > will end up everytime you do a "build project".
> >
> > The thirt part of the equation may involve a (little) bit of extra work
> > depending on the driver. To be able to work effectively with the driver
> > in the release directory you need a mechanism to load and unload the
> > driver on command or else you won't be able to reload the new version
> > of the driver (in fact you won't be able to build the project if the
> > driver is loaded through the release driectory sincce the file is in
> > use). If it's a PnP driver, you might get away with simply unplug
> > whatever hardware you're driver interfaces for it to unload. Otherwise,
> > you need to write a small utility that can load and unload the driver
> > programatically.
> >
> > Henrik Viklund
> > http://www.addlogic.se
> >
> > Fredrik Jansson wrote:
> >> Hi!
> >>
> >> I have developed an image that suites my needs and I am gonna start
> >> developing a driver. The image is pretty large (~20MB) and takes about
> >> five
> >> minutes to download.
> >>
> >> Is there any way to develop the driver in PB, download it (I can do th=
at
> >> manually with e.g. ActiveSync, it's not a problem) but I want to be ab=
le
> >> to
> >> debug it using the kernel debugger.
> >>
> >> My question in short is: it takes a long while to download the whole
> >> image
> >> so can I just download and debug a driver using PB?
> >


Re: Use Platform Builder as debugger by Fredrik

Fredrik
Tue Jun 20 08:22:28 CDT 2006

Henrik, a debug loader was the case.

Thanks!!



Re: Use Platform Builder as debugger by Fredrik

Fredrik
Tue Jun 20 08:23:16 CDT 2006

Thanks a lot, it definitely helped!

Fredrik

"Norman Rericha" <Rayogen_dontyou_spam_gmail@thing.com> wrote in message
news:mn.9a937d6614420dda.47749@thing.com...
> Simply put yes. The only issue is that the driver has to reside in the
> "FLATRELEASE" directory on your machine. There are a few issues you need
> to know however.
>
> 1 - You can exclude DLLs by removing them from your Platform.bib.
> 2 - You can still require the DLL to be loaded through the registry.
> 3 - Personally I am a command line builder. Therefore I build my source
> code manually in the directory I am working. By setting WINCEREL=1 my
> code automagically copies to my FLATRELEASE directory.
>
> Remember using this setup is for debugging only. Don't forget to include
> the driver in your Platform.bib when you are finished.
>
> --
> I hope this helps
>
> --
> Norman Rericha
> Senior Software Engineer
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
>