1    /*
     2     *  Copyright 2019 by Texas Instruments Incorporated.
     3     *
     4     */
     5    
     6    /*
     7     *  Copyright (c) 2008-2017 Texas Instruments and others.
     8     *  All rights reserved. This program and the accompanying materials
     9     *  are made available under the terms of the Eclipse Public License v1.0
    10     *  which accompanies this distribution, and is available at
    11     *  http://www.eclipse.org/legal/epl-v10.html
    12     *
    13     *  Contributors:
    14     *      Texas Instruments - initial implementation
    15     */
    16    import xdc.bld.ITarget2;
    17    
    18    /*!
    19     *  ======== M3.xdc ========
    20     *  Embedded little endian Cortex M3 bare metal target
    21     *
    22     *  This module defines an embedded bare metal target on Cortex M3. The target
    23     *  generates code compatible with the "v7M" architecture.
    24     *
    25     */
    26    metaonly module M3 inherits IM {
    27        override readonly config string name                = "M3"; 
    28        override readonly config string suffix              = "m3g";
    29        override readonly config string isa                 = "v7M";
    30    
    31        override config string platform     = "ti.platforms.tiva:TM4C1294NCPDT";
    32    
    33        override readonly config ITarget2.Command cc = {
    34            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -MD -MF $@.dep",
    35            opts: "-mcpu=cortex-m3 -mthumb -mabi=aapcs -g"
    36        };
    37    
    38        readonly config ITarget2.Command ccBin = {
    39            cmd: "bin/arm-none-eabi-gcc -c -MD -MF $@.dep",
    40            opts: "-mcpu=cortex-m3 -mthumb -mabi=aapcs -g"
    41        };
    42    
    43        override readonly config ITarget2.Command asm = {
    44            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -x assembler-with-cpp",
    45            opts: "-Wa,-mcpu=cortex-m3 -Wa,-mthumb"
    46        };
    47    
    48        readonly config ITarget2.Command asmBin = {
    49            cmd: "bin/arm-none-eabi-gcc -c -x assembler-with-cpp",
    50            opts: "-Wa,-mcpu=cortex-m3 -Wa,-mthumb"
    51        };
    52    
    53        override config ITarget2.Options lnkOpts = {
    54            prefix: "-mthumb -march=armv7-m -nostartfiles -Wl,-static -Wl,--gc-sections",
    55            suffix: "-L$(packageBase)/libs/install-native/$(GCCTARG)/lib/thumb/v7-m -Wl,--start-group -lgcc -lc -lm -Wl,--end-group --specs=nano.specs -Wl,-Map=$(XDCCFGDIR)/$@.map"
    56        };
    57    
    58        /*!
    59         *  ======== includeOpts ========
    60         *  Additional user configurable target-specific include path options
    61         *
    62         *  This target uses newlib-nano run-time.
    63         */
    64        override config string includeOpts = "-I$(packageBase)/libs/install-native/$(GCCTARG)/include/newlib-nano -I$(packageBase)/libs/install-native/$(GCCTARG)/include";
    65    }
    66    /*
    67     *  @(#) gnu.targets.arm; 1, 0, 0,0; 4-18-2019 17:32:46; /db/ztree/library/trees/xdctargets/xdctargets-t04/src/ xlibrary
    68    
    69     */
    70