Subversion Repositories DevTools

Rev

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

Rev 5732 Rev 5757
Line 92... Line 92...
92
    if ( $productFound )
92
    if ( $productFound )
93
    {
93
    {
94
        #
94
        #
95
        #   Compiler flags and definitions
95
        #   Compiler flags and definitions
96
        #
96
        #
97
Warning("TODO: Compiler Flags");
-
 
98
       push @flags , '--endian=little';
97
       push @flags , '--endian=little';
99
       push @flags , '--cpu=Cortex-M3';
98
       push @flags , '--cpu=Cortex-M3';
100
       push @flags , '--diag_suppress=Pa050,Pa091';
99
       push @flags , '--diag_suppress=Pa050,Pa091';
101
       push @flags , '-e';
100
       push @flags , '-e';
102
       push @flags , '--fpu=None';
101
       push @flags , '--fpu=None';
Line 115... Line 114...
115
 
114
 
116
 
115
 
117
        #
116
        #
118
        #   Assembler flags and definitions
117
        #   Assembler flags and definitions
119
        #
118
        #
120
Warning("TODO: Assembler Flags");
-
 
121
#       push @asflags , '-v6';                  # processor configuration
119
#       push @asflags , '-v6';                  # processor configuration
122
#       push @asflags , '-s+';                  # Case-sensitive user symbols
120
#       push @asflags , '-s+';                  # Case-sensitive user symbols
123
#       push @asflags , '-t8';                  # tab spacing...
121
#       push @asflags , '-t8';                  # tab spacing...
124
#       push @asflags , '-u_enhancedCore';      # enable AVR-specific enhanced instructions
122
#       push @asflags , '-u_enhancedCore';      # enable AVR-specific enhanced instructions
125
 
123
 
Line 148... Line 146...
148
 
146
 
149
#.. Cleanup rules
147
#.. Cleanup rules
150
#
148
#
151
#   Files that appear to be created by the compiler
149
#   Files that appear to be created by the compiler
152
#
150
#
153
Warning("TODO: Generated File List");
-
 
154
   ToolsetGenerate( '$(OBJDIR)/tmp*' );
151
   ToolsetGenerate( '$(OBJDIR)/tmp*' );
155
   ToolsetGenerate( '$(LIBDIR)/tmp*' );
152
   ToolsetGenerate( '$(LIBDIR)/tmp*' );
156
   ToolsetGenerate( '$(BINDIR)/tmp*' );
153
   ToolsetGenerate( '$(BINDIR)/tmp*' );
157
 
154
 
158
    #.. Define IAR environment
155
    #.. Define IAR environment
Line 341... Line 338...
341
#       --LinkScript=filename   Specify the name of a linker script file
338
#       --LinkScript=filename   Specify the name of a linker script file
342
#       --Loader=filename       Specify a loader file to be merged
339
#       --Loader=filename       Specify a loader file to be merged
343
#                               This will be a program
340
#                               This will be a program
344
#       --Type=typetext         Text to be placed in type field
341
#       --Type=typetext         Text to be placed in type field
345
#       --Entry=Name            Alternate Program Entry Point
342
#       --Entry=Name            Alternate Program Entry Point
-
 
343
#       --CrcRange=Text         Text used in the elftool command for fill and checksum ranges
-
 
344
#                               ie: app_start-app_checksum_end+3
346
#
345
#
347
#   Output:
346
#   Output:
348
#
347
#
349
#       name.map                - Loadable module
348
#       name.map                - Loadable module
350
#       name.out                - Output from the linker
349
#       name.out                - Output from the linker
Line 359... Line 358...
359
    my( $name, $pArgs, $pObjs, $pLibs ) = @_;
358
    my( $name, $pArgs, $pObjs, $pLibs ) = @_;
360
    my( $script );
359
    my( $script );
361
    my( $loader, $loader_file);
360
    my( $loader, $loader_file);
362
    my  $type_text = '';
361
    my  $type_text = '';
363
    my  $entyPoint = '__iar_program_start';
362
    my  $entyPoint = '__iar_program_start';
-
 
363
    my $crcRange;
364
 
364
 
365
 
365
 
366
#.. Parse arguments
366
#.. Parse arguments
367
#
367
#
368
    foreach $_ ( @$pArgs )
368
    foreach $_ ( @$pArgs )
Line 384... Line 384...
384
            $type_text = $1;
384
            $type_text = $1;
385
 
385
 
386
        } elsif ( /^--Entry=(.*)/ ) {        # Entry Point
386
        } elsif ( /^--Entry=(.*)/ ) {        # Entry Point
387
            $entyPoint = $1;
387
            $entyPoint = $1;
388
 
388
 
-
 
389
        } elsif ( /^--CrcRange=(.*)/ ) {     # Crc Range
-
 
390
            $crcRange = $1;
-
 
391
 
389
        } else {
392
        } else {
390
            Message( "Prog: unknown option $_ -- ignored\n" );
393
            Message( "Prog: unknown option $_ -- ignored\n" );
391
        }
394
        }
392
    }
395
    }
393
 
396
 
Line 430... Line 433...
430
 
433
 
431
#
434
#
432
#   Extend the list of libraries with compiler specific libraries
435
#   Extend the list of libraries with compiler specific libraries
433
#
436
#
434
#    push( @$pLibs, "\$(avr_linker_lib)" );
437
#    push( @$pLibs, "\$(avr_linker_lib)" );
435
Warning("TODO: Add toolset library-1");
-
 
436
 
438
 
437
#
439
#
438
#   Create a ToolsetPrinter
440
#   Create a ToolsetPrinter
439
#
441
#
440
    my ($io) = ToolsetPrinter::New();
442
    my ($io) = ToolsetPrinter::New();
Line 518... Line 520...
518
 
520
 
519
    #
521
    #
520
    #   Specify the library files
522
    #   Specify the library files
521
    #
523
    #
522
#    $io->Cmd( '"-I$(avr_linker_lib_dir)"' );                # Toolset library directory
524
#    $io->Cmd( '"-I$(avr_linker_lib_dir)"' );                # Toolset library directory
523
Warning("TODO: Add toolset library-2");
-
 
524
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );      # Specify the libraries too
525
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );      # Specify the libraries too
525
    $io->Newline();
526
    $io->Newline();
526
 
527
 
527
    #.. Dependency link,
528
    #.. Dependency link,
528
    #   Create a library dependency file
529
    #   Create a library dependency file
Line 541... Line 542...
541
    PackageProgAddFiles ( $name, $full );
542
    PackageProgAddFiles ( $name, $full );
542
    PackageProgAddFiles ( $name, $map , 'Class=map' );
543
    PackageProgAddFiles ( $name, $map , 'Class=map' );
543
 
544
 
544
    #
545
    #
545
    #   Create the .srec file
546
    #   Create the .srec file
-
 
547
    #   (if $3,--fill 0xFF;$3 --checksum checksum:4\,crc32\,0xFFFFFFFF;$3)
546
    #
548
    #
-
 
549
    my  $sRecRange = '';
-
 
550
    if ($crcRange)
-
 
551
    {
-
 
552
        $sRecRange = "--fill \"0xFF;$crcRange\" --checksum \"checksum:4\$(comma)crc32\$(comma)0xFFFFFFFF;$crcRange\"" 
-
 
553
    }
547
    $io->Label( "SREC File", $name );
554
    $io->Label( "SREC File", $name );
548
    $io->Prt( "$srec: $out\n");
555
    $io->Prt( "$srec: $out\n");
549
    $io->Prt( "\t\$(call GENERATE_SREC,$out,$srec)\n");
556
    $io->Prt( "\t\$(call GENERATE_SREC,$out,$srec,$sRecRange)\n");
550
    $io->Newline();
557
    $io->Newline();
551
 
558
 
552
 
559
 
553
    #
560
    #
554
    #   Create the .sxml file
561
    #   Create the .sxml file