--- a/emulator/emulatorbsp/bld.inf Tue Aug 31 16:23:49 2010 +0530
+++ b/emulator/emulatorbsp/bld.inf Thu Sep 23 17:42:45 2010 +0530
@@ -23,16 +23,23 @@
documentation/wins_ether_drv_howto.txt /epoc32/engdoc/ethernet/ //
inc/variantmediadef.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/variantmediadef.h)
-variant.mmh SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/variant.mmh)
-specific/winscomm.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/winscomm.h)
+variant.mmh SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/variant.mmh)
+specific/winscomm.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/winscomm.h)
specific/winscomm.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/winscomm.inl)
inc/nand_fbr_offset.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/nand/nand_fbr_offset.h)
-inc/winsgui.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/winsgui.h)
+inc/winsgui.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/winsgui.h)
:zip emuldrives.zip
wpdpack/drivers/winpcap.exe /epoc32/tools/winpcap.exe //
wpdpack/lib/packet.lib /epoc32/release/tools/udeb/packet.lib //
wpdpack/lib/wpcap.lib /epoc32/release/tools/udeb/wpcap.lib //
+emulatorlauncher/epoc.bat /epoc32/tools/epoc.bat
+emulatorlauncher/epoc.pl /epoc32/tools/epoc.pl
+emulatorlauncher/eshell.bat /epoc32/tools/eshell.bat
+emulatorlauncher/eshell.pl /epoc32/tools/eshell.pl
+emulatorlauncher/console.ini /epoc32/data/console.ini
+emulatorlauncher/console.bmp /epoc32/data/console.bmp
+
PRJ_MMPFILES
../../../kernelhwsrv/kernel/eka/kernel/ekern
../../../kernelhwsrv/kernel/eka/kernel/kc_exe
Binary file emulator/emulatorbsp/emulatorlauncher/console.bmp has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/emulatorlauncher/console.ini Thu Sep 23 17:42:45 2010 +0530
@@ -0,0 +1,31 @@
+# Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+ScreenWidth 640
+ScreenHeight 240
+
+PhysicalScreenWidth 0
+PhysicalScreenHeight 0
+
+fasciabitmap console.bmp
+
+ScreenOffsetX 0
+ScreenOffsetY 0
+
+
+# could be decreased to reflect the amount of memory available on Brutus
+MegabytesOfFreeMemory 16
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/emulatorlauncher/epoc.bat Thu Sep 23 17:42:45 2010 +0530
@@ -0,0 +1,20 @@
+@echo off
+
+rem Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem Emulator Launcher
+rem
+rem
+
+perl -S epoc.pl %1 %2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/emulatorlauncher/epoc.pl Thu Sep 23 17:42:45 2010 +0530
@@ -0,0 +1,256 @@
+# Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Launcher for the Symbian Emulator, including
+# functionality to read the $ENV{EPOCROOT}epoc32\data\BuildInfo.txt
+# file to find out information regarding the current Emulator.
+# Depends on the current working directory providing
+# the drive of the currently used SDK.
+#
+#
+
+use Cwd;
+
+#
+# Check the argument(s), if any.
+#
+$numArgs = $#ARGV + 1;
+
+if($numArgs == 0)
+ {
+ &launchEmulator("udeb","winscw");
+ exit(0);
+ }
+
+if($numArgs > 2)
+ {
+ &printHelp;
+ die "ERROR: Too many arguments.\n";
+ }
+
+if($numArgs == 1)
+ {
+ if(lc($ARGV[0]) eq "-rel")
+ {
+ &launchEmulator("urel","winscw");
+ exit(0);
+ }
+
+ if (lc($ARGV[0]) eq "-version")
+ {
+ &printVersion;
+ exit(0);
+ }
+
+ if(lc($ARGV[0]) eq "-wins")
+ {
+ &launchEmulator("udeb", "wins");
+ exit(0);
+ }
+
+ if(lc($ARGV[0]) eq "-winscw")
+ {
+ &launchEmulator("udeb", "winscw");
+ exit(0);
+ }
+
+ if(lc($ARGV[0]) eq "-help")
+ {
+ &printHelp;
+ exit(0);
+ }
+ }
+
+if ($numArgs == 2)
+ {
+ if(lc($ARGV[0]) eq "-rel")
+ {
+ if (lc($ARGV[1]) eq "-wins")
+ {
+ &launchEmulator("urel","wins");
+ exit(0);
+ }
+
+ if (lc($ARGV[1]) eq "-winscw")
+ {
+ &launchEmulator("urel","winscw");
+ exit(0);
+ }
+ }
+
+ if (lc($ARGV[0]) eq "-winscw")
+ {
+ if (lc($ARGV[1] eq "-rel"))
+ {
+ &launchEmulator("urel","winscw");
+ exit(0);
+ }
+ }
+
+ if (lc($ARGV[0]) eq "-wins")
+ {
+ if (lc($ARGV[1] eq "-rel"))
+ {
+ &launchEmulator("urel","wins");
+ exit(0);
+ }
+ }
+ }
+
+# Error, unknown argument.
+&printHelp;
+die "ERROR: Unknown argument " . "\"" . $ARGV[0] . "\".\n";
+
+sub launchEmulator
+{
+ my ($type,$win) = @_;
+
+ my $epocroot = &getEpocroot;
+ my $drive = &getDrive;
+ my $emu = $drive . $epocroot . "epoc32" . "\\"
+ . "release\\" . $win . "\\" . $type . "\\" . "epoc.exe";
+ -e $emu ||
+ die "ERROR: File \"$emu\" not found.\n\n" .
+ "The EPOCROOT environment variable does not identify\n" .
+ "a valid Symbian emulator installation on this drive.\n" .
+ "EPOCROOT must be an absolute path to an existing\n" .
+ "directory - it should have no drive qualifier and\n" .
+ "must end with a backslash.\n";
+ # If the execute is successful, this never returns.
+ exec("\"" . $emu . "\"") || die "Failed to execute the emulator \"$emu\": $!";
+}
+
+sub printHelp
+{
+ print "Symbian Platform Emulator Launcher\n";
+ print "Syntax :\tepoc [-rel] [-wins|-winscw] [-version] [-help]\n";
+ print "(no options)\tLaunch active winscw debug emulator\n";
+ print "-rel\t\tLaunch active release emulator\n";
+ print "-wins\t\tLaunch active wins emulator\n";
+ print "-winscw\t\tLaunch active winscw emulator\n";
+ print "-version\tDisplay active emulator details\n";
+ print "-help\tOutput this help message\n";
+}
+
+sub printVersion
+{
+ my $epocroot = &getEpocroot;
+ my $drive = &getDrive;
+
+ my $binfo = $drive . $epocroot . "epoc32" . "\\"
+ . "data" . "\\" . "BuildInfo.txt";
+
+ -e $binfo || die "ERROR: File \"" . $binfo . "\" does not exist.\n";
+ open(IFILE, $binfo) ||
+ die "ERROR: Failed to open file \"" . $binfo . "\": $!";
+
+ my $DeviceFamily = "";
+ my $DeviceFamilyRev = "";
+ my $ManufacturerSoftwareRev = "";
+ my $ManufacturerSoftwareBuild = "";
+
+ while(<IFILE>) {
+ if(/DeviceFamily\s+(.*\S)\s*$/i) {
+ $DeviceFamily = $1;
+ }
+ if(/DeviceFamilyRev\s+(.*\S)\s*$/i) {
+ $DeviceFamilyRev = $1;
+ }
+ if(/ManufacturerSoftwareRev\s+(.*\S)\s*$/i) {
+ $ManufacturerSoftwareRev = $1;
+ }
+ if(/ManufacturerSoftwareBuild\s+(.*\S)\s*$/i) {
+ $ManufacturerSoftwareBuild = $1;
+ }
+ }
+
+ close(IFILE);
+
+ #
+ # Verify that we got everything we should have.
+ #
+ $DeviceFamily ne "" ||
+ die "ERROR: Device family not specified in file \"" . $binfo .
+ "\".\n";
+ $DeviceFamilyRev ne "" ||
+ die "ERROR: Device family revision not specified in file \"" . $binfo .
+ "\".\n";
+ $ManufacturerSoftwareBuild ne "" ||
+ die "ERROR: Manufacturer software build not specified in file \"" .
+ $binfo . "\".\n";
+
+ $Revision = (($ManufacturerSoftwareRev eq "")?($DeviceFamilyRev):
+ ($ManufacturerSoftwareRev));
+
+ $DeviceFamily = getDFRDName($DeviceFamily);
+
+ #
+ # Make the standard revision representation prettier,
+ # but leave other representations untouched.
+ #
+ if($Revision =~ /^0x([0-9])([0-9][0-9])$/) {
+ $Revision = $1 . "." . $2;
+ }
+
+ print $DeviceFamily . " " .
+ "version " . $Revision . " " .
+ "build " . $ManufacturerSoftwareBuild . "\n";
+}
+
+#
+# Determines, validates, and returns EPOCROOT.
+#
+sub getEpocroot
+{
+ my $epocroot = $ENV{EPOCROOT};
+ die "ERROR: Must set the EPOCROOT environment variable.\n"
+ if (!defined($epocroot));
+ $epocroot =~ s-/-\\-go; # for those working with UNIX shells
+ die "ERROR: EPOCROOT must be an absolute path, " .
+ "not containing a drive letter.\n" if ($epocroot !~ /^\\/);
+ die "ERROR: EPOCROOT must not be a UNC path.\n" if ($epocroot =~ /^\\\\/);
+ die "ERROR: EPOCROOT must end with a backslash.\n" if ($epocroot !~ /\\$/);
+ die "ERROR: EPOCROOT must specify an existing directory.\n"
+ if (!-d $epocroot);
+ return $epocroot;
+}
+
+#
+# Determines and returns the current drive, if any.
+#
+sub getDrive
+{
+ my $wd = cwd;
+ my $drive;
+ if($wd =~ /^([a-zA-Z]:)/) {
+ $drive = $1;
+ } else {
+ # Perhaps we're on a machine that has no drives.
+ $drive = "";
+ }
+ return $drive;
+}
+
+#
+# The DFRD may be represented by a numeric value, as defined by HAL.
+# Changes known numeric values to the name of the DFRD,
+# and leaves all other values untouched.
+#
+sub getDFRDName
+{
+ my $dfrd = shift;
+ return "Crystal" if $dfrd eq "0";
+ return "Pearl" if $dfrd eq "1";
+ return "Quartz" if $dfrd eq "2";
+ return $dfrd; # as fallback
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/emulatorlauncher/eshell.bat Thu Sep 23 17:42:45 2010 +0530
@@ -0,0 +1,20 @@
+@echo off
+
+rem Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem Eshell Launcher
+rem
+rem
+
+perl -S eshell.pl %1 %2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/emulatorlauncher/eshell.pl Thu Sep 23 17:42:45 2010 +0530
@@ -0,0 +1,170 @@
+# Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Eshell Launcher
+# Depends on the current working directory providing
+# the drive of the currently used SDK.
+#
+#
+
+use Cwd;
+
+#
+# Check the argument(s), if any.
+#
+$numArgs = $#ARGV + 1;
+
+if($numArgs == 0)
+ {
+ &launchEshell("udeb","winscw");
+ exit(0);
+ }
+
+if($numArgs > 2)
+ {
+ &printHelp;
+ die "ERROR: Too many arguments.\n";
+ }
+
+if($numArgs == 1)
+ {
+ if(lc($ARGV[0]) eq "-rel")
+ {
+ &launchEshell("urel","winscw");
+ exit(0);
+ }
+
+ if(lc($ARGV[0]) eq "-wins")
+ {
+ &launchEshell("udeb", "wins");
+ exit(0);
+ }
+
+ if(lc($ARGV[0]) eq "-winscw")
+ {
+ &launchEshell("udeb", "winscw");
+ exit(0);
+ }
+
+ if(lc($ARGV[0]) eq "-help")
+ {
+ &printHelp;
+ exit(0);
+ }
+ }
+
+if ($numArgs == 2)
+ {
+ if(lc($ARGV[0]) eq "-rel")
+ {
+ if (lc($ARGV[1]) eq "-wins")
+ {
+ &launchEshell("urel","wins");
+ exit(0);
+ }
+
+ if (lc($ARGV[1]) eq "-winscw")
+ {
+ &launchEshell("urel","winscw");
+ exit(0);
+ }
+ }
+
+ if (lc($ARGV[0]) eq "-winscw")
+ {
+ if (lc($ARGV[1] eq "-rel"))
+ {
+ &launchEshell("urel","winscw");
+ exit(0);
+ }
+ }
+
+ if (lc($ARGV[0]) eq "-wins")
+ {
+ if (lc($ARGV[1] eq "-rel"))
+ {
+ &launchEshell("urel","wins");
+ exit(0);
+ }
+ }
+ }
+
+# Error, unknown argument.
+&printHelp;
+die "ERROR: Unknown argument " . "\"" . $ARGV[0] . "\".\n";
+
+sub launchEshell
+{
+ my ($type,$win) = @_;
+ $epocroot = &getEpocroot;
+ $drive = &getDrive;
+ $emu = $drive . $epocroot . "epoc32" . "\\"
+ . "release\\" . $win . "\\" . $type . "\\" . "eshell.exe";
+ -e $emu ||
+ die "ERROR: File \"$emu\" not found.\n\n" .
+ "The EPOCROOT environment variable does not identify\n" .
+ "a valid eshell installation on this drive.\n" .
+ "EPOCROOT must be an absolute path to an existing\n" .
+ "directory - it should have no drive qualifier and\n" .
+ "must end with a backslash.\n";
+
+ #add the stuff to use the console
+ $emu.=" -MConsole --";
+
+ # If the execute is successful, this never returns.
+ exec($emu) || die "Failed to execute eshell \"$emu\": $!";
+}
+
+sub printHelp
+{
+ print "Eshell Launcher\n";
+ print "Syntax :\teshell [-rel] [-wins|-winscw] [-help]\n";
+ print "(no options)\tLaunch active winscw debug eshell\n";
+ print "-rel\t\tLaunch active release eshell\n";
+ print "-wins\t\tLaunch active wins eshell\n";
+ print "-winscw\t\tLaunch active winscw eshell\n";
+ print "-help\t\tOutput this help message\n";
+}
+
+#
+# Determines, validates, and returns EPOCROOT.
+#
+sub getEpocroot
+{
+ my $epocroot = $ENV{EPOCROOT};
+ die "ERROR: Must set the EPOCROOT environment variable.\n"
+ if (!defined($epocroot));
+ $epocroot =~ s-/-\\-go; # for those working with UNIX shells
+ die "ERROR: EPOCROOT must be an absolute path, " .
+ "not containing a drive letter.\n" if ($epocroot !~ /^\\/);
+ die "ERROR: EPOCROOT must not be a UNC path.\n" if ($epocroot =~ /^\\\\/);
+ die "ERROR: EPOCROOT must end with a backslash.\n" if ($epocroot !~ /\\$/);
+ die "ERROR: EPOCROOT must specify an existing directory.\n"
+ if (!-d $epocroot);
+ return $epocroot;
+}
+
+#
+# Determines and returns the current drive, if any.
+#
+sub getDrive
+{
+ my $wd = cwd;
+ if($wd =~ /^([a-zA-Z]:)/) {
+ $drive = $1;
+ } else {
+ # Perhaps we're on a machine that has no drives.
+ $drive = "";
+ }
+ return $drive;
+}
--- a/package_definition.xml Tue Aug 31 16:23:49 2010 +0530
+++ b/package_definition.xml Thu Sep 23 17:42:45 2010 +0530
@@ -5,6 +5,9 @@
<component id="emulatorbsp" name="Emulator BSP" purpose="optional">
<unit bldFile="emulator/emulatorbsp" mrp="emulator/emulatorbsp/base_wins.mrp"/>
</component>
+ <component id="emulatorbsptest" name="Emulator BSP Test" purpose="optional" filter="test">
+ <unit bldFile="emulator/emulatorbsp/test"/>
+ </component>
</collection>
<collection id="haitest" name="HAI Test Suites" level="test">
<component id="bspsvs" name="BSP Verification Suite" introduced="^2" purpose="development">