Subversion Repositories DevTools

Rev

Rev 396 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 396 Rev 397
Line 73... Line 73...
73
my( $WCEPlatformDefine )        = "";
73
my( $WCEPlatformDefine )        = "";
74
my( $WCEPlatformClean )         = "";
74
my( $WCEPlatformClean )         = "";
75
my( $WCETargetCPU )             = "";
75
my( $WCETargetCPU )             = "";
76
my( $WCEHostCPU )               = "";
76
my( $WCEHostCPU )               = "";
77
my( $WCEToolchain )             = "";
77
my( $WCEToolchain )             = "";
-
 
78
my( $WCEPlatformBase )          = "";
78
 
79
 
79
ToolsetInit();
80
ToolsetInit();
80
 
81
 
81
sub ToolsetInit
82
sub ToolsetInit
82
{
83
{
Line 113... Line 114...
113
 
114
 
114
    Debug( "$toolset_name(PlatformArgs=@::ScmPlatformArgs)" );
115
    Debug( "$toolset_name(PlatformArgs=@::ScmPlatformArgs)" );
115
 
116
 
116
    foreach ( @::ScmPlatformArgs ) {
117
    foreach ( @::ScmPlatformArgs ) {
117
        if (/^--Version=(.*)/) {                # OS Version
118
        if (/^--Version=(.*)/) {                # OS Version
118
            $WCEVersion     = "$1";
119
            $WCEVersion     = $1;
119
 
120
 
120
        } elsif (/^--SDK=(.*)/) {               # SDK
121
        } elsif (/^--SDK=(.*)/) {               # SDK
121
            $WCEPlatform    = "$1";
122
            $WCEPlatform    = $1;
-
 
123
 
-
 
124
        } elsif (/^--SdkBase=(.*)/) {           # SdkBase
-
 
125
            $WCEPlatformBase = $1;
122
 
126
 
123
        } elsif (/^--Target=(.*)/) {            # CPU
127
        } elsif (/^--Target=(.*)/) {            # CPU
124
            $WCETargetCPU   = "$1";
128
            $WCETargetCPU   = $1;
125
 
129
 
126
        } elsif (/^--Host=(.*)/) {              # Emulator host CPU
130
        } elsif (/^--Host=(.*)/) {              # Emulator host CPU
127
            $WCEHostCPU     = "$1";
131
            $WCEHostCPU     = $1;
128
 
132
 
129
        } elsif (/^--Toolchain=(.*)/) {         # Toolchain
133
        } elsif (/^--Toolchain=(.*)/) {         # Toolchain
130
            $WCEToolchain   = "$1";
134
            $WCEToolchain   = $1;
131
 
135
 
132
        } elsif (/^--product=(.*)/) {           # GBE product
136
        } elsif (/^--product=(.*)/) {           # GBE product
133
 
137
 
134
        } elsif (/^--NoDinkumware/) {           # Deprecated switch
138
        } elsif (/^--NoDinkumware/) {           # Deprecated switch
135
 
139
 
Line 195... Line 199...
195
        'PsionTeklogixCE500'=> 'WCE_PLATFORM_STANDARDSDK',
199
        'PsionTeklogixCE500'=> 'WCE_PLATFORM_STANDARDSDK',
196
        'PA961'             => 'WCE_PLATFORM_PA961',
200
        'PA961'             => 'WCE_PLATFORM_PA961',
197
        'PA962'             => 'WCE_PLATFORM_PA962',
201
        'PA962'             => 'WCE_PLATFORM_PA962',
198
        'PA962 WINCE 500'   => 'WCE_PLATFORM_PA962',
202
        'PA962 WINCE 500'   => 'WCE_PLATFORM_PA962',
199
        'M81B_SDK'          => 'WCE_PLATFORM_M81B',         # Just made this one up
203
        'M81B_SDK'          => 'WCE_PLATFORM_M81B',         # Just made this one up
200
        'WCENAUTIZX5'       => 'WCE_PLATFORM_WCENAUTIZX5',  # Just made this one up
204
        'PocketPC'          => 'WIN32_PLATFORM_PSPC',
201
    );
205
    );
202
 
206
 
-
 
207
    unless ( $WCEPlatform eq 'NONE' )
-
 
208
    {
203
    $WCEPlatformDefine = $PlatformSDKDefinitions{$WCEPlatform};
209
        $WCEPlatformDefine = $PlatformSDKDefinitions{$WCEPlatform};
204
 
210
 
205
    Error ("TOOLSET/$toolset_name - SDK not defined. Extend table",
211
        Error ("TOOLSET/$toolset_name - SDK not defined. Extend table",
206
           "SDK: $WCEPlatform" )
212
               "SDK: $WCEPlatform" )
207
        unless ( defined $WCEPlatformDefine );
213
            unless ( defined $WCEPlatformDefine );
208
 
214
 
209
    $WCEPlatformClean = $WCEPlatform;
215
        $WCEPlatformClean = $WCEPlatform;
210
    $WCEPlatformClean =~ s/\s/_/g;
216
        $WCEPlatformClean =~ s/\s/_/g;
-
 
217
    }
-
 
218
    else
-
 
219
    {
-
 
220
        $WCEPlatform = '.';
-
 
221
    }
211
 
222
 
212
    $WCESubsystem = "windowsce," . int($WCEVersion/100) . "." . $WCEVersion%100
223
    $WCESubsystem = "windowsce," . int($WCEVersion/100) . "." . $WCEVersion%100
213
        if ( !defined($WCESubsystem) || $WCESubsystem eq "" );
224
        if ( !defined($WCESubsystem) || $WCESubsystem eq "" );
214
 
225
 
215
        push( @ldflags,     '-debug:full' ) unless ($is_vs2005);
226
        push( @ldflags,     '-debug:full' ) unless ($is_vs2005);
Line 269... Line 280...
269
        push( @ldflags,     '$(CEx86Corelibc)' ) if ($is_vs2005);
280
        push( @ldflags,     '$(CEx86Corelibc)' ) if ($is_vs2005);
270
 
281
 
271
        push( @libflags,    '-MACHINE:THUMB' );
282
        push( @libflags,    '-MACHINE:THUMB' );
272
        
283
        
273
 
284
 
-
 
285
    } elsif ( $WCETargetCPU eq 'armv5t' ) {
-
 
286
        Error ('armv5t only supported under VS2005') unless ( $is_vs2005 );
-
 
287
        $compiler           = 'cl';
-
 
288
        $linker             = 'link';
-
 
289
        $vstool             = 'x86_arm';
-
 
290
        $WCETargetCPU       = 'armv4i';
-
 
291
 
-
 
292
        push  (@defines,    '-DARM', '-D_ARM_', '-DARMV5T');
-
 
293
 
-
 
294
        push (@cflags,      '/QRarch5t' );
-
 
295
        push (@cflags,      '/GS-' );
-
 
296
        push (@cflags,      '/Zl' );
-
 
297
 
-
 
298
        #push( @ldflags,     '-base:0x00010000' );
-
 
299
        push( @ldflags,     '/Manifest:no' );
-
 
300
        push( @ldflags,     '-stack:0x10000,0x1000' );
-
 
301
        push( @ldflags,     '-entry:WinMainCRTStartup' );
-
 
302
        push( @ldflags,     '$(CENoDefaultLib)' );
-
 
303
        push( @ldflags,     '-nodefaultlib:oldnames.lib' ) if (1);
-
 
304
        push( @ldflags,     '-Subsystem:$(CESubsystem)' );
-
 
305
        push( @ldflags,     '-MACHINE:THUMB' );
-
 
306
        push( @ldflags,     'commctrl.lib' );
-
 
307
        push( @ldflags,     'coredll.lib' );
-
 
308
        push( @ldflags,     '$(CEx86Corelibc)' );
-
 
309
 
-
 
310
        push( @libflags,    '-MACHINE:THUMB' );
-
 
311
        
-
 
312
 
-
 
313
 
274
    } elsif ( $WCETargetCPU eq "armv4t" ) {
314
    } elsif ( $WCETargetCPU eq "armv4t" ) {
275
        $compiler           = "clthumb";
315
        $compiler           = "clthumb";
276
        $linker             = "link";
316
        $linker             = "link";
277
        $vstool             = "x86_arm";
317
        $vstool             = "x86_arm";
278
 
318
 
Line 420... Line 460...
420
 
460
 
421
    #
461
    #
422
    #   Determine SDK root
462
    #   Determine SDK root
423
    #   Currently these are well known
463
    #   Currently these are well known
424
    #
464
    #
-
 
465
    if ( $WCEPlatformBase )
-
 
466
    {
-
 
467
        $sdkroot = $WCEPlatformBase.'/'.$WCEPlatform;
-
 
468
    }
-
 
469
    else
-
 
470
    {
425
    $sdkroot = 'Windows CE Tools/wce'.$WCEVersion.'/'.$WCEPlatform;
471
        $sdkroot = 'Windows CE Tools/wce'.$WCEVersion.'/'.$WCEPlatform;
-
 
472
    }
426
    
473
    
427
    Debug( "\twceroot           = $wceroot" );
474
    Debug( "\twceroot           = $wceroot" );
428
    Debug( "\tsdkroot           = $sdkroot" );
475
    Debug( "\tsdkroot           = $sdkroot" );
429
    Debug( "\tWCEVersion        = $WCEVersion" );
476
    Debug( "\tWCEVersion        = $WCEVersion" );
430
    Debug( "\tWCESubsystem      = $WCESubsystem" );
477
    Debug( "\tWCESubsystem      = $WCESubsystem" );