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