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     *  ======== M4F.xdc ========
    20     *  Embedded Cortex M4F, little endian, bare metal target
    21     *
    22     *  This module defines an embedded bare metal target on Cortex M4F. The target
    23     *  generates code compatible with the "v7M" architecture.
    24     *
    25     */
    26    metaonly module M4F inherits IM {
    27        override readonly config string name                = "M4F";        
    28        override readonly config string suffix              = "m4fg";
    29        override readonly config string isa                 = "v7M4";
    30    
    31        override readonly config ITarget2.Command cc = {
    32            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -MD -MF $@.dep",
    33            opts: "-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mabi=aapcs -g"
    34        };
    35    
    36        readonly config ITarget2.Command ccBin = {
    37            cmd: "bin/arm-none-eabi-gcc -c -MD -MF $@.dep",
    38            opts: "-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mabi=aapcs -g"
    39        };
    40    
    41        override readonly config ITarget2.Command asm = {
    42            cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -x assembler-with-cpp",
    43            opts: "-Wa,-mcpu=cortex-m4 -Wa,-mthumb -Wa,-mfloat-abi=hard -Wa,-mfpu=fpv4-sp-d16 "
    44        };
    45    
    46        readonly config ITarget2.Command asmBin = {
    47            cmd: "bin/arm-none-eabi-gcc -c -x assembler-with-cpp",
    48            opts: "-Wa,-mcpu=cortex-m4 -Wa,-mthumb -Wa,-mfloat-abi=hard -Wa,-mfpu=fpv4-sp-d16 "
    49        };
    50    
    51        override config ITarget2.Options lnkOpts = {
    52            prefix: "-mthumb -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles -Wl,-static -Wl,--gc-sections ",
    53            suffix: "-L$(packageBase)/libs/install-native/$(GCCTARG)/lib/thumb/v7e-m/fpv4-sp/hard -Wl,--start-group -lgcc -lc -lm -Wl,--end-group --specs=nano.specs -Wl,-Map=$(XDCCFGDIR)/$@.map"
    54        };
    55    
    56        /*!
    57         *  ======== includeOpts ========
    58         *  Additional user configurable target-specific include path options
    59         *
    60         *  This target uses newlib-nano run-time.
    61         */
    62        override config string includeOpts = "-I$(packageBase)/libs/install-native/$(GCCTARG)/include/newlib-nano -I$(packageBase)/libs/install-native/$(GCCTARG)/include";
    63    }
    64    /*
    65     *  @(#) gnu.targets.arm; 1, 0, 0,0; 4-18-2019 17:32:46; /db/ztree/library/trees/xdctargets/xdctargets-t04/src/ xlibrary
    66    
    67     */
    68