Showing posts with label Platform Builder. Show all posts
Showing posts with label Platform Builder. Show all posts

Thursday, 29 April 2010

Increase Platform Builder download speed

Hi all,

have you ever wondered what the "TFTP block size in bytes" edit field in the "Connectivity Options->Ethernet Download Settings" dialog is for?
With this option, introduced in the CE 6 eboot, you can configure the size of image data transferred in a single ethernet package. This lets you configure the ce image download speed.
You can set this value in the range of 512KB up to 1024 KB, the default value is 512 KB. If you set this value to 1024, your download speed could theoretically double. In real live the increase depends on your device.
We have made some tests with different devices and the speed increase varies between 100KB/s (slower device) and 300 KB/s (faster device).

If you have a CE6 based eboot on your device try it and see the result.


By the way, there is a new version of the CEDownlaoder tool availabe. A serial terminal has been included and the download view can be configured to close automatically if download succeeds. You can download it here .

bye

sascha
Read more! Post this to a friend!

Thursday, 1 April 2010

0 Projects in PlatformBuilder?

Hi all,

today I experienced a strange PlatformBuilder behaviour: As usual I opened the solution I am currently working on but everything was blank, my solution was gone!


My first thought was to reimport my entire OSDesign from my version-control which would result in loosing all my recent changes and spending an hour or so rebuilding my entire solution. Luckily for me there was a much simpler and faster way to get my solution back:

Upon comparing my .sln file with the one from my version-control I noticed that two sections were missing in mine:
Project … EndProject and
GlobalSeleciton(ProjectConfigurationPlatfroms) … EndGlobalSelection.

I just copied over those two sections and voilá I had my solution working again!

Have fun and Happy Eastern!
Read more! Post this to a friend!

Friday, 16 October 2009

Check nesting IF-ELSE-ENDIF in Config Files

Sometimes tracing down the build problems caused by wrong configuration files (platform.bib/.reg/...) is hard due to lot's of IF-ELSE-ENDIF statements (see an older post: "Strange build error message").

Last time I was bugged by a totally messed up configuration file and therefore I wrote (better say 'hacked') a little perl script that just lists the nesting level of each IF, ELSE, ENDIF statement.

Here's the full code - enjoy. There is room for improvements and hints/comments are welcome (I'm definitely not a perl guru :-)

@goto ;#DOS

##
# Visualize nesting level of IF/ELSE/ENDIF pairs
# Dr. Jürgen Welzenbach, 2009
#

# - Constants -------------------------
my $tag_Begin = "IF";
my $tag_Mid = "ELSE";
my $tag_End = "ENDIF";

## - Preamble -------------------------------------------------------
use strict;
use Cwd;
use File::Basename;

my $nestingWidth = 5;


## - Main -----------------------------------------------------------
&filter_files( @ARGV );

## - Functions ------------------------------------------------------
sub filter_file
{
my $fname = shift;
my($filename, $directories, $suffix) = fileparse($fname, qr/\.[^.]*/);
my $nestCount = 0;
my $lineNo = 1;

print "Checking $fname\n";
my $fname_ok = open( FILE, "<", $fname ); if ( $fname_ok ) { my $line; print("Line Level Text:\n"); while ( $line = )
{
my $printIt = 0;
$line = " " . $line;
## Ok, here's room for improovement; but I'm no perl specialist and for
## a quick hack it's ok - for the moment :-)
if ( $line =~ /\W$tag_Begin/ )
{
$line =~ s/^\s+//;
my $sp = sprintf("%4d [%2d]: %*s%s", $lineNo, $nestCount, ($nestCount*$nestingWidth), " ", $line);
print $sp;
$nestCount = $nestCount + 1;
}
elsif ( $line =~ /\W$tag_Mid/ )
{
$line =~ s/^\s+//;
my $sp = sprintf("%4d [%2d]: %*s%s", $lineNo, $nestCount, (($nestCount-1)*$nestingWidth), " ", $line);
print $sp;
}
elsif ( $line =~ /\W$tag_End/ )
{
$line =~ s/^\s+//;
$nestCount = $nestCount - 1;
my $sp = sprintf("%4d [%2d]: %*s%s", $lineNo, $nestCount, ($nestCount*$nestingWidth), " ", $line);
print $sp;
}

$lineNo = $lineNo + 1;
}
close( FILE );
warn $@ if $@;

}
else
{
if( !$fname_ok )
{
print "Error opening '$fname '\n";
}
else
{
close( FILE );
}
}
}

sub filter_files
{
my @args = @_;

while ( $#args >= 0 )
{
filter_file( $args[ 0 ] );
shift @args;
}
}


__END__

:;#DOS

@perl -S %0 %*



Read more! Post this to a friend!

Wednesday, 23 September 2009

Don't know how to make 'TargetCompilePass'

It's another "Klassiker":

BUILD: [01:0000000016:ERRORE] NMAKE : U1073: don't know how to make 'TargetCompilePass'
BUILD: [01:0000000018:ERRORE] NMAKE.EXE TargetCompilePass -i -c BUILDMSG=Stop. ...

This error means there is no makefile in your code directory. And it has nothing to do with the TargetCompilePass or NMake.
Each directory with your code (e.g. a driver) must contain at least a sources and a makefile file. Just copy it from any other driver and modify the sources file. But never change the makefile!

Tschüß Holger
Read more! Post this to a friend!

Thursday, 3 September 2009

Omg, my image is too large!

Limitted recources on Windows CE devices cause a lot of trouble.
I want to give you some hints to find out why your image is twice the expected size.
It's not so easy to find out what OS components can be removed for a specific project.
  • NK.nb0 vs. NK.bin: The BIN-File is roughly the size you need on Flash and additionally on RAM. If you use a NB0-File and your BIN-File is much smaller, just review your config.bib and check the ROMSIZE value. And set AUTOSIZE=ON if possible.
  • Catalog View: Review the Catalog Items under "Core OS". The Platform Builder adds Catalog Items to your project if it depends on another item. Select the filter "User-selected Cataloge Items and Dependencies" and review the small green squares. Select "Reasons for Inclusion of Item" from the context menu.
  • SYSGEN_*: In the properties of the Catalog Items you can see the corresponding SYSGEN variable. The build process "translates" the SYSGEN variables to a list of OS components in CE_MODULES, IE_MODULES ... You find these "rules" in the batch files under Public/CeBase/Oak/Misc. In the most cases each OS component corresponds with a DLL or EXE file in your release directory.
  • CeConfig.h: In each release directory and on each device you find a CeConfig.h file with the complete list of OS components in your image. Review this file to find obsolete components.
  • DLL-Size: Sort your DLLs and EXE files in your release directory by size and try to remove the largest files.
  • ViewBin: With the tool "ViewBin -t nk.bin" you see a list of MODULES and FILES and it's sizes.
Large files are Internet Explorer components, VBScript, JScript and fonts. Sometimes there are MFC DLLs in an image but no MFC applications. Standard SDK compatibility is deprecated and it adds a lot of dependent components.
But don't try to remove each unknown 20kByte file, it will make your image very special.
After changing your OS extend you have to rebuild your Platform SDK.
I hope my hints are helpful to make your OS image smaller.

Tschüß Holger
Read more! Post this to a friend!

Tuesday, 19 May 2009

Windows Embedded CE: BSP development considerations

Hi Folks,

this post kind of fits to Damian’s post from yesterday.

You might have wondered why, upon installation of PlatformBuilder, the Windows Embedded CE source code ends up in C:\WINCE600 by default. Well there are several reasons:
  • The paths do get pretty long and we want to be able to resolve them

  • Windows Embedded CE does not support spaces in the source code path

This can sometimes be a problem in your day-to-day BSP development. Imagine the following scenario: You want to change a driver in a BSP that you are working on right now. But of course you want to keep the old version. So before you alter the existing code you make a copy and by default it will be called “Copy of my_driver”. Even though you are not compiling this just created folder you will get strange errors (such as your Solution Explorer in PlatformBuilder does not work properly anymore) due to the fact that you’ve got spaces in your path.

But even if you obey this restriction of not having any spaces in your Windows Embedded CE source code paths you are not in the clear, yet. Just imagine the following scenario: You get a new version of the BSP that you are working on but again you want to save your current version. Taking into account that you should not have any spaces in your Windows Embedded CE source code path you now rename your current version of the BSP to something like: my_bsp_old_version. By doing so and then adding the new version of your BSP you will get some problems with your Catalog as you have multiple versions of the same Catalog Item in your system; hence your unique ID is no longer unique (here is a link to my post regarding Catalog Items and unique IDs).
To resolve this Catalog Item issue, you can do one of the following:
  • Rename the Catalog folder of your my_bsp_old_version (don't forget the limitation of no spaces in the source code tree) or

  • Copy my_bsp_old_version to some folder outside the WINCE600 tree

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

Thursday, 12 February 2009

Windows CE Platform Builder Monthly Updates for January 2009 are here!

Hi all,

here are the links to the January 2009 QFEs for Windows CE Platform Builder:

Windows Embedded CE 6.0 Monthly Update (January 2009)

Windows CE 5.0 Platform Builder Monthly Update (January 2009)

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

Wednesday, 11 February 2009

Windows CE: Yearly QFEs for 2008 now available

Hi all,

The yearly updates for Windows CE have arrived, these updates include all previous updates up until December 2008:

Windows Embedded CE 6.0 Platform Builder - Cumulative Product Update Rollup Package (through 12/31/2008)

Windows Embedded NavReady - Cumulative Product Update Rollup Package (through 12/31/2008)

Windows CE 5.0 Platform Builder - Cumulative Product Update Rollup Package (through 12/31/2008)

Windows CE 5.0 Networked Media Device Feature Pack - Cumulative Product Update Rollup Package (through 12/31/2008)

Windows CE .NET 4.2 Platform Builder - Cumulative Product Update Rollup Package (through 12/31/2008)

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

Wednesday, 4 February 2009

Windows CE: Development tools considerations part VI

Hi all,

today I want to discuss the last but not least question of our series.

Question:
What if I have set up my system to use script files instead of the PlatformBuilder IDE? What do I need to do in order to use the IDE?

Answer:
We learned previously that we can set up an automated build outside of the PlatformBuilder IDE. Therefore we need pbxmlutils.exe and a .pbxml file. Now if you are starting a new project it is quite simple to create a .pbxml file we simply need to create a new OSDesign project.
But how can we accomplish the task of creating a .pbxml file if we have a lot of script files that set up our build environment? Well we need to correlate the variables set in the script files to variables set via the catalog in the PlatformBuilder IDE. If necessary we even need to create new catalog items but this is easy to do from within the IDE. Some variables might not be set in the catalog but instead in some platform internal .bat files. Unfortunately it can be quite challenging to map all the variables from our scripts to the IDE but it is definitely doable and in the end worth the effort as the system will be a lot more usable in the end.
Once we have created our .pbxml file, all that is left to do is open an existing project in the PlatformBuilder IDE with our just created .pbxml file to create our .sln file and we are ready to use the IDE from now on!

This concludes our little series; hopefully I could shed some light on some important issues…

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

Tuesday, 3 February 2009

Windows CE: Development tools considerations part V

Hi all,

let’s go right to answering the 4th question:

Question:
I want to start a daily automated build hence the IDE is not desirable. Is it possible to have the developers use the IDE and yet start an automated build without starting the IDE?

Answer:
YES it is possible to start an automated build without starting the IDE and here is how:
Well we already learned that we need to use a special command line which can be opened from the PlatformBuilder IDE with the help of wince.bat to build our system. There is, however another cool tool that comes with PlatformBuilder called pbxmlutils.exe. All it needs is your .pbxml file as input to set up a command line to build your system without the need to start the PlatformBuilder IDE. Of course PlatformBuilder and the WINCE tree still need to be installed on your build PC. But as you can see with pbxmlutils.exe you can write a script which

  1. Gets all files from your version control tool into a clean WINCE tree

  2. Sets up a build environment for you with the help of pbxmlutils.exe with all your specific project settings which are defined in the .pbxm file

  3. builds your system

  4. saves the build logs and generated files

Lastly, let me share one more consideration with you. As we learned in yesterdays post, we should only change code in our BSP. To make sure that no code was changed in the Private directory, simply don’t install PlatformBuilders shared source option on your daily build machine.

Stay tuned for tomorrows last edition of our little series

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

Monday, 2 February 2009

Windows CE: Development tools considerations part IV

Hi all,

Today let’s answer our 3rd question.

Question:
What files do I actually need to check into my version control tool?

Answer:
Well as a general rule you don’t need to check in any generated files or files that you did not alter. Just as a reminder please only alter code in your BSP, which of course resides in the Platform directory! It is also possible to add code to the Public directory such as a file system but do not alter existing code anywhere but in your BSP! If code adjustments are necessary, please clone the code to your BSP before altering the code!
Well that said let’s see what we actually need to check in:

  1. Project settings which can be found in our OSDesigns directory. Now remember, generated code is not needed in our version control so we only need to check in a couple files here. For instance we do not need to check in the Reldir subfolder.

  2. Our BSP which can be found in the Platform directory

  3. If needed any 3rd Party components we added to the Public directory such as a new file system.

So you see there are only a handful of files that would need to be checked in into our version control system.

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

Friday, 30 January 2009

Windows CE: Development tools considerations part III

Hi all,

as promised let’s continue with answering the 2nd question.

Question:
What if some developers rather use a command line than the PlatformBuilder IDE?

Answer:
Well this is a simple task. Starting with Windows CE 5.0 Microsoft introduced a feature called unified build. This great feature ensures that the outcome of a command line build is exactly the same as the outcome of a PlatformBuilder IDE. This is possible as the IDE is just a thin layer above the command line and hence there is a one-to-one mapping of the command line calls to the IDE. But you might find that you can not just use any command line it has to be one that you open from within the PlatformBuilder IDE. Now why is that? Well, when opening a command line from within the PlatformBuilder IDE, wince.bat is called which sets up the command line for you in accordance with the specific project settings.

NOTE:
Please don’t call wince.bat directly, we will discuss how to set up a command line outside of the PlatformBuilder IDE when answering the 4th question, so please be patient.

Now there are multiple possibilities to open a command line from within the PlatformBuilder IDE:

  • From the IDE select Build -> Open Release Directory in Build Window

  • Right clicking the desired directory in the Solution Explorer and selecting Open Build Window will open a command line with the correct path to that directory

So as you see as a developer you can either use the command line or the PlatfromBuilder IDE to build your system. The output will be the same.

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

Thursday, 29 January 2009

Don’t miss the next free Windows Embedded OEM Technical Seminar

Hi Folks,

if live in or near Ljubljana, Slovenia or just happen to pass by there on February 3rd, don’t miss the free Windows Embedded OEM Technical Seminar!

It is intended for technical decision makers and developers. MS will show you the latest innovations in embedded software development and present the Microsoft Embedded Products as well as their development tools and give you the opportunity to asked questions about them.

Location:
Microsoft d.o.o.
Smartinska 140
Ljubljana, Slovenia 1000
Phone: 00 386 01 584 61 00

Further information:
http://www.microsoftembeddedseminars.com/about.aspx?seminarid=210

Overview of MS seminars offerings:
http://www.microsoftembeddedseminars.com/Europe1.aspx

NOTE:
This seminar has been moved to March 31st!

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

Windows CE: Development tools considerations part II

Hi all,

in yesterdays post, I stated a couple of questions regarding the suitability of PlatformBuilder, now here is the first answer:

Question:
It’s nice for one developer using PlatformBuilder but how can I make sure that every developer is using the same project configuration?

Answer:
When you start a new Windows CE project in PlatformBuilder which is called OS Design, you first select an appropriate template. The template is a collection of catalog items that Microsoft regards as necessary for the specific device type you have selected. Of course you can later on browse the catalog manually and select or deselect catalog items of your choice.
After creation of the project, you can choose weather you want to build your system in debug or in release.
Furthermore you can select some properties of your project such as debug, KITL or profiler options. You can also set some project specific environment variables or add some custom build actions.

As you can see these are quite a lot of choices you can make. And of course you want to make sure that every developer is using the same settings. How is that possible when using the PlatformBuilder IDE you might ask? The Answer is simple: all the above mentions settings are saved in but one file, the .pbxml file. So by making sure that every developer is using the same .pbxml file, for instance with the help of a version control tool, it is ensured that everyone has the same project settings.

So as you see it is not necessary to write any script files or avoid using the PlatformBuilder IDE in order to make sure that everyone is working with the same project settings.

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

Wednesday, 28 January 2009

Windows CE: Development tools considerations part I

Hi all,

as you might know the tool for developing Windows Embedded CE devices is called PlatformBuilder; which, starting with Windows Embedded CE 6.0 is no longer a standalone IDE but is integrated in Visual Studio 2005. When working on large projects with more than one developer a couple of questions concerning the usability and suitability of the PlatformBuilder IDE might arise:






If you are interested in these questions stay tuned as I will answer them one by one over the next days.

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

Tuesday, 16 December 2008

Tomorrow: Free Windows Embedded OEM Technical Seminar and Workshop

Hi Folks,

If you are in Israel tomorrow, December 17th, don’t miss the free Windows Embedded OEM Technical Seminar and Workshop!

It is intended for technical decision makers and developers. MS will show you the latest innovations in embedded software development, present the Microsoft Embedded Products as well as their development tools and give you the opportunity to ask questions about everything.

Location:
Herzliya, Israel
Onsite Seminar
The Daniel Hotel and Spa
60 Ramat Yam
Herzliya Pituah
Herzliya, Israel 46851
+972 9 9528282

Further information:
http://www.microsoftembeddedseminars.com/about.aspx?seminarid=199

Overview of MS embedded seminar offerings:
http://www.microsoftembeddedseminars.com/Europe1.aspx

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

Monday, 1 December 2008

Substitute the Desktop Background Graphics

Well, how to customize the background image on Windows CE Desktop?

I've seen quite a few times now and it seemed the most intuitive way for me, too, to first search for the background image file coming from Microsoft. But what to do then?

1.) First alternative coming to everybody's mind is to substitute the background image file. The file is named windowsce_vgal.jpg and is placed in _PLATFORMROOT\<BSPNAME>\Files After testing you hopefully have IMAGING_IMG_JPEGDECODER enabled, too. Otherwise you will find out that there is a windowsce_vgal.bmp that has to be sustituted then. This was quite easy but since you used the same file naming in your project compared to Microsoft's original file naming it's hard to see or recognize that the substitution took place. Especially if you'll just look at the sources a few month after the changes. Then you'll really need an image viewer to recognize the replaced images.

So is there a better way to do this?

2.) Watch out for the shell.bib file. There you will find the lines controling the inclusion of the background image like:

; @CESYSGEN IF SHELL_MODULES_VGAL
; @CESYSGEN IF IMAGING_IMG_JPEGDECODER
WindowsCE.jpg $(_FLATRELEASEDIR)\windowsce_vgal.jpg NK S
; @CESYSGEN ELSE
; @CESYSGEN ENDIF IMAGING_IMG_JPEGDECODER
; @CESYSGEN ENDIF SHELL_MODULES_VGAL

And now look at that: In the final nk.bin image the background image file gets renamed to WindowsCE.jpg

So what you can do here is obviously to add a line like

WindowsCE.jpg $(_FLATRELEASEDIR)\my_projects_background_image.jpg NK S

and probably introduce an own environment variable or feature variable as a catalogue item to wrap this line(s) with some controling IF ELSE ENDIF statements. Now you did not touch the original background image from Microsoft and inside your repository your background image file has a meaningful file name. A few month later looking into your repository you will have a good chance to recognize the customization now.

3.) Now is there a third alternative even better? Why not use your own file name even inside your nk.bin image? So some of your bib files contains, e.g.

my_project_bg_image.jpg $(_FLATRELEASEDIR)\my_projects_background_image.jpg NK S

If you have a look into wceshellfe.reg you will find

; initial value for background bitmap, if any
[HKEY_CURRENT_USER\ControlPanel\Desktop]
; @CESYSGEN IF IMAGING_IMG_JPEGDECODER "wallpaper"="\Windows\WindowsCE.jpg"
; @CESYSGEN ELSE
; @CESYSGEN ENDIF IMAGING_IMG_JPEGDECODER

Adopting the "wallpaper" line to something like

"wallpaper"="\Windows\my_project_bg_image.jpg"

might do the trick then. And again customization control can be added by feature variables and catalogue items. Transparency for others or while time goes by is surely higher compared to the two alternatives before.

Other customization work can often be controled in similar ways...
Read more! Post this to a friend!

Friday, 28 November 2008

SPARKs start to fly

So! The SPARKs Will Fly contest was officially launched at ESC (Embedded Systems Conference) in Boston - a month ago! But what hardware platform to go for? There are five complete kits (containing hardware, Visual Studio 2005 Pro and PlatformBuilder (Windows Embedded CE 6.0 R2 Full Versions) offered. Only restriction on software is: no commercial use! Advantech, VIA, ICop are more PC alike systems on x86 compatible CPUs. VIA Artigo even needs active cooling. The real ultra low powered embedded devices from Special Computing and Keith & Koep run on an ARM core. Keith & Koep's Trizeps4 platform (312MHz and 520MHz version) is hosted by a small and feature rich base board much smaller than Artigo. That's why it is my personal favorite even compared to the small GUMSTIX from Special Computing. Which one's your preferred platform here? This weekend I will obviously start playing around with my Trizeps4/520MHz. Bye... and have a nice weekend!
Read more! Post this to a friend!