1    /* 
     2     *  Copyright (c) 2008 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     *  ======== M4.xdc ========
    16     *  Embedded Cortex M4, little endian, bare metal target
    17     *
    18     *  This module defines an embedded bare metal target on Cortex M4. The target
    19     *  generates code compatible with the "v7M" architecture.
    20     *
    21     */
    22    metaonly module M4 inherits IM {
    23        override readonly config string name                = "M4"; 
    24        override readonly config string suffix              = "m4g";
    25        override readonly config string isa                 = "v7M4";
    26    
    27        override readonly config ITarget2.Command cc = {
    28            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -MD -MF $@.dep",
    29            opts: "-mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mabi=aapcs -g"
    30        };
    31    
    32        readonly config ITarget2.Command ccBin = {
    33            cmd: "bin/arm-none-eabi-gcc -c -MD -MF $@.dep",
    34            opts: "-mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mabi=aapcs -g"
    35        };
    36    
    37        override readonly config ITarget2.Command asm = {
    38            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -x assembler-with-cpp",
    39            opts: "-Wa,-mcpu=cortex-m4 -Wa,-mthumb"
    40        };
    41    
    42        readonly config ITarget2.Command asmBin = {
    43            cmd: "bin/arm-none-eabi-gcc -c -x assembler-with-cpp",
    44            opts: "-Wa,-mcpu=cortex-m4 -Wa,-mthumb"
    45        };
    46    
    47        override config ITarget2.Options lnkOpts = {
    48            prefix: "-mthumb -march=armv7e-m -nostartfiles -Wl,-static -Wl,--gc-sections ",
    49            suffix: "-Wl,--start-group -lgcc -lc -lm -Wl,--end-group -Wl,-Map=$(XDCCFGDIR)/$@.map"
    50        };
    51    }
    52    /*
    53     *  @(#) gnu.targets.arm; 1, 0, 0,0; 2-10-2017 09:06:33; /db/ztree/library/trees/xdctargets/xdctargets-m11/src/ xlibrary
    54    
    55     */
    56