added host targets
diff --git a/src/targets/gnu/targets/ITarget.xdc b/src/targets/gnu/targets/ITarget.xdc
new file mode 100644
index 0000000..a6a41bf
--- /dev/null
+++ b/src/targets/gnu/targets/ITarget.xdc
@@ -0,0 +1,295 @@
+/*
+ * Copyright (c) 2008-2019 Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*!
+ *  ======== gnu.targets.ITarget ========
+ *  Interface to GCC compatible compilers
+ */
+@TargetHeader("xdc/bld/stddefs.xdt")
+metaonly interface ITarget inherits xdc.bld.ITarget3 {
+
+    override readonly config string stdInclude = "gnu/targets/std.h";
+    override config string dllExt = ".so";
+
+    /*!
+     *  ======== GCCVERS ========
+     *  Version number of the GCC compiler; e.g., "3.2".
+     *
+     *  This string can be supplied by the user, otherwise it is obtained
+     *  by running "gcc -dumpversion".
+     */
+    config string GCCVERS = null;
+
+    /*!
+     *  ======== BINVERS ========
+     *  Version number of binutils used with the compiler; e.g., "2.19".
+     *
+     *  This string can be supplied by the user, otherwise it is obtained
+     *  by running "ld -v".
+     */
+    config string BINVERS = null;
+
+    /*!
+     *  ======== version ========
+     *  The Compatibility Key associated with this target.
+     *
+     *  The first two components of this target's Compatibility Key are '1,0'.
+     *  The rest of the Key represents the compiler version. The third
+     *  component combines the major and the minor version number in the format
+     *  Major.Minor. The fourth component is the patch number.
+     *
+     *  @a(Example)
+     *  If this target's `rootDir` points to the compiler version 3.4.6, the 
+     *  Compatibility Key is [1,0,3.4,6].
+     *
+     */
+    override metaonly config String version;
+
+    /*!
+     *  ======== GCCTARG ========
+     *  The name of the platform executing programs produced by this target
+     *
+     *  This string can be supplied by the user, otherwise is is obtained
+     *  from the compiler and follows the GNU standard format
+     *  (<cpu>-<manufacturer>-<os> or <cpu>-<manufacturer>-<kernel>-<os>);
+     *  e.g., "arm-none-eabi" or "x86_64-unknown-linux-gnu".
+     *
+     *  When building a GCC compiler, there are three different execution
+     *  platforms to consider: the platform used to "build" the compiler, the
+     *  "host" platform that runs the compiler, and the "target" platform
+     *  that runs the executables produced by the compiler. All three
+     *  platforms are identified using a
+     *  {@link http://sources.redhat.com/autobook/autobook/autobook_17.html configuration name}
+     *  defined by GNU Autotools.  `GCCTARG` is the name of the "target"
+     *  platform.
+     */
+    config string GCCTARG = null;
+
+    /*!
+     *  ======== LONGNAME ========
+     *  @_nodoc
+     *  The "long name" of the gcc compiler
+     *
+     *  This name is used (in conjunction with rootDir) to find the compiler
+     *  and linker for this target. The format of `LONGNAME` is always
+     *  "/bin/<machine>-gcc". For majority of the targets, the default value
+     *  for `LONGNAME` does not ever need to be changed. But, there are
+     *  targets where the different but compatible compilers may have
+     *  different `LONGNAME` parameters. For such targets and compilers,
+     *  `LONGNAME` can be set in `config.bld`.
+     *
+     *  @a(Example)
+     *  If a version 2010q1 of the CodeSourcery GNU toolchain for Arm is
+     *  installed in C:/CodeSourcery/arm-2010q1, the following settings in
+     *  `config.bld` configure `gnu.targets.arm.GCArmv6` target to use that
+     *  toolchain:
+     *  @p(code)
+     *  var GCArmv6 = xdc.module("gnu.targets.arm.GCArmv6");
+     *  GCArmv6.rootDir = "C:/CodeSourcery/arm-2010q1"; 
+     *  GCArmv6.LONGNAME = "bin/arm-none-linux-gnueabi-gcc";
+     *  @p
+     *
+     */
+    config string LONGNAME = null;
+
+    /*!
+     *  ======== CYGWIN ========
+     *  Is the target's compiler a cygwin executable
+     *
+     *  Since file names produced by cygwin-based tools differ from the
+     *  names understood by other Windows executables, it is important
+     *  to avoid using the names output by cygwin tools as input to
+     *  non-cygwin programs.  This property tells the target whether
+     *  or not it's possible to use the output from `gcc -MD -MF`, for
+     *  example.
+     */
+    readonly config Bool CYGWIN = false;
+
+    /*!
+     *  ======== noStdLinkScript ========
+     *  Don't use the standard linker script
+     *
+     *  If `true`, add a `-T` flag before the generated `package/cfg/*.xdl`
+     *  file passed to the linker.  This flag suppresses use of the
+     *  standard linker script implicit in the GCC flow, which effectively
+     *  says the generated `.xdl` file assumes total control for all
+     *  `MEMORY` and `SECTION` directives.
+     *
+     */
+    config Bool noStdLinkScript = false;
+
+    /*
+     *  ======== profiles ========
+     */
+    override config xdc.bld.ITarget.OptionSet profiles[string] = [
+	["debug", {
+	    compileOpts: {
+		copts: "-g",
+		defs:  "-D_DEBUG_=1",
+	    },
+	    linkOpts: "-g",
+	}],
+
+	["release", {
+	    compileOpts: {
+		copts: "-O2 -ffunction-sections -fdata-sections",
+	    },
+	    linkOpts: "-Wl,--gc-sections",
+	}],
+
+	["profile", {
+	    compileOpts: {
+		copts: "-g -pg",
+	    },
+	    linkOpts: "-pg"	/* can't use -static here */
+	}],
+
+	["coverage", {
+	    compileOpts: {
+		copts: "-fprofile-arcs -ftest-coverage",
+	    },
+	    linkOpts: "-fprofile-arcs -ftest-coverage",
+	}],
+    ];
+
+    /*!
+     *  ======== versionMap ========
+     *  Map of GCC compiler version numbers to compatibility keys.
+     *
+     *  This map translates version string information from the compiler
+     *  into a compatibility key.  The compatibilty key is used to
+     *  validate consistency among a collection of packages used in
+     *  a configuration.
+     *
+     *  The compiler version string is "gcc<ver>", where <ver> is
+     *  GCCVERS.
+     *
+     *  If a compiler version is not found in this map the default is
+     *  "1,0,<ver>", where <ver> is the compiler version number.  Thus,
+     *  the user only needs to extend this table when a significant
+     *  incompatibility occurs or when two versions of the compiler should
+     *  be treated as 100% compatible.
+     */
+    override config string versionMap[string] = [
+	["gcc3.2", "1,0,3.2,0"],
+    ];
+
+    /*!
+     *  ======== remoteHost ========
+     *  Remote host used to run compiler, linker, and archiver tools
+     *
+     *  If `remoteHost` is `null` (or `undefined`), the configured compiler
+     *  is run locally; otherwise, `remoteHost` is taken to be the host name
+     *  of the machine that that should be used to run the specified compiler.
+     *
+     *  All target commands are prefixed with a command that uses `rsh` to run
+     *  the commands on the specified host.  Thus, in order to use this
+     *  setting, the remote machine must be support `rsh` and the user must
+     *  have permission to run commands from the local machine on the remote
+     *  host named `remoteHost`.  This usually involves adding a line to the
+     *  user's `~/.rhosts` file on the remote machine of the form:
+     *  @p(code)
+     *      local-machine-name user-name
+     *  @p
+     *  where `local-machine-name` is the name of the local machine and
+     * `user-name` is the user's login name on the local machine.
+     */
+    config string remoteHost;
+
+    /*!
+     *  ======== ar ========
+     *  The command used to create an archive
+     */
+    override readonly config xdc.bld.ITarget2.Command ar = {
+	cmd: "$(rootDir)/bin/ar",
+	opts: "cr"
+    };
+
+    /*!
+     *  ======== lnk ========
+     *  The command used to link executables.
+     */
+    override readonly config xdc.bld.ITarget2.Command lnk = {
+	cmd: "$(rootDir)/bin/gcc",
+	opts: ""
+    };
+
+    override config xdc.bld.ITarget2.Options lnkOpts = {
+	prefix: "",
+	suffix: "-Wl,-Map=$(XDCCFGDIR)/$@.map -lstdc++ -L$(rootDir)/lib"
+    };
+
+    /*!
+     *  ======== cc ========
+     *  The command used to compile C/C++ source files into object files
+     */
+    override readonly config xdc.bld.ITarget2.Command cc = {
+        cmd: "$(rootDir)/bin/gcc -c -MD -MF $@.dep",
+        opts: ""
+    };
+
+    /*!
+     *  ======== asm ========
+     *  The command used to assembles assembly source files into object files
+     */
+    override readonly config xdc.bld.ITarget2.Command asm = {
+	cmd: "$(rootDir)/bin/gcc -c -x assembler",
+	opts: ""
+    };
+
+    /*!
+     *  ======== includeOpts ========
+     *  Additional user configurable target-specific include path options
+     */
+    override config string includeOpts = "";
+
+    override config String binaryParser = "xdc.targets.omf.Elf";
+
+    /*
+     *  ======== initVers ========
+     *  The function that detects the version of the Gnu compiler.
+     */
+    String initVers();
+
+    /*!
+     *  ======== asmName ========
+     *  The function that converts a C name into an assembly name
+     */
+    String asmName(String CName);
+
+    /*!
+     *  ======== bspLib ========
+     *  bspLib is assigned the name of the BSP library. The specified library
+     *  is included on the link line.
+     */
+    config string bspLib = null;
+}
diff --git a/src/targets/gnu/targets/ITarget.xs b/src/targets/gnu/targets/ITarget.xs
new file mode 100644
index 0000000..deb8ffa
--- /dev/null
+++ b/src/targets/gnu/targets/ITarget.xs
@@ -0,0 +1,482 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ *
+ * --/COPYRIGHT--*/
+var debug;
+if (debug == null) {
+    debug = function (msg) {};
+}
+
+var _bldUtils = xdc.useModule('xdc.bld.Utils');
+var _utils = xdc.loadCapsule("gnu/targets/_utils.xs");
+
+/*
+ *  ======== _targetEnvs ========
+ *  Environment variable settings required for the compile/link/archive
+ *  commands.
+ */
+var _targetEnvs = "LD_LIBRARY_PATH=";
+
+/*
+ *  ======== ITarget.archive ========
+ */
+function archive(goal)
+{
+    var target = this;
+    var result = null;
+    var tool2cmd = _utils._mkCmds(target);
+
+    if (tool2cmd != null) {
+	result = new xdc.om['xdc.bld'].ITarget.CommandSet;
+	result.msg = "archiving " + goal.files + " into $@ ...";
+	result.envs = _targetEnvs.split("\n");
+	result.cmds = _bldUtils.expandString(tool2cmd["ar"], {
+	    AROPTS_P:	target.arOpts.prefix,
+	    AROPTS_S:	target.arOpts.suffix,
+	    GCCVERS:    target.GCCVERS,
+	    GCCTARG:    target.GCCTARG,
+	    LONGNAME:	target.LONGNAME,
+	    aropts:	goal.opts,
+	    files:	goal.files
+	});
+    }
+
+    return (result);
+}
+
+/*
+ *  ======== ITarget.asmName ========
+ */
+function asmName(cname)
+{
+    return (cname);
+}
+
+/*
+ *  ======== ITarget.compile ========
+ */
+function compile(goal) {
+    return (_compile(this, goal, false));
+}
+
+/*
+ *  ======== ITarget.link ========
+ */
+function link(goal)
+{
+    var target = this;
+    var result = null;
+    var tool2cmd = _utils._mkCmds(target);
+    var fileList = goal.files;
+
+    if ((target.$name != "gnu.targets.Mingw" && target.BINVERS >= "2.19")
+        || target.noStdLinkScript) {
+        fileList = goal.files.replace(/(^|\s+)(\S+\.xdl)($|\s+)/,
+            " -Wl,-T,$2 ");
+    }
+    else if (target.BINVERS == "") {
+      /* support for LLVM linker used by MacOS */
+        fileList = goal.files.replace(/(^|\s+)(\S+\.xdl)($|\s+)/,
+            " @$2 ");
+    }
+
+    var lib = "";
+    /*
+     * bspLib is a config param that can be added to the target. If it is
+     * present, it is expected to contain the name of the BSP library.
+     * The specified library is included on the link line.
+     *
+     * Acceptable values for this field are "nosys" and "rdimon".
+     */
+    if (("bspLib" in target) && target.bspLib != null) {
+        lib = " --specs=" + target.bspLib + ".specs";
+    }
+
+    if (tool2cmd != null) {
+	result = new xdc.om['xdc.bld'].ITarget.CommandSet;
+	result.msg = "lnk" + target.suffix + " $@ ...";
+	result.envs = _targetEnvs.split("\n");
+	result.cmds = _bldUtils.expandString(tool2cmd["link"], {
+	    LOPTS_P:	target.lnkOpts == null ? "" : target.lnkOpts.prefix,
+	    LOPTS_S:	target.lnkOpts == null ? "" : (target.lnkOpts.suffix + lib),
+	    GCCVERS:    target.GCCVERS,
+	    GCCTARG:    target.GCCTARG,
+	    LONGNAME:	target.LONGNAME,
+	    lopts:	goal.opts,
+	    files:	fileList
+	});
+    }
+
+    return (result);
+}
+
+/*
+ *  ======== ITarget.genVisibleData ========
+ *
+ *  This function is invoked at the config time, therefore we can check the
+ *  build profile.
+ */
+function genVisibleData(quals, types, names)
+{
+    if (xdc.om.$name != 'cfg') {
+        return (null);
+    }
+
+    var sb = new java.lang.StringBuilder();
+    for (var i = 0; i < names.length; i++) {
+        sb.append(quals[i] + " " + types[i] + " " + names[i]
+            + " __attribute__ ((externally_visible));\n");
+    }
+    return (sb.toString() + "");
+}
+
+/*
+ *  ======== genVisibleFxns ========
+ */
+function genVisibleFxns(types, names, args)
+{
+    if (xdc.om.$name != 'cfg') {
+        return (null);
+    }
+
+    var sb = new java.lang.StringBuilder();
+    for (var i = 0; i < names.length; i++) {
+        sb.append(types[i] + " " + names[i] + "(" + args[i] + ")"
+            + " __attribute__ ((externally_visible));\n");
+    }
+    return (sb.toString() + "");
+}
+
+/*
+ *  ======== ITarget.getVersion ========
+ */
+function getVersion()
+{
+    var target = this;
+
+    _utils._mkCmds(target);
+
+    var result = target.$name + "{";
+    var key;
+
+    if ((key = target.versionMap["gcc" + target.GCCVERS]) == null) {
+	/* map 2.3.4 to "1,0,2.3,4", 2.3 to "1,0,2.3", and 2 to "1,0,2" */
+	key = "1,0";
+	var va = target.GCCVERS.split('.');
+	for (var i = 0; i < va.length; i++) {
+	    key += (i == 1 ? '.' : ',') + va[i];
+	}
+    }
+    result += key;
+
+    return (result);
+}
+
+/*
+ *  ======== ITarget.getRawVersion ========
+ */
+function getRawVersion()
+{
+    var target = this;
+    _utils._mkCmds(target);;
+    return (target.GCCVERS);
+}
+
+
+/*
+ *  ======== ITarget.scompile ========
+ */
+function scompile(goal) {
+    return (_compile(this, goal, true));
+}
+
+/*
+ *  ======== _compile ========
+ */
+function _compile(target, goal, asm)
+{
+    var result = null;
+    var tool2cmd = _utils._mkCmds(target);    /* get tool to template map */
+
+    if (tool2cmd != null) {
+	var ext = target.extensions[goal.srcSuffix];
+	if (ext != null) {
+	    if (asm == true && ext.typ == "asm") {
+		return (null);
+	    }
+
+	    result = new xdc.om['xdc.bld'].ITarget.CommandSet;
+	    result.msg = (ext.typ == "c" ? "cl" : ext.typ)
+			    + target.suffix
+			    + (asm == true ? " -S $< ..." : " $< ...");
+
+	    var dstDir = goal.dstPrefix + goal.base;
+	    dstDir = dstDir.replace(/[^\/\\]*$/, "");
+
+            var ccoptsPre = target.ccOpts.prefix;
+            var ccoptsSuf = target.ccOpts.suffix;
+            /* If the target defines ccConfigOpts, they should be used
+             * instead of ccOpts. The string expansion has to be done here,
+             * in the case ccConfigOpts contains COPTS. If the expansion was
+             * left for the end of the function, there would be an infinite
+             * recursion.
+             */
+            if ("ccConfigOpts" in target && goal.configOpts == true) {
+                ccoptsPre = _bldUtils.expandString(target.ccConfigOpts.prefix,
+                    {"ccOpts.prefix": target.ccOpts.prefix});
+                ccoptsSuf = _bldUtils.expandString(target.ccConfigOpts.suffix,
+                    {"ccOpts.suffix": target.ccOpts.suffix});
+            }
+
+            result.envs = _targetEnvs.split("\n");
+
+            result.cmds = _bldUtils.expandString(tool2cmd[ext.typ], {
+                COPTS_P:    ccoptsPre,
+                COPTS_S:    ccoptsSuf,
+                AOPTS_P:    target.asmOpts.prefix,
+                AOPTS_S:    target.asmOpts.suffix,
+                GCCVERS:    target.GCCVERS,
+                GCCTARG:    target.GCCTARG,
+                LONGNAME:   target.LONGNAME,
+                ASMONLY:    asm ? "-S" : "",
+                dstDir:     dstDir,
+                srcExt:     goal.srcSuffix,
+                copts:      goal.configOpts ? goal.opts.cfgcopts :
+                                              goal.opts.copts,
+                aopts:      goal.opts.aopts,
+                defs:       goal.opts.defs,
+                incs:       goal.opts.incs
+            });
+        }
+    }
+
+    return (result);
+}
+
+/*
+ *  ======== _init ========
+ *  Initialize this capsule at package init time.
+ */
+function _init(pkg)
+{
+    _thisPkg = pkg;
+}
+
+/*
+ *  ======== initVers ========
+ *  Initialize target.GCCVERS, target.GCCTARG and target.BINVERS, if they are
+ *  not already initialized by a previous call to initVers() or by the user
+ *  via the config.bld script.
+ */
+function initVers()
+{
+    var target = this;
+    if (target.$private.vers == true || target.rootDir == null) {
+	return;
+    }
+
+    var prefix = "";
+    if (target.remoteHost != null) {
+	prefix = target.$package.packageBase
+	    + "/runh -h " + target.remoteHost + " ";
+    }
+    else if ("cmdPrefix" in target.$orig
+	     && target.$orig.cmdPrefix != undefined) {
+        prefix = target.$orig.cmdPrefix;
+    }
+
+    function askLd(target)
+    {
+        var ldCmd = target.rootDir + "/bin/ld";
+        var queryLd = target.rootDir + "/bin/gcc -print-prog-name=ld";
+        var status = {};
+        if (xdc.exec(queryLd, null, status) >= 0) {
+            ldCmd = status.output.match(/(.*)\s*/)[1];
+            /* if full path, use that path for finding BINVERS and for 'ar',
+             * else look for 'ld' and 'ar' on PATH.
+             */
+            target.ar.$unseal("cmd");
+            if (!((new java.io.File(status.output)).isAbsolute())) {
+                /* binutils are found on the path, we need to fix up 'ar' */
+                var status2 = {};
+                if (xdc.exec("which ar", null, status2) >= 0) {
+                    target.ar.cmd = status2.output.match(/(.*)\s*/)[1];
+                }
+                else {
+                    throw new Error("Cannot determine 'ar' executable: "
+                        + status.output);
+                }
+            }
+            else {
+                target.ar.cmd 
+                    = new java.io.File(ldCmd.match(/(.*)ld\s*$/)[1] + "ar").
+                    getCanonicalPath();
+            }
+            target.ar.$seal("cmd");
+        }
+        else {
+            throw new Error("Cannot determine 'ld' executable: "
+                + status.output + ". Ensure that rootDir for the '"
+                + target.name + "' target is set correctly in "
+                + java.lang.System.getenv("XDCBUILDCFG"));
+        }
+
+	var cmd = prefix + ldCmd + " -v";
+	status = {};
+	if (xdc.exec(cmd, null, status) >= 0) {
+            /* codesourcery loaders since 2010-q3 print an internal version
+             * number inside parenthesis. We don't want to pick up that one.
+             */
+            var va = status.output.match(/(?:\(.*\))?\s(\d\.\d+)/);
+            if (va != null) {
+                return (va[1]);
+	    }
+	    else {
+		print(target.$name + ": warning: failed to parse '-v' output "
+		    + "(= '" + status.output + "'); check compiler options");
+	    }
+	}
+	else {
+	    print(target.$name + ": warning: exec of '" + cmd + "' failed:"
+		+ status.output + "; check tools installation");
+	}
+
+	return ("");
+    }
+
+    function askGcc(target, opt, filter)
+    {
+        var gccCmd = target.rootDir + "/bin/gcc";
+
+        /* If the gcc executable cannot be found, and the prefix is not used,
+         * it's probably a misspelled directory path.
+         */
+        if (prefix == "") {
+            var file = new java.io.File(gccCmd);
+            if (!file.exists()
+                && !(new java.io.File(gccCmd + ".exe").exists())) {
+                throw new Error(gccCmd + " cannot be found. Ensure that "
+                    + "rootDir for the " + target.name + " target is set "
+                    + "correctly in " + java.lang.System.getenv("XDCBUILDCFG"));
+            }
+        }
+
+	var cmd = prefix + gccCmd + " " + opt;
+	var status = {};
+
+	var attrs = null;
+
+	/* If remote execution is run through a script, that script may need
+	 * PATH or other environment variables.
+	 */
+	if  ("cmdPrefix" in target.$orig
+	    && target.$orig.cmdPrefix != undefined) {
+	    attrs = {useEnv: true};
+	}
+
+	if (xdc.exec(cmd, attrs, status) >= 0) {
+	    var va = status.output.match(filter);
+	    if (va != null) {
+		return (va[0]);
+	    }
+	    else {
+		print(target.$name + ": warning: failed to parse '"
+		    + opt + "' output (= '" + status.output + "')"+
+           "; check compiler options");
+	    }
+	}
+	else {
+	    print(target.$name + ": warning: exec of '" + cmd + "' failed:"
+		+ status.output + "; check tools installation");
+	}
+
+	return ("");
+    }
+
+//	print("setting " + target.$name + ".GCCVERS and .GCCTARG to ''");
+
+    /* BUG: we should compare against target's tool-chain os */
+    if (target.GCCTARG != null && target.GCCVERS != null
+        && target.BINVERS != null) {
+        return;
+    }
+
+    target.$unseal("GCCVERS");
+    target.$unseal("GCCTARG");
+    target.$unseal("BINVERS");
+
+    /* call compiler to get its version number and set GCCVERS */
+    var result;
+    if (target.GCCVERS == null) {
+	if ((result = askGcc(target, "-dumpversion", /^[\d\.]+/)) == "") {
+	    print(target.$name + ": warning: can't determine gcc version; ");
+	    print("Check if " + target.rootDir + "/bin/gcc can run on ");
+	    if (target.remoteHost != null) {
+	        print(target.remoteHost + ". ");
+	    }
+	    else {
+	        print(xdc.om['xdc.bld'].BuildEnvironment.hostOSName + ". ");
+	    }
+	    print("Also, try explicitly setting the GCCVERS configuration "
+	        + "parameter.");
+	}
+//	print("setting " + target.$name + ".GCCVERS to " + result);
+	target.GCCVERS = result;
+    }
+
+    /* call compiler to get its target machine and set GCCTARG */
+    if (target.GCCTARG == null) {
+	if ((result = askGcc(target, "-dumpmachine", /^[\w-\.]+/)) == "") {
+	    print(target.$name + ": warning: can't determine gcc target; ");
+	    print("Check if " + target.rootDir + "/bin/gcc can run on ");
+	    if (target.remoteHost != null) {
+	        print(target.remoteHost + ". ");
+	    }
+	    else {
+	        print(xdc.om['xdc.bld'].BuildEnvironment.hostOSName + ". ");
+	    }
+	    print("Also, try explicitly setting the GCCTARG configuration "
+	        + "parameter.");
+	}
+//	print("setting " + target.$name + ".GCCTARG to " + result);
+	target.GCCTARG = result;
+    }
+
+    if (target.$name != "gnu.targets.Mingw" && target.BINVERS != "") {
+        /* We'll call askLd even if BINVERS is set because we need to find the
+         * right path to 'ar'.
+         */
+        result = askLd(target);
+        if (target.BINVERS == null) {
+	    if (result == "") {
+	        print(target.$name
+                    + ": warning: can't determine binutils version; ");
+	        print("Check if " + target.rootDir + "/bin/ld can run on ");
+	        if (target.remoteHost != null) {
+	            print(target.remoteHost + ". ");
+	        }
+	        else {
+	            print(xdc.om['xdc.bld'].BuildEnvironment.hostOSName + ". ");
+	        }
+	        print("Also, try explicitly setting the BINVERS configuration "
+	            + "parameter.");
+            }
+            else {
+	        target.BINVERS = result;
+            }
+        }
+    }
+
+    target.$seal("GCCVERS");
+    target.$seal("GCCTARG");
+    target.$seal("BINVERS");
+
+    target.$private.vers = true;
+}
diff --git a/src/targets/gnu/targets/Linux86.xdc b/src/targets/gnu/targets/Linux86.xdc
new file mode 100644
index 0000000..2537383
--- /dev/null
+++ b/src/targets/gnu/targets/Linux86.xdc
@@ -0,0 +1,92 @@
+/*!
+ *  ======== Linux86.xdc ========
+ *  Native 32-bit x86 Linux target (ILP32)
+ *
+ *  This module defines the native target for 32-bit (ILP32) Linux
+ *  on an x86 platform.
+ */
+metaonly module Linux86 inherits gnu.targets.ITarget {
+    override readonly config string name	= "Linux86";
+    override readonly config string os		= "Linux";
+    override readonly config string suffix	= "86U";
+    override readonly config string isa		= "i686";
+    override readonly config xdc.bld.ITarget.Model model= {
+	endian: "little"
+    };
+    override readonly config string rts		= "gnu.targets.rts86U";
+    override config string platform		= "host.platforms.PC";
+
+    /*!
+     *  ======== cc ========
+     *  The command used to compile C/C++ source files into object files
+     *
+     *  The `-m32` flag is required to ensure that this target supports
+     *  32-bit Linux systems.
+     */
+    override readonly config xdc.bld.ITarget2.Command cc = {
+        cmd: "$(rootDir)/bin/gcc -c -MD -MF $@.dep",
+        opts: "-m32"
+    };
+
+    /*!
+     *  ======== asm ========
+     *  The command used to assembles assembly source files into object files
+     */
+    override readonly config xdc.bld.ITarget2.Command asm = {
+	cmd: "$(rootDir)/bin/gcc -c -x assembler",
+	opts: "-m32"
+    };
+
+    /*!
+     *  ======== lnk ========
+     *  The command used to link executables.
+     *
+     *  The `-m32` flag is required to ensure that this target supports
+     *  32-bit Linux systems.
+     */
+    override readonly config xdc.bld.ITarget2.Command lnk = {
+	cmd: "$(rootDir)/bin/gcc",
+	opts: "-m32"
+    };
+
+    /*
+     *  ======== ccOpts ========
+     */
+    override config xdc.bld.ITarget2.Options ccOpts = {
+	prefix: "-fPIC -Wunused",
+	suffix: "-Dfar="
+    };
+
+    /*
+     *  ======== includeOpts ========
+     *  $(rootDir)/include	  - contains compiler specific headers
+     *
+     *  GCC compilers for Linux automatically add this directory, but at least
+     *  in some cases, the directory is added searched after standard system
+     *  directories. This way, we ensure $(rootDir)/include is searched
+     *  before standard system directories.
+     */
+    override config string includeOpts = "-isystem $(rootDir)/include";
+
+    /*
+     *  ======== stdTypes ========
+     */
+    override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
+	t_IArg		: { size: 4, align: 4 },
+	t_Char		: { size: 1, align: 1 },
+	t_Double	: { size: 8, align: 4 },
+	t_Float		: { size: 4, align: 4 },
+	t_Fxn		: { size: 4, align: 4 },
+	t_Int		: { size: 4, align: 4 },
+	t_Int8		: { size: 1, align: 1 },
+	t_Int16		: { size: 2, align: 2 },
+	t_Int32		: { size: 4, align: 4 },
+	t_Int64		: { size: 8, align: 4 },
+	t_Long		: { size: 4, align: 4 },
+	t_LDouble	: { size: 12, align: 4 },
+	t_LLong		: { size: 8, align: 4 },
+	t_Ptr		: { size: 4, align: 4 },
+	t_Short		: { size: 2, align: 2 },
+	t_Size          : { size: 4, align: 4 },
+    };
+}
diff --git a/src/targets/gnu/targets/Linux86.xs b/src/targets/gnu/targets/Linux86.xs
new file mode 100644
index 0000000..703142a
--- /dev/null
+++ b/src/targets/gnu/targets/Linux86.xs
@@ -0,0 +1,22 @@
+/*
+ *  ======== Linux86.getISAChain ========
+ *  Linux86 implementation for ITarget.getISAChain()
+ */
+function getISAChain (isa)
+{
+    var myChain = ["x86", this.isa];
+    var isaIn = (isa == null ? this.isa : isa);
+
+    for (var i = 0; i < myChain.length; i++) {
+        if (myChain[i] == isaIn) {
+            break;
+        }
+    }
+
+    if (i == myChain.length) {
+        return (null);
+    }
+    else {
+        return (myChain.slice(0, i + 1));
+    }
+}
diff --git a/src/targets/gnu/targets/Linux86_64.xdc b/src/targets/gnu/targets/Linux86_64.xdc
new file mode 100644
index 0000000..f58cd7f
--- /dev/null
+++ b/src/targets/gnu/targets/Linux86_64.xdc
@@ -0,0 +1,97 @@
+/*!
+ *  ======== Linux86_64.xdc ========
+ *  @_nodoc
+ *  Native 64-bit x86 Linux target (LP64)
+ *
+ *  This module defines the native target for 64-bit (LP64) Linux
+ *  on an x86 platform.
+ */
+metaonly module Linux86_64 inherits gnu.targets.ITarget {
+    override readonly config string name	= "Linux86_64";
+    override readonly config string os		= "Linux";
+    override readonly config string suffix	= "86_64U";
+    override readonly config string isa		= "i686";
+    override readonly config xdc.bld.ITarget.Model model= {
+	endian: "little"
+    };
+    override readonly config string rts		= "gnu.targets.rts86U";
+    override config string platform		= "host.platforms.PC";
+
+    readonly config Bool arrayTypeVaList                = true;
+
+    /*!
+     *  ======== cc ========
+     *  The command used to compile C/C++ source files into object files
+     */
+    override readonly config xdc.bld.ITarget2.Command cc = {
+        cmd: "$(rootDir)/bin/gcc -c -MD -MF $@.dep",
+        opts: "-m64"
+    };
+
+    /*!
+     *  ======== asm ========
+     *  The command used to assembles assembly source files into object files
+     */
+    override readonly config xdc.bld.ITarget2.Command asm = {
+	cmd: "$(rootDir)/bin/gcc -c -x assembler",
+	opts: "-m64"
+    };
+
+    /*!
+     *  ======== lnk ========
+     *  The command used to link executables.
+     */
+    override readonly config xdc.bld.ITarget2.Command lnk = {
+	cmd: "$(rootDir)/bin/gcc",
+	opts: "-m64"
+    };
+
+    /*
+     *  ======== ccOpts ========
+     */
+    override config xdc.bld.ITarget2.Options ccOpts = {
+	prefix: "-fPIC -Wunused",
+	suffix: "-Dfar="
+    };
+
+    /*
+     *  ======== lnkOpts ========
+     */
+    override config xdc.bld.ITarget2.Options lnkOpts = {
+	prefix: "",
+	suffix: "-Wl,-Map=$(XDCCFGDIR)/$@.map -lstdc++ -L$(rootDir)/lib64"
+    };
+
+    /*
+     *  ======== includeOpts ========
+     *  $(rootDir)/include	  - contains compiler specific headers
+     *
+     *  GCC compilers for Linux automatically add this directory, but at least
+     *  in some cases, the directory is added searched after standard system
+     *  directories. This way, we ensure $(rootDir)/include is searched
+     *  before standard system directories.
+     */
+    override config string includeOpts = "-isystem $(rootDir)/include";
+
+    /*
+     *  ======== stdTypes ========
+     */
+    override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
+	t_IArg		: { size: 8, align: 8 },
+	t_Char		: { size: 1, align: 1 },
+	t_Double	: { size: 8, align: 8 },
+	t_Float		: { size: 4, align: 4 },
+	t_Fxn		: { size: 8, align: 8 },
+	t_Int		: { size: 4, align: 4 },
+	t_Int8		: { size: 1, align: 1 },
+	t_Int16		: { size: 2, align: 2 },
+	t_Int32		: { size: 4, align: 4 },
+	t_Int64		: { size: 8, align: 8 },
+	t_Long		: { size: 8, align: 8 },
+	t_LDouble	: { size: 16, align: 16 },
+	t_LLong		: { size: 8, align: 8 },
+	t_Ptr		: { size: 8, align: 8 },
+	t_Short		: { size: 2, align: 2 },
+	t_Size          : { size: 8, align: 8 },
+    };
+}
diff --git a/src/targets/gnu/targets/MacOS86_64.xdc b/src/targets/gnu/targets/MacOS86_64.xdc
new file mode 100644
index 0000000..a43e2ee
--- /dev/null
+++ b/src/targets/gnu/targets/MacOS86_64.xdc
@@ -0,0 +1,136 @@
+/*!
+ *  ======== MacOS86_64.xdc ========
+ *  @_nodoc
+ *  Native 64-bit x86 MacOS target (LP64)
+ *
+ *  This module defines the native target for 64-bit (LP64) MacOS
+ *  on an x86 platform.
+ */
+metaonly module MacOS86_64 inherits gnu.targets.ITarget {
+    override readonly config string name    = "MacOS86_64";
+    override readonly config string os	    = "MacOS";
+    override readonly config string suffix  = "86_64M";
+    override readonly config string isa	    = "i686";
+    override readonly config xdc.bld.ITarget.Model model= {
+	endian: "little"
+    };
+    override readonly config string rts	    = "gnu.targets.rts86M";
+    override config string platform	    = "host.platforms.macos";
+
+    readonly config Bool arrayTypeVaList    = true;
+
+    /*!
+     *  ======== cc ========
+     *  The command used to compile C/C++ source files into object files
+     */
+    override readonly config xdc.bld.ITarget2.Command cc = {
+        cmd: "$(rootDir)/bin/gcc -c -MD -MF $@.dep",
+        opts: "-m64"
+    };
+
+    /*!
+     *  ======== asm ========
+     *  The command used to assembles assembly source files into object files
+     */
+    override readonly config xdc.bld.ITarget2.Command asm = {
+	cmd: "$(rootDir)/bin/gcc -c -x assembler",
+	opts: "-m64"
+    };
+
+    /*!
+     *  ======== lnk ========
+     *  The command used to link executables.
+     */
+    override readonly config xdc.bld.ITarget2.Command lnk = {
+	cmd: "$(rootDir)/bin/gcc",
+	opts: "-m64"
+    };
+
+    /*!
+     *  ======== cmdPrefix ========
+     *  Prefix to put in front of each command
+     *
+     *  This string is put in front of every Command before being passed to
+     *  the shell for execution.  This string can be used to run the compiler
+     *  in emulation environments, for example.
+     */
+    config String cmdPrefix = "";
+
+    /*
+     *  ======== ccOpts ========
+     */
+    override config xdc.bld.ITarget2.Options ccOpts = {
+	prefix: "-fPIC -Wunused",
+	suffix: "-Dfar="
+    };
+
+    /*
+     *  ======== lnkOpts ========
+     */
+    override config xdc.bld.ITarget2.Options lnkOpts = {
+	prefix: "",
+	suffix: "-lstdc++ -L$(rootDir)/lib"
+    };
+
+    /*
+     *  ======== includeOpts ========
+     *  $(rootDir)/include	  - contains compiler specific headers
+     *
+     *  GCC compilers for MacOS automatically add this directory, but at least
+     *  in some cases, the directory is added searched after standard system
+     *  directories. This way, we ensure $(rootDir)/include is searched
+     *  before standard system directories.
+     */
+    override config string includeOpts = "-isystem $(rootDir)/include";
+
+    /*
+     *  ======== BINVERS ========
+     *  MacOS gcc compilers _don't_ use binutils; they use the
+     *  LLVM linker  So, we use "" to indicate that binutils is
+     *  not present.
+     */
+    override config string BINVERS = "";
+
+    /*
+     *  ======== profiles ========
+     */
+    override config xdc.bld.ITarget.OptionSet profiles[string] = [
+	["debug", {
+	    compileOpts: {
+		copts: "-g",
+		defs:  "-D_DEBUG_=1",
+	    },
+	    linkOpts: "",
+	}],
+
+	["release", {
+	    compileOpts: {
+		copts: "-O2 -ffunction-sections -fdata-sections",
+	    },
+	    linkOpts: "",
+	}],
+
+    ];
+
+    /*
+     *  ======== stdTypes ========
+     */
+    override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
+	t_IArg		: { size: 8, align: 8 },
+	t_Char		: { size: 1, align: 1 },
+	t_Double	: { size: 8, align: 8 },
+	t_Float		: { size: 4, align: 4 },
+	t_Fxn		: { size: 8, align: 8 },
+	t_Int		: { size: 4, align: 4 },
+	t_Int8		: { size: 1, align: 1 },
+	t_Int16		: { size: 2, align: 2 },
+	t_Int32		: { size: 4, align: 4 },
+	t_Int64		: { size: 8, align: 8 },
+	t_Long		: { size: 8, align: 8 },
+	t_LDouble	: { size: 16, align: 16 },
+	t_LLong		: { size: 8, align: 8 },
+	t_Ptr		: { size: 8, align: 8 },
+	t_Short		: { size: 2, align: 2 },
+	t_Size          : { size: 8, align: 8 },
+    };
+}
diff --git a/src/targets/gnu/targets/Mingw.xdc b/src/targets/gnu/targets/Mingw.xdc
new file mode 100644
index 0000000..2f24dd4
--- /dev/null
+++ b/src/targets/gnu/targets/Mingw.xdc
@@ -0,0 +1,56 @@
+/*!
+ *  ======== Mingw.xdc ========
+ *  MinGW native Windows target
+ *
+ *  This module defines a native target for Windows using the mingw compiler.
+ *
+ *  The mingw compiler is a freely available (www.mingw.org) port of GCC that
+ *  can build Windows compatible libraries, DLLs, and executables.
+ */
+metaonly module Mingw inherits gnu.targets.ITarget {
+    override readonly config string name		 = "Mingw";	
+    override readonly config string os			 = "Windows";	
+    override readonly config string suffix		 = "86GW";
+    override readonly config string isa			 = "x86";	
+    override readonly config xdc.bld.ITarget.Model model = {
+	endian: "little"
+    };
+
+    override readonly config string rts	= "gnu.targets.rts86GW";
+
+    override config string platform = "host.platforms.PC";
+
+    /*!
+     *  ======== cmdPrefix ========
+     *  Prefix to put in front of each command
+     *
+     *  This string is put in front of every Command before being passed to
+     *  the shell for execution.  This string can be used to run the compiler
+     *  in emulation environments.
+     */
+    config String cmdPrefix = "";
+
+    override config xdc.bld.ITarget2.Options ccOpts = {
+	prefix: "-Wunused",
+	suffix: "-Dfar= "
+    };
+
+    override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
+	t_IArg		: { size: 4, align: 4 },
+	t_Char		: { size: 1, align: 1 },
+	t_Double	: { size: 8, align: 4 },
+	t_Float		: { size: 4, align: 4 },
+	t_Fxn		: { size: 4, align: 4 },
+	t_Int		: { size: 4, align: 4 },
+	t_Int8		: { size: 1, align: 1 },
+	t_Int16		: { size: 2, align: 2 },
+	t_Int32		: { size: 4, align: 4 },
+	t_Int64		: { size: 8, align: 4 },
+	t_Long		: { size: 4, align: 4 },
+	t_LDouble	: { size: 12, align: 4 },
+	t_LLong		: { size: 8, align: 4 },
+	t_Ptr		: { size: 4, align: 4 },
+	t_Short		: { size: 2, align: 2 },
+	t_Size 		: { size: 4, align: 4 },
+    };
+}
diff --git a/src/targets/gnu/targets/Mingw.xs b/src/targets/gnu/targets/Mingw.xs
new file mode 100644
index 0000000..20122f3
--- /dev/null
+++ b/src/targets/gnu/targets/Mingw.xs
@@ -0,0 +1,41 @@
+/*
+ *  ======== Mingw.archive ========
+ */
+function archive(goal)
+{
+    var result = this.$super.archive.$fxn.call(this, goal);
+    var path = ".;$(rootDir)/bin;$(PATH)";
+    result.path = path.split(";"); 
+    return (result);
+}
+
+/*
+ *  ======== Mingw.compile ========
+ */
+function compile(goal) {
+    var result = this.$super.compile.$fxn.call(this, goal, false);
+    var path = ".;$(rootDir)/bin;$(PATH)";
+    result.path = path.split(";"); 
+    return (result);
+}
+
+
+/*
+ *  ======== Mingw.link ========
+ */
+function link(goal) {
+    var result = this.$super.link.$fxn.call(this, goal);
+    var path = ".;$(rootDir)/bin;$(PATH)";
+    result.path = path.split(";"); 
+    return (result);
+}
+
+/*
+ *  ======== Mingw.scompile ========
+ */
+function scompile(goal) {
+    var result = this.$super.scompile.$fxn.call(this, goal, true);
+    var path = ".;$(rootDir)/bin;$(PATH)";
+    result.path = path.split(";"); 
+    return (result);
+}
diff --git a/src/targets/gnu/targets/_utils.xs b/src/targets/gnu/targets/_utils.xs
new file mode 100644
index 0000000..c395f44
--- /dev/null
+++ b/src/targets/gnu/targets/_utils.xs
@@ -0,0 +1,102 @@
+/*
+ *  ======== _targetCmds ========
+ *  Hash table of commands (indexed by target.suffix).  Commands are
+ *  themselves hashtables (indexed by file type: "asm", "c", ...) that
+ *  define the commands for cc, asm , etc.
+ */
+var _targetCmds = null;
+
+/*
+ *  ======== _mkCmds ========
+ */
+function _mkCmds(target)
+{
+
+    if (_targetCmds == null) {
+        _targetCmds = {};
+    }
+
+    if (_targetCmds[target.suffix] != null) {
+        return (_targetCmds[target.suffix]);
+    }
+
+    /* Is this needed here? It doesn't seem that anything calculated in
+     * initVers() is used later.
+     */
+    target.initVers();
+
+    var cmd, cmdOpts;
+    var tool2cmd = {};
+
+    var prefix = "";
+    var ccCmd = target.cc.cmd;
+    if (target.remoteHost != null) {
+	prefix = "$(packageBase)/runh -h " + target.remoteHost + " ";
+
+        /* it is not sufficient to simply overwrite the .dep file; network
+         * filesystem latencies can result in file corruption
+         */
+        ccCmd = ccCmd.replace("-MD -MF $@.dep", "");
+    }
+    else if ("cmdPrefix" in target.$orig && target.$orig.cmdPrefix != undefined) {
+        prefix = target.$orig.cmdPrefix;
+
+        /* it is not sufficient to simply overwrite the .dep file; network
+         * filesystem latencies can result in file corruption
+         */
+        ccCmd = ccCmd.replace("-MD -MF $@.dep", "");
+    }
+
+    var mkdep = null;
+    if (target.remoteHost != null || target.name == "Mingw" ||
+        (environment["xdc.hostOS"] == "Windows" && target.CYGWIN == true)) {
+        /* make dependencies command; we compute this rather than adding
+         * "-MD -MF $@.dep" to the command line to ensure that dependency file
+         * names are local.  If the names are computed remotely we run the
+         * risk that non-existent files will constantly trigger unnecessary
+         * rebuilds.  We also need to do this for cygwin environments because
+         * we are using a natively built GNU make which does not understand
+         * cygwin file names.
+         */
+        mkdep = "\n$(MKDEP) -o $@.dep -p $(dstDir) -s o"
+	    + target.suffix + " $< -C ";
+    }
+
+    /* define assemble command template */
+    cmdOpts = " $(AOPTS_P) "
+        + target.asm.opts
+	+ " $(AOPTS_S) $(defs) $(aopts) $(incs) $(XDCINCS) "
+        + target.includeOpts;
+    cmd  = prefix + target.asm.cmd + cmdOpts + " -o $@ $<";
+    cmd = mkdep == null ? cmd : cmd.concat(mkdep + cmdOpts);
+    tool2cmd["asm"] = cmd;
+
+    /* define the C compile command template */
+    cmdOpts = "$(COPTS_P) " + target.cc.opts
+	+ " $(COPTS_S) $(defs) $(copts) $(incs) $(XDCINCS) "
+	+ target.includeOpts;
+    cmd = prefix + ccCmd
+        + " -x c $(ASMONLY) " + cmdOpts + " -o $@ $<";
+    tool2cmd["c"] = mkdep == null ? cmd : cmd.concat(mkdep + cmdOpts);
+
+    /* define the C++ compile command template */
+    cmd = prefix + ccCmd
+        + " -x c++ $(ASMONLY) " + cmdOpts + " -o $@ $<";
+    tool2cmd["cpp"] = mkdep == null ? cmd : cmd.concat(mkdep + cmdOpts);
+
+    /* define the link command template */
+    cmd = "$(RM) $(XDCCFGDIR)$@.map\n" + prefix + target.lnk.cmd
+	+ " $(LOPTS_P) $(lopts) -o $@ $(files) " + target.lnk.opts
+	+ " $(LOPTS_S)\n";
+    tool2cmd["link"] = cmd;
+
+    /* define the ar command template */
+    cmd  = prefix + target.ar.cmd
+	+ " $(AROPTS_P) " + target.ar.opts
+	+ " $@ $(AROPTS_S) $(aropts) $(files)";
+    tool2cmd["ar"] = cmd;
+
+    /* add command template set to _targetCmds */
+    _targetCmds[target.suffix] = tool2cmd;
+    return(tool2cmd);
+}
diff --git a/src/targets/gnu/targets/config.bld b/src/targets/gnu/targets/config.bld
new file mode 100644
index 0000000..edd3ad6
--- /dev/null
+++ b/src/targets/gnu/targets/config.bld
@@ -0,0 +1,3 @@
+Build.useTargets = null;    /* force the set of build targets to be empty */
+Pkg.attrs.compress = true;
+Pkg.attrs.archiver = "zip";
diff --git a/src/targets/gnu/targets/linkUtils.xs b/src/targets/gnu/targets/linkUtils.xs
new file mode 100644
index 0000000..a7f4960
--- /dev/null
+++ b/src/targets/gnu/targets/linkUtils.xs
@@ -0,0 +1,139 @@
+/*
+ *  ======== genContributions ========
+ *
+ *  This function invokes getSects() for all loaded packages, and then returns
+ *  the combined output.
+ */
+function genContributions(args)
+{
+    var res = "";
+    for (var i = 0; i < xdc.om.$packages.length; i++) {
+        var pkg = xdc.om.xdc.IPackage.Module($om.$packages[i]);
+
+        var sectFile = pkg.getSects();
+        if (sectFile) {
+        res += "\n/* Content from " + pkg.$name + " (" + sectFile + "): */\n";
+            var tplt = xdc.loadTemplate(sectFile);
+            var bout = new java.io.ByteArrayOutputStream();
+            var out = new java.io.PrintStream(bout);
+            tplt.genStream(out, pkg, args);
+            res += bout.toString();
+        }
+    }
+    return (res);
+}
+
+/*
+ *  ======== genSections ========
+ *
+ *  This function generates section allocations. 
+ */
+function genSections(prog)
+{
+    var res = "";
+
+    /* the section map is constructed from the target and program info */
+    var sectMap = prog.getSectMap();
+
+    if (sectMap['xdc.meta'] == undefined) {
+        sectMap['xdc.meta'] = new prog.SectionSpec();
+        sectMap['xdc.meta'].loadSegment = prog.platform.codeMemory;
+        sectMap['xdc.meta'].type = "COPY";
+    }
+
+    /* 'xdc.noload' section is not allocated or loaded, if
+     * xdc.runtime.Text.isLoaded is 'false'.
+     */
+    if ("xdc.runtime" in xdc.om && xdc.om['xdc.runtime.Text'].isLoaded != true
+        && sectMap['xdc.noload'] == undefined) {
+        var xv = Packages.xdc.services.intern.gen.Glob.vers().substr(9, 3);
+        if (xv  < "A58" || xv > "a00") {
+            sectMap['xdc.noload'] = new prog.SectionSpec();
+            sectMap['xdc.noload'].loadSegment = prog.platform.codeMemory;
+            sectMap['xdc.noload'].type = "COPY";
+        }
+    }
+
+    var exclude = ("sectionsExclude" in prog)
+                    ? new RegExp(prog.sectionsExclude): null;
+    for (var sn in sectMap) {
+        if (exclude == null || sn.match(exclude) == null) {
+            /* only generate sections the user doesn't handle "manually" */
+            res += "    " + sectLine(sectMap, sn) + "\n";
+        }
+    }
+
+    /* filter content using prog.sectionsTemplate */
+    if ("sectionsTemplate" in prog && prog.sectionsTemplate != null) {
+        var tplt = xdc.loadTemplate(prog.sectionsTemplate);
+        var bout = new java.io.ByteArrayOutputStream();
+        var out = new java.io.PrintStream(bout);
+        tplt.genStream(out, prog, [sectMap, res]);
+        res = bout.toString();
+    }
+
+    return (res);
+}
+
+/*
+ *  ======== sectLine ========
+ *  Generate a line to be placed in a linker command file for the specified
+ *  section.
+ */
+function sectLine(sectMap, sn)
+{
+
+    /* map section name to a memory name */
+    if (sectMap[sn] == null) {
+        throw new Error("Allocation for section name '" + sn
+            + "' is not defined by the program '" + prog.name
+            + "' or the platform '" + Program.platformName + "'");
+    }
+
+    var map = sectMap[sn];
+    var res = sn + " ";
+
+    if (sn[sn.length-1] != '}') {
+        if (map.runAddress != null && map.runAddress != undefined) {
+            res += "0x" + map.runAddress.toString(16) + " ";
+        }
+        if (map.type != null && map.type!= undefined) {
+            res += "(" + map.type + ") ";
+        }
+        res += ": ";
+
+        if (map.loadAddress != null && map.loadAddress != undefined) {
+            res += "AT (0x" + map.loadAddress.toString(16) + ") ";
+        }
+
+        if (map.loadAlign != null && map.loadAlign != undefined) {
+            res += "ALIGN (0x" + map.loadAlign.toString(16) + ") ";
+        }
+        else if (map.runAlign != null && map.runAlign != undefined) {
+            res += "ALIGN (0x" + map.runAlign.toString(16) + ") ";
+        }
+
+        if (sn == "xdc.meta" || sn == "xdc.noload") {
+            res += "{KEEP(*(" + sn + "))} ";
+        }
+        else {
+            res += "{*(" + sn + ")} ";
+        }
+    }
+
+    if ( (sectMap[sn].runSegment != null) &&
+         (sectMap[sn].runSegment != undefined) ) {
+        res += " > " + sectMap[sn].runSegment;
+    }
+
+    if ( (sectMap[sn].loadSegment != null) &&
+         (sectMap[sn].loadSegment != undefined) ) {
+        res += " AT> " + sectMap[sn].loadSegment;
+    }
+
+    if ("fill" in map && map.fill != null && map.fill != undefined) {
+        res += "= 0x" + map.fill.toString(16);
+    }
+
+    return (res);
+}
diff --git a/src/targets/gnu/targets/linkcmd.xdt b/src/targets/gnu/targets/linkcmd.xdt
new file mode 100644
index 0000000..0f15ecb
--- /dev/null
+++ b/src/targets/gnu/targets/linkcmd.xdt
@@ -0,0 +1,70 @@
+%%{
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ *
+ * --/COPYRIGHT--*/
+
+/* Linker templates are passed the following arguments:
+ *      $out        - an open file stream for the generated linker
+ *                    command file
+ *      $args[]     - array of zero or more libraries that should be linked
+ *                    with (in the order they appear in the argument list)
+ *
+ *  The GNU linker accepts any text file as "command files", so there is no
+ *  need to use a special option to identify them.  In fact, if you use the
+ *  -T option you must also include the default linker command file (which
+ *  defines the memory map, sections, etc).  By not using -T, this command
+ *  file "accumulates" with the default.
+ */
+
+ /* guess(!) the default leading prefix convention for this compiler */
+ var PREFIX  = this.build.target.os == "Windows" ? "_" : "";
+%%}
+/* this file was generated by linkcmd.xdt from the gnu.targets package */
+
+/* function aliases */
+%if (prog.build.profile.match(/blas/) == null) {
+%    for (var keys = this.$$aliases.keys(); keys.hasMoreElements(); ) {
+%        var key = keys.nextElement();
+`PREFIX + key` = `PREFIX + this.$$aliases.get(key)`;
+%    }
+%}
+
+%if ($args.length > 0) {
+/* input libraries */
+INPUT(
+    %for (var i = 0; i < $args.length; i++) {
+    "`$args[i]`"
+    %}
+)
+%}
+
+%var _utils = xdc.loadCapsule("gnu/targets/linkUtils.xs");
+%/* Mingw compilers (4.4.0 for example) ignore COPY. */
+%if (prog.build.target.$name != "gnu.targets.Mingw") {
+SECTIONS {
+`_utils.genSections(prog)`
+}
+
+%if (!prog.build.target.noStdLinkScript
+%    && prog.build.target.BINVERS >= "2.19") {
+INSERT BEFORE .gnu.attributes
+%}
+
+%if ("xdc.runtime" in xdc.om && xdc.om['xdc.runtime.Text'].isLoaded != true) {
+%    var xv = Packages.xdc.services.intern.gen.Glob.vers().substr(9, 3);
+%    if (xv  < "A58" || xv > "a00") {
+ASSERT(ADDR(xdc.noload) + SIZEOF(xdc.noload) < ADDR(.rodata)
+    || ADDR(.rodata) + SIZEOF(.rodata) < ADDR(xdc.noload),
+    "Sections .rodata and xdc.noload overlap. See xdc.runtime.Text.isLoaded for more.")
+%    }
+%}
+%} // end of the workaround for Mingw
+
diff --git a/src/targets/gnu/targets/package.bld b/src/targets/gnu/targets/package.bld
new file mode 100644
index 0000000..90a0219
--- /dev/null
+++ b/src/targets/gnu/targets/package.bld
@@ -0,0 +1,4 @@
+Pkg.attrs.relScript = "xdc/release/filters/what.rel";
+
+Pkg.otherFiles = ["runh", "linkcmd.xdt", "linkUtils.xs", "std.h", "_utils.xs"];
+Pkg.otherSrcs  = ["linkcmd.xdt", "linkUtils.xs"];
diff --git a/src/targets/gnu/targets/package.xdc b/src/targets/gnu/targets/package.xdc
new file mode 100644
index 0000000..260feb7
--- /dev/null
+++ b/src/targets/gnu/targets/package.xdc
@@ -0,0 +1,28 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ *
+ * --/COPYRIGHT--
+ */
+requires xdc.bld;
+
+/*!
+ *  ======== gnu.targets ========
+ *  Package of targets for the GNU gcc code generation tools
+ *
+ *  The targets in this package are designed to enable host application
+ *  development; e.g., the build of the XDCtools product's C-based command
+ *  line tools.
+ */
+package gnu.targets [1, 0, 1] {
+    module Linux86, Linux86_64;
+    module Mingw;
+    module MacOS86_64;
+    interface ITarget;
+}
diff --git a/src/targets/gnu/targets/package.xs b/src/targets/gnu/targets/package.xs
new file mode 100644
index 0000000..c3a058b
--- /dev/null
+++ b/src/targets/gnu/targets/package.xs
@@ -0,0 +1,51 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+var debug;
+if (debug == null) {
+    debug = function (msg) {};
+}
+
+var ITarget = xdc.loadCapsule("ITarget.xs");
+
+/*
+ *  ======== init ========
+ *  Initialize this package.
+ *
+ *  This is called after all modules in this package are defined and
+ *  initialized.
+ */
+function init()
+{
+    ITarget._init(this);
+    debug(this.$name + ".init() ...");
+
+    /* initialize module configuration params that are computed */
+    var ma = this.$modules;
+    for (var i = 0; i < ma.length; i++) {
+	if (ma[i] instanceof this.ITarget.Module) {
+	    var targ = this.ITarget.Module(ma[i]);
+	    var ext = ".s" + targ.suffix;
+	    targ.extensions[ext] = new xdc.om['xdc.bld.ITarget'].Extension({
+		suf: ext,   typ: "asm"
+	    });
+	}
+    }
+}
+
+/*
+ *  ======== Package.getLibs ========
+ *  This package's implementation of xdc.IPackage.getLibs.
+ */
+function getLibs()
+{
+    return (null);    /* no library required for this package */
+}
diff --git a/src/targets/gnu/targets/rts86GW/package.bld b/src/targets/gnu/targets/rts86GW/package.bld
new file mode 100644
index 0000000..fb8111f
--- /dev/null
+++ b/src/targets/gnu/targets/rts86GW/package.bld
@@ -0,0 +1,16 @@
+var RtsBuild = xdc.loadCapsule('xdc/runtime/build.xs');
+var KnlBuild = xdc.loadCapsule('xdc/runtime/knl/build.xs');
+
+Pkg.makePrologue = RtsBuild.makePrologue;
+Pkg.otherSrcs = ["package.bld"];
+Pkg.otherFiles = Pkg.otherSrcs;
+
+var cobjs = RtsBuild.objs.concat(KnlBuild.c_objs);
+for (var i = 0; i < Build.targets.length; i++) {
+    var targ = Build.targets[i];
+    if (targ.rts == Pkg.name) {
+	var lib = Pkg.addLibrary("lib/" + Pkg.name, targ);
+	lib.addObjects(cobjs);
+    }
+}
+
diff --git a/src/targets/gnu/targets/rts86GW/package.xdc b/src/targets/gnu/targets/rts86GW/package.xdc
new file mode 100644
index 0000000..ee9514e
--- /dev/null
+++ b/src/targets/gnu/targets/rts86GW/package.xdc
@@ -0,0 +1,15 @@
+requires xdc.runtime;
+
+/*!
+ *  ======== gnu.targets.rts86GW ========
+ *  Runtime support package for the x86 targets using the mingw codegen tools.
+ *
+ *  This package builds a library of standard XDC system support functions.
+ *  In particular, it builds several implementations of the
+ *  xdc.runtime.ISystemProvider interface.  Moreover, this package uses sources
+ *  that are part of the xdc.runtime package (to avoid having multiple copies
+ *  of the same source in different runtime support packages for different
+ *  ISAs.
+ */
+package gnu.targets.rts86GW [1,0,0] {
+}
diff --git a/src/targets/gnu/targets/rts86M/package.bld b/src/targets/gnu/targets/rts86M/package.bld
new file mode 100644
index 0000000..6ca7b14
--- /dev/null
+++ b/src/targets/gnu/targets/rts86M/package.bld
@@ -0,0 +1,17 @@
+var RtsBuild = xdc.loadCapsule('xdc/runtime/build.xs');
+var KnlBuild = xdc.loadCapsule('xdc/runtime/knl/build.xs');
+
+Pkg.makePrologue = RtsBuild.makePrologue;
+Pkg.otherFiles = ["package.bld"];
+Pkg.otherSrcs = Pkg.otherFiles;
+
+var cobjs = RtsBuild.objs.concat(KnlBuild.c_objs);
+for (var i = 0; i < Build.targets.length; i++) {
+    var targ = Build.targets[i];
+    if (targ.rts == Pkg.name) {
+	print(" building for target " + targ.name  + " ...");
+	var lib = Pkg.addLibrary("lib/" + Pkg.name, targ);
+	lib.addObjects(cobjs);
+    }
+}
+
diff --git a/src/targets/gnu/targets/rts86M/package.xdc b/src/targets/gnu/targets/rts86M/package.xdc
new file mode 100644
index 0000000..1cce7ff
--- /dev/null
+++ b/src/targets/gnu/targets/rts86M/package.xdc
@@ -0,0 +1,26 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+requires xdc.runtime;
+
+/*!
+ *  ======== gnu.targets.rts86M ========
+ *  Runtime support package for the MacOS x86 targets
+ *
+ *  This package builds a library of standard XDC system support functions.
+ *  In particular, it builds several implementations of the 
+ *  xdc.runtime.ISystemProvider interface.  Moreover, this package uses sources
+ *  that are part of the xdc.runtime package (to avoid having multiple copies
+ *  of the same source in different runtime support packages for different
+ *  ISAs.
+ */
+package gnu.targets.rts86M [1, 0, 0] {
+}
diff --git a/src/targets/gnu/targets/rts86U/package.bld b/src/targets/gnu/targets/rts86U/package.bld
new file mode 100644
index 0000000..fe8e223
--- /dev/null
+++ b/src/targets/gnu/targets/rts86U/package.bld
@@ -0,0 +1,16 @@
+var RtsBuild = xdc.loadCapsule('xdc/runtime/build.xs');
+var KnlBuild = xdc.loadCapsule('xdc/runtime/knl/build.xs');
+
+Pkg.makePrologue = RtsBuild.makePrologue;
+Pkg.otherFiles = ["package.bld"];
+Pkg.otherSrcs = Pkg.otherFiles;
+
+var cobjs = RtsBuild.objs.concat(KnlBuild.c_objs);
+for (var i = 0; i < Build.targets.length; i++) {
+    var targ = Build.targets[i];
+    if (targ.rts == Pkg.name) {
+	var lib = Pkg.addLibrary("lib/" + Pkg.name, targ);
+	lib.addObjects(cobjs);
+    }
+}
+
diff --git a/src/targets/gnu/targets/rts86U/package.xdc b/src/targets/gnu/targets/rts86U/package.xdc
new file mode 100644
index 0000000..62e598b
--- /dev/null
+++ b/src/targets/gnu/targets/rts86U/package.xdc
@@ -0,0 +1,26 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+requires xdc.runtime;
+
+/*!
+ *  ======== gnu.targets.rts86U ========
+ *  Runtime support package for the x86 targets.
+ *
+ *  This package builds a library of standard XDC system support functions.
+ *  In particular, it builds several implementations of the 
+ *  xdc.runtime.ISystemProvider interface.  Moreover, this package uses sources
+ *  that are part of the xdc.runtime package (to avoid having multiple copies
+ *  of the same source in different runtime support packages for different
+ *  ISAs.
+ */
+package gnu.targets.rts86U [1,0,0] {
+}
diff --git a/src/targets/gnu/targets/runh b/src/targets/gnu/targets/runh
new file mode 100644
index 0000000..946bd6f
--- /dev/null
+++ b/src/targets/gnu/targets/runh
@@ -0,0 +1,92 @@
+#!/usr/bin/ksh
+#
+# Run 'cmd arg ...' on another host
+#
+# usage: runh [-p prefix-cmd] [-h host] cmd arg ...
+#
+# -p prefix-cmd - command(s) to run on the remote host _before_ switching
+#                 to the remote directory
+#
+# -h host       - use 'host' instead of $REMOTEHOST
+#
+# The default host is $REMOTEHOST
+#
+
+#
+#  qargs - quote arguments to ensure that single arguments with embedded 
+#          spaces are passed to remote host as a single argument
+#
+function qargs {
+    _tmp=""
+    for a in "$@"; do
+	 _tmp="$_tmp "\'$a\';
+    done
+    print $_tmp
+}
+
+#
+# determine the name of the remote host
+#
+host=$REMOTEHOST
+prefix=""
+
+if [ "$1" = "-p" ]; then
+    prefix=$2
+    shift 2;
+fi
+if [ "$1" = "-h" ]; then
+    host=$2;
+    shift 2;
+fi
+
+#
+# compute the directory containing the command to run; this is added to the 
+# remote path; some compiler shells require that this is the case.
+#
+SRC="${1%/*}"
+if [ "$SRC" = "$1" ]; then
+    SRC="./"
+fi
+
+#
+#  Set the PATH to include ssh, rm and cat
+#
+PATH=/bin:/usr/bin:$PATH
+export PATH
+
+#
+#  create a temporary error log file and a file that signals that the exit
+#  status of the command is not 0; ensure that both files are removed when this 
+#  script exits normally (with the status 0)
+#
+elog=.tmp$$
+exitfile=.tmpex$$
+trap "rm -f $elog $exitfile" 0
+
+#
+#  run the specified command on the remote host
+#  test -d package is there to prevent "Stale NFS handle" errors
+#
+ssh $host ksh <<ENDCMD 2> $elog
+	PATH=$PATH:\$PATH:$SRC:/usr/bin:/bin; export PATH; \
+	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\$LD_LIBRARY_PATH; \
+        export LD_LIBRARY_PATH; $prefix ; \
+	cd `/bin/pwd` && (test -d package || true) && \
+	`qargs "$@"` || echo "1" > $exitfile
+ENDCMD
+
+#
+# if the error log is non-empty, print it
+#
+if [ -s $elog ]; then
+    cat $elog;
+fi
+
+#
+# if remote command status is not 0, it is saved in $exitfile, but for now
+# we just exit with 1, instead of reading that status 
+#
+if [ -e $exitfile ]; then
+    exit 1
+fi
+exit 0
diff --git a/src/targets/gnu/targets/select.h b/src/targets/gnu/targets/select.h
new file mode 100644
index 0000000..dfce978
--- /dev/null
+++ b/src/targets/gnu/targets/select.h
@@ -0,0 +1,57 @@
+/*
+ *  ======== select.h ========
+ *  This header selects an appropriate target name based on TI compiler
+ *  predefined macros and includes the appropriate target-specific std.h.
+ *
+ *  This header is entirely optional: the user can directly select any
+ *  existing target by adding definition of the following two symbols to
+ *  the compile line:
+ *    xdc_target_name__     the short name of the target; e.g., C64P
+ *    xdc_target_types__    a package path relative path to the types header
+ *                          for the target; e.g., ti/targets/std.h
+ *
+ *  For more information about these symbols see:
+ *  http://rtsc.eclipse.org/docs-tip/Integrating_RTSC_Modules
+ */
+
+#if defined (__arm__) && defined (__ARM_EABI__)
+#  define xdc_target_types__ gnu/targets/arm/std.h
+
+#  if defined (__ARM_ARCH_7A__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
+#      if defined (__ARM_ARCH_EXT_IDIV__)
+#          define xdc_target_name__ A15F
+#      else
+#          define xdc_target_name__ A8F
+#      endif
+#  elif defined (__ARM_ARCH_7M__)
+#      define xdc_target_name__ M3
+#  elif defined (__ARM_ARCH_7EM__)
+#      if (defined(__VFP_FP__) && !defined(__SOFTFP__))
+#          define xdc_target_name__ M4F
+#      else
+#          define xdc_target_name__ M4
+#      endif
+#  endif
+
+#endif
+
+#if defined(xdc_target_name__) && defined(xdc_target_types__)
+/*
+ *  ======== include the selected type header ========
+ */
+#define xdc_target__ <xdc_target_types__>
+#include xdc_target__
+
+#else
+  /* if we get here, this header was unable to select an appropriate set of
+   * types.  If the target exists, you can avoid the warnings below by
+   * explicitly defining the symbols xdc_target_name__ and
+   * xdc_target_types__ on the compile line.
+   */
+#  ifndef xdc_target_name__
+#    warning "can't determine an appropriate setting for xdc_target_name__"
+#  endif
+#  ifndef xdc_target_types__
+#    warning "can't determine an appropriate setting for xdc_target_types__"
+#  endif
+#endif
diff --git a/src/targets/gnu/targets/std.h b/src/targets/gnu/targets/std.h
new file mode 100644
index 0000000..f84e562
--- /dev/null
+++ b/src/targets/gnu/targets/std.h
@@ -0,0 +1,114 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2014 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+/*
+ *  ======== gnu/targets/std.h ========
+ *
+ *! Revision History
+ *! ================
+ *! 02-Jun-2014 ashish  use C99 types (stdint.h) to define xdc types
+ *! 26-Oct-2011 sg      added 7EM for M4F
+ *! 30-Aug-2011 sg      different UInt32 for 7M architecture
+ *! 21-Apr-2006 kw      removed unsupported 'Arg' type
+ *! 28-Jul-2005 kw      updated per new RTSC types
+ */
+
+#ifndef gnu_targets_STD_
+#define gnu_targets_STD_
+
+/* allow _TI_STD_TYPES like 'Uns' and 'Uint8' */
+#ifndef xdc__deprecated_types
+#define xdc__deprecated_types
+#endif
+
+/* include target-specific "portable" macros */
+#if defined(xdc_target_name__) & !defined(xdc_target_macros_include__)
+#include xdc__local_include(xdc_target_name__)
+#endif
+
+#include <stdint.h>	/* C99 standard integer types */
+
+/*
+ * xdc__LONGLONG__ indicates if compiler supports 'long long' type
+ * xdc__BITS<n> __ indicates if compiler supports 'uint<n>_t' type
+ */
+#define xdc__LONGLONG__
+#define xdc__BITS8__
+#define xdc__BITS16__
+#define xdc__BITS32__
+#define xdc__BITS64__
+#define xdc__INT64__
+
+/*
+ *  ======== [U]Int<n> ========
+ */
+typedef int_least8_t        xdc_Int8;
+typedef uint_least8_t       xdc_UInt8;
+typedef int_least16_t       xdc_Int16;
+typedef uint_least16_t      xdc_UInt16;
+typedef int_least32_t       xdc_Int32;
+typedef uint_least32_t      xdc_UInt32;
+#ifdef xdc__INT64__
+typedef int_least64_t       xdc_Int64;
+typedef uint_least64_t      xdc_UInt64;
+#endif
+
+/*
+ *  ======== Bits<n> ========
+ */
+#ifdef xdc__BITS8__
+typedef uint8_t             xdc_Bits8;
+#endif
+#ifdef xdc__BITS16__
+typedef uint16_t            xdc_Bits16;
+#endif
+#ifdef xdc__BITS32__
+typedef uint32_t            xdc_Bits32;
+#endif
+#ifdef xdc__BITS64__
+typedef uint64_t            xdc_Bits64;
+#endif
+
+/*
+ *  ======== [IU]Arg ========
+ */
+typedef intptr_t	        xdc_IArg;
+typedef uintptr_t	        xdc_UArg;
+
+/* deprecated, but compatible with BIOS 5.x */
+#define xdc__ARG__
+typedef xdc_IArg            xdc_Arg;
+
+/*
+ *  ======== restrict ========
+ */
+#define xdc__RESTRICT__
+
+/*
+ *  ======== xdc__META ========
+ */
+#if !defined(xdc_target__os_MacOS)
+  #define xdc__META(n,s) \
+    __attribute__ ((section ("xdc.meta"))) \
+    const char (n)[] = {(s)}
+#endif
+
+#if (xdc_target__sizeof_IArg > xdc_target__sizeof_Ptr) \
+    || (xdc_target__sizeof_IArg > xdc_target__sizeof_Fxn)
+#define xdc__ARGTOPTR
+#define xdc__ARGTOFXN
+static inline xdc_Ptr xdc_iargToPtr(xdc_IArg a) { return ((xdc_Ptr)(int)a); }
+static inline xdc_Ptr xdc_uargToPtr(xdc_UArg a) { return ((xdc_Ptr)(int)a); }
+static inline xdc_Fxn xdc_iargToFxn(xdc_IArg a) { return ((xdc_Fxn)(int)a); }
+static inline xdc_Fxn xdc_uargToFxn(xdc_UArg a) { return ((xdc_Fxn)(int)a); }
+#endif
+
+#endif /* gnu_targets_STD_ */
diff --git a/src/targets/microsoft/targets/C32.xdm,ash b/src/targets/microsoft/targets/C32.xdm,ash
new file mode 100644
index 0000000..9144fe2
--- /dev/null
+++ b/src/targets/microsoft/targets/C32.xdm,ash
@@ -0,0 +1,87 @@
+/*
+ *  ======== C32.xdm ========
+ *  This module defines the C32 "target" for the Build Object Model (BOM).
+ */
+package microsoft.targets
+
+hostonly module C32 extends microsoft.targets.ITarget {
+
+    readonly override param string name			= "C32";	
+    readonly override param string os			= "Windows";	
+    readonly override param string suffix		= "86";
+    readonly override param string isa			= "x86";	
+    readonly override param bld.ITarget.Model model	= {
+	endian: "little"
+    };
+
+    readonly override param string platform = "host.platforms.PC";
+    
+    /*
+     *  ======== ar ========
+     *  The archiver command and all required options
+     *	    -nologo don't display archiver copyright
+     */
+    readonly override param ITarget.Command ar = {
+	cmd: "$(PKGBASE)/run.sh $(ROOTDIR)/vc98/bin/lib -nologo",
+	opts: ""
+    };
+
+    /*
+     *  ======== cc ========
+     *  The compile command and all required options
+     *	    -W3	    enable all warnings recommended for production purposes.
+     *	    -c	    don't link
+     *	    -nologo don't display compiler copyright
+     *	    -Za	    disable microsoft C/C++ extensions
+     *
+     */
+    readonly override param ITarget.Command cc = {
+	cmd: "$(PKGBASE)/run.sh $(ROOTDIR)/vc98/bin/cl -nologo -c -W3 -Za",
+	opts: '-DWIN32 -D_DLL -D_AFXDLL -DEXPORT=""'
+    };
+
+    /*
+     *  ======== asm ========
+     */
+    readonly override param ITarget.Command asm = {
+	cmd: "$(PKGBASE)/run.sh $(ROOTDIR)/vc98/bin/cl -c",
+	opts: ""
+    };
+
+    /*
+     *  ======== lnk ========
+     *  The linker command and all required options
+     *	    -nologo don't display linker copyright
+     */
+    readonly override param ITarget.Command lnk = {
+	cmd: "$(PKGBASE)/link.sh $(ROOTDIR)/vc98/bin/link -nologo",
+	opts: ""
+    };
+    
+    /*
+     *  ======== ccOpts ========
+     *  User modifiable default options.
+     *	    -G5	    Optimizes code to favor the Pentium processor
+     *	    -Zp1    Packs structure members on 1-byte boundry
+     *	    -Ob1    Expand only functions marked as inline or, in a C++
+     *		    member function, defined within a class declaration
+     *	    -Gs	    Probe stack to automatically grow stack as necessary
+     *	    -GX	    Enables synchronous exception handling
+     *	    -WL	    write errors/warnings on a single output line
+     */
+    override param ITarget.Options ccOpts = {
+	prefix: "-G5 -Zp1 -Ob1 -Gs -GX",
+	suffix: "-Dfar= "
+    };
+
+    override param ITarget.Options lnkOpts = {
+	prefix: "",
+	suffix: "-machine:ix86 -nodefaultlib -incremental:no $(ROOTDIR)/vc98/mfc/lib/mfc42.lib $(ROOTDIR)/vc98/mfc/lib/mfcs42.lib $(ROOTDIR)/vc98/lib/msvcrt.lib $(ROOTDIR)/vc98/lib/msvcirt.lib"
+    };
+	
+    /*
+     *  ======== includeOpts ========
+     *  $(ROOTDIR)/vc98/include		  - contains compiler specific headers
+     */
+    override param string includeOpts = "-I$(ROOTDIR)/vc98/include -I$(ROOTDIR)/vc98/mfc/include -I$(ROOTDIR)/vc98/atl/include";
+};
diff --git a/src/targets/microsoft/targets/ITarget.xdc b/src/targets/microsoft/targets/ITarget.xdc
new file mode 100644
index 0000000..97be0af
--- /dev/null
+++ b/src/targets/microsoft/targets/ITarget.xdc
@@ -0,0 +1,162 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+/*
+ *  ======== ITarget.xdc ========
+ */
+package microsoft.targets;
+
+/*!
+ *  ======== ITarget ========
+ *  A Microsoft-specific extension to the base xdc.bld.ITarget3 interface.
+ */
+@TargetHeader("xdc/bld/stddefs.xdt")
+metaonly interface ITarget inherits xdc.bld.ITarget3 {
+
+    override readonly config string stdInclude = "microsoft/targets/std.h";
+    override config string dllExt     = ".dll";
+
+    /*!
+     *  ======== debugGen ========
+     *  Debugger/IDE project file generation support.
+     * 
+     *  The settings below generate VC project files that enable one
+     *  to debug (and even rebuild) Executables from within the VC GUI.
+     *
+     *  To avoid unnecessary build time overhead, these files are not always
+     *  generated; by default, they are only generated for "debug" profiles.
+     *  The generation of these files is controlled by the
+     *  `{@link xdc.cfg.Program#gen}` configuration parameter.  To force these
+     *  files to be generated for a particular executable, add the following
+     *  line to the executable's program configuration script:
+     *  @p(code)
+     *	    Program.gen.debuggerFiles = true;
+     *  @p
+     *  It is also possible to control the generation via build options; see
+     *  `{@link xdc.bld.ITarget#DebugGen}`.
+     *
+     *	To debug an executable: double click on the generated *.vcproj file,
+     *	    when the debugger comes up, type F11 (step into).
+     *
+     *  The first time you debug an executable, the VC debugger may prompt
+     *  you for a "solution file" to save.  Click OK (accepting the solution
+     *  file name), and you will be at the first statement of your
+     *  executable.
+     *
+     *  To set command line arguments prior to debugging: open the
+     *  executable's "Project Properties" dialog (select the
+     *  executable in the "Solution Explorer" window and pull-down
+     *  View->"Property Pages" or type shift-F4), select "Debugging"
+     *  in the left-most pane of the executable's "Property Pages", and
+     *  enter command line arguments in the "Command Arguments" text box.
+     *
+     *  @see  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskdebugginganexecreatedwithoutvisualstudioproject.asp
+     */
+    override config xdc.bld.ITarget.DebugGen debugGen = {
+	execTemplate: "microsoft/targets/vc_exec.xdt",
+	execPattern: "$(cfgName).vcproj"
+    };
+
+    /*!
+     *  ======== profiles ========
+     *  Standard options profiles for the microsoft tool-chain.
+     */
+    override config xdc.bld.ITarget.OptionSet profiles[string] = [
+	["debug", {
+	    compileOpts: {
+		copts: "-Z7 -Odi -MTd",
+		defs:  "-D_DEBUG=1",
+	    },
+	    linkOpts: "-debug msvcrt.lib setargv.obj oldnames.lib ole32.lib oleaut32.lib olepro32.lib uuid.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib comctl32.lib",
+	}],
+
+	["release", {
+	    compileOpts: {
+		copts: "-O2 -MT",
+		defs:  "",
+	    },
+	    linkOpts: "msvcrt.lib setargv.obj oldnames.lib ole32.lib oleaut32.lib olepro32.lib uuid.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib comctl32.lib",
+	}],
+    ];
+
+    /*!
+     *  ======== setPath ========
+     *  Return path needed to find necessary DLLS
+     *
+     *  The microsoft compilers often require one or more directories to
+     *  be in the PATH; this allows the compiler to find necessary DLLs.
+     *  A target implementing this function returns a string with path
+     *  components separated by ";".
+     */
+    function setPath();
+
+    /*!
+     *  ======== cmdPrefix ========
+     *  Prefix to put in front of each command
+     *
+     *  This string is put in front of every Command before being passed to
+     *  the shell for execution.  This string can be used to run the compiler
+     *  in emulation environments.  
+     */
+    config String cmdPrefix = "";
+    
+    /*!
+     *  ======== strictANSI ========
+     *  Disable Microsoft C/C++ language extensions
+     *
+     *  Set to true if you plan to port your program to other environments.
+     *  The compiler treats extended keywords as simple identifiers, disables
+     *	the other Microsoft extensions, and automatically defines the
+     *  `__STDC__` predefined macro for C programs. This option shows up
+     *  as `"-Za"` on the command line when strictANSI is set to `true`.
+     */
+    config bool strictANSI = true;
+    
+    /*!
+     *  ======== version ========
+     *  The Compatibility Key associated with this target.
+     *
+     *  The first two components of this target Compatibility Key are '1,0'.
+     *  The rest of the Key represents the compiler version. The third
+     *  component combines the major and the minor version number in the format
+     *  Major.Minor. The fourth component is the build number.
+     *
+     *  @a(Example)
+     *  If this target's `rootDir` points to the Visual C++ 2005 Express 
+     *  Edition, the output of the command `cl` may contains the compiler
+     *  version string 14.00.50727.42. The Compatibility Key is
+     *  [1,0,14.00,50727].
+     *  
+     */
+    override metaonly config String version;
+
+    /*!
+     *  ======== stdTypes ========
+     *  @_nodoc
+     */
+    override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
+	t_IArg		: { size: 4, align: 1 },
+	t_Char		: { size: 1, align: 1 },
+	t_Double	: { size: 8, align: 1 },
+	t_Float		: { size: 4, align: 1 },
+	t_Fxn		: { size: 4, align: 1 },
+	t_Int		: { size: 4, align: 1 },
+	t_Int8		: { size: 1, align: 1 },
+	t_Int16		: { size: 2, align: 1 },
+	t_Int32		: { size: 4, align: 1 },
+	t_Int64		: { size: 8, align: 1 },
+	t_Long		: { size: 4, align: 1 },
+	t_LDouble	: { size: 8, align: 1 },
+	t_Ptr		: { size: 4, align: 1 },
+	t_Short		: { size: 2, align: 1 },
+	t_Size          : { size: 4, align: 1 },
+    };
+}
diff --git a/src/targets/microsoft/targets/ITarget.xs b/src/targets/microsoft/targets/ITarget.xs
new file mode 100644
index 0000000..676a946
--- /dev/null
+++ b/src/targets/microsoft/targets/ITarget.xs
@@ -0,0 +1,332 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008-2017 Texas Instruments Incorporated
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ *
+ * --/COPYRIGHT--*/
+var debug;
+if (debug == null) {
+    debug = function (msg) {};
+}
+
+/*
+ *  ======== _bldUtils ========
+ */
+var _bldUtils = xdc.module('xdc.bld.Utils');
+var _utils = xdc.loadCapsule('microsoft/targets/_utils.xs');
+
+/*
+ *  ======== ITarget.archive ========
+ */
+function archive(goal)
+{
+    var target = this;
+
+    _utils.initTabs();
+
+    var result = null;
+    var tool2cmd = _utils.targetCmds[target.suffix];
+
+    if (tool2cmd != null) {
+	result = new xdc.om['xdc.bld.ITarget'].CommandSet;
+	result.msg = "archiving " + goal.files + " into $@ ...";
+        _utils.setEnv(target, result);
+	result.cmds = _bldUtils.expandString(tool2cmd["ar"], {
+	    AROPTS_P:	target.arOpts.prefix,
+	    AROPTS_S:	target.arOpts.suffix,
+	    aropts:	goal.opts,
+	    files:	goal.files,
+	});
+    }
+
+    return (result);
+}
+
+/*
+ *  ======== ITarget.compile ========
+ */
+function compile(goal) {
+    return (_utils.compile(this, goal, false));
+}
+
+/*
+ *  ======== ITarget.getVersion ========
+ */
+function getVersion()
+{
+    var target = this;
+
+    if (target.$private._version != null) {
+        return (target.$private._version);
+    }
+
+    _utils.initTabs();
+
+    var result = target.$name + "{";
+
+    /* the command to get the version is the first word of the cl command */
+    var tool2cmd = _utils.targetCmds[target.suffix];
+
+    var cmd = _bldUtils.expandString(tool2cmd["c"], {
+        rootDir: target.rootDir,
+    })
+
+    /* At this moment, cmd is a long string that contains cmdPrefix and the
+     * complete compiler command line with all options and MKDEP command.
+     * This complex match is used to split that command line into tokens,
+     * separated by spaces, but ignoring spaces within quotes.
+     */
+    var cmdTokens = cmd.match(/(?:[^\s'"]+|(['"])[^'"]*\1)+/g);
+
+    var cmd = cmdTokens[0];
+    /* If there is no cmdPrefix, cmd now contains only the path to the
+     * compiler executable. Otherwise, it contains the first token of the
+     * cmdPrefix, which can be either remote script or an environment
+     * variable that needs to be set for that script.
+     */
+
+    var prefEnv = [];
+    if (target.cmdPrefix != null && target.cmdPrefix != "") {
+        /* When there is a command prefix, we need to attach to it an optional
+         * remote init script and the compiler path to get the version.
+         * Since we are using the same regular expression as above, the tokens
+         * in prefTokens are the same as the tokens at the head of cmdTokens.
+         */
+        var prefTokens = target.cmdPrefix.match
+            (/(?:[^\s'"]+|(['"])[^'"]*\1)+/g);
+        var compLine = prefTokens.length;
+        var newCmd = target.cmdPrefix;
+
+        if ("remoteInitScript" in target
+            && target.remoteInitScript != undefined) {
+            /* once for the actual script and again for ' \\& ' */
+            newCmd += cmdTokens[compLine++] + " "; 
+            newCmd += cmdTokens[compLine++] + " "; 
+        }
+
+        newCmd += cmdTokens[compLine];
+        cmd = newCmd;
+    }
+
+    /* Check if rootDir is set correctly, but only if cmdPrefix is not 
+     * specified. If it is, we are going somewhere else for the execution,
+     * and the file system might look different.
+     */
+    var file = new java.io.File(target.rootDir);
+    if (target.cmdPrefix == null && !file.exists()) {
+        throw new Error(target.rootDir + " cannot be found. Ensure that" +
+            " rootDir for the " + target.name + " target is set correctly in " +
+            java.lang.System.getenv("XDCBUILDCFG"));
+    }
+
+    /* must set path so Windows can find DLLs such as mspdb70.dll */
+    var path = _bldUtils.expandString(".;" + target.$orig.setPath(),
+        {
+            rootDir: target.rootDir,
+        }
+    );
+
+    var attrs = {
+        envs: prefEnv.concat(["PATH=" + path, "Path=" + path, "TERM=dumb"]),
+        useEnv: true
+    }
+
+    var status = {};
+    if (xdc.exec(cmd, attrs, status) >= 0) {
+	var va = status.output.match(/Version\s+[0-9\.]+/mg);
+	if (va != null) {
+	    var cver = va[0].replace(/[Version\s]/g, "");
+	    var key = target.versionMap["cl_" + cver];
+	    if (key == null) {
+//		    print(target.$name + " can't find 'cl_" + cver + "'");
+		/* MS version numbers are x.y.z, where z is a build number */
+		key = "1,0," +
+		    cver.replace(/([0-9]+\.[0-9]+)\.([0-9]+).*/, "$1,$2");
+	    }
+	    result += key;
+	}
+	else {
+	    print("microsoft.targets: warning: version match failed on '"
+		+ status.output + "'");
+	}
+    }
+    else {
+	print("microsoft.targets: warning: exec of: '" + cmd + "' failed");
+	$trace(status.output, 0);
+    }
+
+    target.$private._version = result;  /* cache result for later use */
+
+    return (result);
+}
+
+/*
+ *  ======== ITarget.getRawVersion ========
+ */
+function getRawVersion()
+{
+    var target = this;
+
+    if (target.$private._rawVersion != null) {
+        return (target.$private._rawVersion);
+    }
+
+    _utils.initTabs();
+
+    var result = "";
+
+    /* the command to get the version is the first word of the cl command */
+    var tool2cmd = _utils.targetCmds[target.suffix];
+
+    var cmd = _bldUtils.expandString(tool2cmd["c"], {
+        rootDir: target.rootDir,
+    })
+
+    /* At this moment, cmd is a long string that contains cmdPrefix and the
+     * complete compiler command line with all options and MKDEP command.
+     * This complex match is used to split that command line into tokens,
+     * separated by spaces, but ignoring spaces within quotes.
+     */
+    var cmdTokens = cmd.match(/(?:[^\s'"]+|(['"])[^'"]*\1)+/g);
+
+    var cmd = cmdTokens[0];
+    /* If there is no cmdPrefix, cmd now contains only the path to the
+     * compiler executable. Otherwise, it contains the first token of the
+     * cmdPrefix, which can be either remote script or an environment
+     * variable that needs to be set for that script.
+     */
+
+    var prefEnv = [];
+    if (target.cmdPrefix != null && target.cmdPrefix != "") {
+        /* When there is a command prefix, we need to attach to it an optional
+         * remote init script and the compiler path to get the version.
+         * Since we are using the same regular expression as above, the tokens
+         * in prefTokens are the same as the tokens at the head of cmdTokens.
+         */
+        var prefTokens = target.cmdPrefix.match
+            (/(?:[^\s'"]+|(['"])[^'"]*\1)+/g);
+        var compLine = prefTokens.length;
+        var newCmd = target.cmdPrefix;
+
+        if ("remoteInitScript" in target
+            && target.remoteInitScript != undefined) {
+            /* once for the actual script and again for ' \\& ' */
+            newCmd += cmdTokens[compLine++] + " "; 
+            newCmd += cmdTokens[compLine++] + " "; 
+        }
+
+        newCmd += cmdTokens[compLine];
+        cmd = newCmd;
+    }
+
+    /* Check if rootDir is set correctly, but only if cmdPrefix is not 
+     * specified. If it is, we are going somewhere else for the execution,
+     * and the file system might look different.
+     */
+    var file = new java.io.File(target.rootDir);
+    if (target.cmdPrefix == null && !file.exists()) {
+        throw new Error(target.rootDir + " cannot be found. Ensure that" +
+            " rootDir for the " + target.name + " target is set correctly in " +
+            java.lang.System.getenv("XDCBUILDCFG"));
+    }
+
+    /* must set path so Windows can find DLLs such as mspdb70.dll */
+    var path = _bldUtils.expandString(".;" + target.$orig.setPath(),
+        {
+            rootDir: target.rootDir,
+        }
+    );
+
+    var attrs = {
+        envs: prefEnv.concat(["PATH=" + path, "Path=" + path, "TERM=dumb"]),
+        useEnv: true
+    }
+
+    var status = {};
+    if (xdc.exec(cmd, attrs, status) >= 0) {
+	  var va = status.output.match(/Version\s+[0-9\.]+/mg);
+	if (va != null) {
+	     result += va[0].replace(/[Version\s]/g, "");
+	}
+	else {
+	    print("microsoft.targets: warning: version match failed on '"
+		+ status.output + "'");
+	}
+	}
+    else {
+	print("microsoft.targets: warning: exec of: '" + cmd + "' failed");
+	$trace(status.output, 0);
+    }
+
+    target.$private._rawVersion = result;  /* cache result for later use */
+
+    return (result);
+}
+
+/*
+ *  ======== ITarget.link ========
+ */
+function link(goal)
+{
+    var target = this;
+    _utils.initTabs();
+
+    var result = null;
+    var tool2cmd = _utils.targetCmds[target.suffix];
+
+    if (tool2cmd != null) {
+	result = new xdc.om['xdc.bld.ITarget'].CommandSet;
+	result.msg = "lnk" + target.suffix + " $@ ...";
+
+	var fileList = goal.files.replace(/(^|\s+)([\/\w\\\.]+\.xdl)($|\s+)/,
+					  " @$2 ");
+
+        _utils.setEnv(target, result);
+
+	var dllOpts = "-dll -map:$(XDCCFGDIR)/$@.map -mapinfo:exports ";
+
+	result.cmds = _bldUtils.expandString(tool2cmd["link"], {
+	    LOPTS_P:	target.lnkOpts == null ? "" : target.lnkOpts.prefix,
+	    LOPTS_S:	target.lnkOpts == null ? "" : (goal.dllMode ? dllOpts : "") + target.lnkOpts.suffix,
+	    lopts:	goal.opts,
+	    files:	fileList,
+	});
+
+	if (goal.dllMode) {
+	    var ext = (this.dllExt != null) ? this.dllExt : ".p";
+	    result.cmds += "$(MV) $(basename $@).exp $(XDCCFGDIR)/$(basename $@)"
+	        + ext + target.suffix + ".exp\n";
+	    result.cmds += "$(MV) $(basename $@).lib $(XDCCFGDIR)/$(basename $@)"
+	        + ext + target.suffix + ".lib\n";
+        }
+    }
+
+    return (result);
+}
+
+/*
+ *  ======== ITarget.scompile ========
+ */
+function scompile(goal) {
+    return (_utils.compile(this, goal, true));
+}
+
+/*
+ *  ======== setPath ========
+ *
+ *  Default implementation of setPath().
+ */
+function setPath()
+{
+    if ("path" in this.$orig) {
+        return (this.$orig.path);
+    }
+    else {
+        return "";
+    }
+}
diff --git a/src/targets/microsoft/targets/Net32.xdc b/src/targets/microsoft/targets/Net32.xdc
new file mode 100644
index 0000000..b3d21a9
--- /dev/null
+++ b/src/targets/microsoft/targets/Net32.xdc
@@ -0,0 +1,179 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+/*
+ *  ======== Net32.xdc ========
+ */
+package microsoft.targets;
+
+/*!
+ *  ======== Net32 ========
+ *  Microsoft .Net 32-bit native target
+ *
+ *  This target supports the free Microsoft .Net C/C++ compiler; aka the
+ *  Microsoft Visual C++ Toolkit 2003 available from
+ *  http://msdn.microsoft.com/visualc/vctoolkit2003.
+ */
+metaonly module Net32 inherits microsoft.targets.ITarget {
+
+    override readonly config string name                    = "Net32";	
+    override readonly config string os                      = "Windows";	
+    override readonly config string suffix                  = "86N";
+    override readonly config string isa                     = "x86";	
+    override readonly config xdc.bld.ITarget.Model model    = {
+	endian: "little"
+    };
+
+    /*!
+     *  ======== profiles ========
+     *  User modifiable default profiles
+     */
+    override config xdc.bld.ITarget.OptionSet profiles[string] = [
+	["debug", {
+	    compileOpts: {
+		copts: "-Z7 -Od -MTd",
+		defs:  "-D_DEBUG=1",
+	    },
+	    linkOpts: "libcmt.lib kernel32.lib",
+	}],
+
+	["release", {
+	    compileOpts: {
+		copts: "-Oxi -MT",
+	    },
+	    linkOpts: "libcmt.lib kernel32.lib",
+	}],
+    ];
+
+    override readonly config string rts	    = "microsoft.targets.rts";
+    override config string platform	    = "host.platforms.PC";
+    override config string execExt	    = ".exe";
+    
+    /*!
+     *  ======== ar ========
+     *  The archiver command and all required options
+     *  @p(dlist)
+     *	    -`-nologo`
+     *		don't display archiver copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command ar = {
+	cmd: "$(rootDir)/bin/link.exe -lib -nologo",
+	opts: ""
+    };
+
+    /*!
+     *  ======== cc ========
+     *  The compile command and all required options
+     *  @p(dlist)
+     *	    -`-c`
+     *		don't link
+     *	    -`-nologo`
+     *		don't display compiler copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command cc = {
+	cmd: "$(rootDir)/bin/cl",
+	opts: "-nologo -c",
+    };
+
+    /*!
+     *  ======== asm ========
+     *  The assemble command and all required options
+     *  @p(dlist)
+     *	    -`-c`
+     *		don't link
+     */
+    override readonly config xdc.bld.ITarget2.Command asm = {
+	cmd: "$(rootDir)/bin/cl",
+	opts: "-nologo -c",
+    };
+
+    /*!
+     *  ======== lnk ========
+     *  The linker command and all required options
+     *  @p(dlist)
+     *	    -`-nologo`
+     *		Don't display linker copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command lnk = {
+	cmd: "$(rootDir)/bin/link -nologo",
+	opts: ""
+    };
+    
+    /*!
+     *  ======== ccOpts ========
+     *  User modifiable default options.
+     *  @p(dlist)
+     *	    -`-G5`
+     *		Optimizes code to favor the Pentium processor
+     *	    -`-W3`
+     *		enable all warnings recommended for production purposes.
+     */
+    override config xdc.bld.ITarget2.Options ccOpts = {
+	prefix: "-G5 -W3",
+    };
+
+    /*!
+     *  ======== lnkOpts ========
+     *  User modifiable linker options
+     *  @p(dlist)
+     *	    -`-libpath`...
+     *		    directories to search for toolchain specific libraries
+     *	    -`-nodefaultlib`
+     *		    don't search for default libraries when linking; all
+     *		    libraries used must be explicitly named
+     *	    -`-incremental:no`
+     *		    link for execution (no subsequent link will occur)
+     *	    -`-machine:ix86`
+     *		    link for the Intel x86 architecture
+     *	    -`-map:$(XDCCFGDIR)/$@.map`
+     *		    output any link map information to the specified file
+     *              ($(XDCCFGDIR) is usually package/cfg)
+     *	    -`-pdb:$(XDCCFGDIR)/$@.pdb`
+     *		    output any program debug information to the specified file
+     *              ($(XDCCFGDIR) is usually package/cfg)
+     */
+    override config xdc.bld.ITarget2.Options lnkOpts = {
+	prefix: "-libpath:$(rootDir)/lib",
+	suffix: "-map:$(XDCCFGDIR)/$@.map -pdb:$(XDCCFGDIR)/$@.pdb -mapinfo:exports -machine:ix86 -nodefaultlib -incremental:no"
+    };
+	
+    /*!
+     *  ======== includeOpts ========
+     *  User modifiable default include directories
+     *  @p(dlist)
+     *	    -`-I$(rootDir)/include`
+     *		include compiler specific headers
+     */
+    override config string includeOpts = "-I$(rootDir)/include";
+
+     /*!
+      *  ======== stdTypes ========
+      *  @_nodoc
+      */
+     override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
+        t_IArg          : { size: 4, align: 4 },
+        t_Char          : { size: 1, align: 1 },
+        t_Double        : { size: 8, align: 8 },
+        t_Float         : { size: 4, align: 4 },
+        t_Fxn           : { size: 4, align: 4 },
+        t_Int           : { size: 4, align: 4 },
+        t_Int8          : { size: 1, align: 1 },
+        t_Int16         : { size: 2, align: 2 },
+        t_Int32         : { size: 4, align: 4 },
+        t_Int64         : { size: 8, align: 8 },
+        t_Long          : { size: 4, align: 4 },
+        t_LDouble       : { size: 8, align: 8 },
+        t_Ptr           : { size: 4, align: 4 },
+        t_Short         : { size: 2, align: 2 },
+        t_Size          : { size: 4, align: 4 },
+      };
+																		    
+}
diff --git a/src/targets/microsoft/targets/Win32.xdc b/src/targets/microsoft/targets/Win32.xdc
new file mode 100644
index 0000000..7383f2d
--- /dev/null
+++ b/src/targets/microsoft/targets/Win32.xdc
@@ -0,0 +1,247 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2009-2018 Texas Instruments Incorporated
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ *
+ * --/COPYRIGHT--*/
+/*
+ *  ======== Win32.xdc ========
+ */
+
+/*!
+ *  ======== Win32 ========
+ *  Microsoft Windows 32-bit target using the Visual C/C++ compiler
+ *
+ *  This target can be configured to be used with different versions of
+ *  Microsoft Visual C/C++ and different installations of Platform SDK (or a
+ *  newer equivalent Windows SDK). The optional Platform SDK is needed only
+ *  for building applications that use Windows API.
+ *  The target `Win32` contains default configurations for Visual C/C++
+ *  versions 8.0, and 14.0, but in order to support future versions of
+ *  Visual C/C++ and different Windows SDK installations, there
+ *  is a parameter {@link #sdkPath}, which users can set in their `config.bld`
+ *  files to enable usage of this target with their installations.
+ *
+ *  Unlike the Visual C/C++ 6.x tool chain, this compiler complies very
+ *  closely with the C/C++ language specification.  This target may be
+ *  necessary in situations that take full advantage of the C++ language.
+ */
+metaonly module Win32 inherits microsoft.targets.ITarget {
+
+    override readonly config string name                = "Win32";
+    override readonly config string os                  = "Windows";
+    override readonly config string suffix              = "86W";
+    override readonly config string isa                 = "x86";
+    override readonly config xdc.bld.ITarget.Model model = {
+        endian: "little"
+    };
+
+    override readonly config string rts = "microsoft.targets.rts";
+
+    override config string platform     = "host.platforms.PC";
+    override config string execExt      = ".exe";
+
+    /*!
+     *  ======== path ========
+     *  Path components added during execution of commands
+     */
+    readonly config string path =
+        "$(rootDir)/VC/bin;$(rootDir)/Common7/IDE";
+
+    /*!
+     *  ======== SDKPath ========
+     *
+     *  A structure type that defines Windows SDK paths to be used for building
+     *  Windows applications with this target.
+     *
+     *  A Windows SDK installation is needed for building programs that use
+     *  Windows API. However, Windows SDK installations can be anywhere on the
+     *  disk and also include SDK version numbers (10.0.10586.0 for example).
+     *  Therefore, these paths can't be derived from the target's rootDir.
+     *
+     *  @field(includePath) Absolute path to the Include directory of a Windows
+     *  SDK installation. Windows SDK is required if the target is used to build
+     *  executables that use Windows API.
+     *
+     *  @field(libraryPath) Absolute path to the Lib directory of a Windows
+     *  SDK installation.
+     *
+     *  @field(libs) List of Windows SDK libraries to be added to the linker
+     * command line.
+     */
+    struct SDKPath {
+        string includePath[];
+        string libraryPath[];
+        string libs;
+    };
+
+    /*!
+     *  ======== sdkPath ========
+     *  Location of the header and library files in a Windows SDK installation
+     *
+     *  This parameter contains paths to the optional Windows SDK.
+     *
+     *  @a(Examples)
+     *  If the content of `sdkPath`, set in `config.bld` is
+     *  @p(code)
+     *      Win32.sdkPath = {
+     *          includePath: "C:/PROGRA~2/WI3CF2~1/10/Include/10.0.10586.0/ucrt",
+     *          libraryPath: "C:/PROGRA~2/WI3CF2~1/10/Lib/10.0.10586.0/um/x86";
+     *          libs: " libucrt.lib setargv.obj oldnames.lib ole32.lib
+     * oleaut32.lib olepro32.lib uuid.lib kernel32.lib user32.lib gdi32.lib
+     * advapi32.lib shell32.lib comctl32.lib mfc70.lib ucrt.lib"
+     *      };
+     *  the contents of `includePath`, `libraryPath` and `libs` are added to
+     *  appropriate command lines.
+     *
+     *  If Windows SDK is not installed or needed, sdkPath's `includePath` and
+     *  `libraryPath` should be empty.
+     *  @p
+     *
+     */
+    config SDKPath sdkPath = {
+        includePath: [],
+        libraryPath: [],
+        libs: "ole32.lib oleaut32.lib olepro32.lib uuid.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib comctl32.lib"
+    };
+
+    /*!
+     *  ======== profiles ========
+     *  Standard options profiles are overwritten because we can't use 'MTs'
+     *  and -D_DEBUG=1. Both of them added the debug version of the C runtime
+     *  library to the manifest.
+     */
+    override config xdc.bld.ITarget.OptionSet profiles[string] = [
+        ["debug", {
+            compileOpts: {
+                copts: "-Z7 -Odi -MTd",
+                defs:  "",
+            },
+            linkOpts: "-debug msvcrtd.lib vcruntimed.lib ucrtd.lib oldnames.lib",
+        }],
+
+        ["release", {
+            compileOpts: {
+                copts: "-O2 -MT",
+                defs:  "",
+            },
+            linkOpts: "msvcrt.lib vcruntime.lib ucrt.lib oldnames.lib",
+        }],
+    ];
+
+    /*!
+     *  ======== ar ========
+     *  The archiver command and all required options
+     *  @p(dlist)
+     *      -`-nologo`
+     *          don't display archiver copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command ar = {
+        cmd: "$(rootDir)/VC/bin/lib.exe -nologo",
+        opts: ""
+    };
+
+    /*!
+     *  ======== cc ========
+     *  The compile command and all required options
+     *  @p(dlist)
+     *      -`-W3`
+     *          enable all warnings recommended for production purposes.
+     *      -`-c`
+     *          don't link
+     *      -`-nologo`
+     *          don't display compiler copyright
+     *      -`-Zp1`
+     *          Packs structure members on 1-byte boundry
+     */
+    override readonly config xdc.bld.ITarget2.Command cc = {
+        cmd: "$(rootDir)/VC/bin/cl.exe -nologo -c",
+        opts: '-Zp1 -W3 -D_DLL -DWINVER=_WIN32_WINNT_WIN7 -D_WIN32_WINNT=_WIN32_WINNT_WIN7 -DWIN32 -DEXPORT=""'
+    };
+
+    /*!
+     *  ======== asm ========
+     *  The assemble command and all required options
+     *  @p(dlist)
+     *      -`-c`
+     *          don't link
+     *      -`-nologo`
+     *          don't display macro assembler copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command asm = {
+        cmd: "$(rootDir)/VC/bin/ml -c",
+        opts: "-nologo"
+    };
+
+    /*!
+     *  ======== lnk ========
+     *  The linker command and all required options
+     *  @p(dlist)
+     *      -`-nologo`
+     *          Don't display linker copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command lnk = {
+        cmd: "$(rootDir)/VC/bin/link",
+        opts: "-nologo"
+    };
+
+    /*!
+     *  ======== ccOpts ========
+     *  User modifiable default options.
+     *  @p(dlist)
+     *      -`-G5` (removed because it is incompatible with VC8.0)
+     *          Optimizes code to favor the Pentium processor
+     *      -`-Ob1`
+     *          Expand only functions marked as inline or, in a C++
+     *          member function, defined within a class declaration
+     *      -`-Gs`
+     *          Probe stack to automatically grow stack as necessary
+     *      -`-GX` (removed because it is incompatible with VC8.0)
+     *          Enables synchronous exception handling
+     *      -`-WL`
+     *          Write errors/warnings on a single output line
+     */
+    override config xdc.bld.ITarget2.Options ccOpts = {
+        prefix: "-Ob1 -Gs",
+        suffix: "-Dfar= "
+    };
+
+    /*!
+     *  ======== lnkOpts ========
+     *  User modifiable linker options
+     *  @p(dlist)
+     *      -`-libpath`
+     *              directories to search for toolchain specific libraries
+     *      -`-nodefaultlib`
+     *              don't search for default libraries when linking; all
+     *              libraries used must be explicitly named
+     *      -`-incremental:no`
+     *              link for execution (no subsequent link will occur)
+     *      -`-machine:ix86`
+     *              link for the Intel x86 architecture
+     *      -`-map:$(XDCCFGDIR)/$@.map`
+     *              output any link map information to the specified file
+     *              ($(XDCCFGDIR) is usually package/cfg)
+     *      -`-pdb:$(XDCCFGDIR)/$@.pdb`
+     *              output any program debug information to the specified file
+     *              ($(XDCCFGDIR) is usually package/cfg)
+     */
+    override config xdc.bld.ITarget2.Options lnkOpts = {
+        prefix: "-libpath:$(rootDir)/VC/lib -libpath:$(rootDir)/VC/atlmfc/lib",
+        suffix: "-map:$(XDCCFGDIR)/$@.map -pdb:$(XDCCFGDIR)/$@.pdb -machine:ix86 -nodefaultlib -incremental:no"
+    };
+
+    /*!
+     *  ======== includeOpts ========
+     *  User modifiable include paths
+     *  @p(dlist)
+     *      -`-I$(rootDir)/$(compilerDir)/include`
+     *          include compiler specific headers
+     */
+    override config string includeOpts = "-I$(rootDir)/VC/include -I$(rootDir)/VC/atlmfc/include";
+}
diff --git a/src/targets/microsoft/targets/Win32.xs b/src/targets/microsoft/targets/Win32.xs
new file mode 100644
index 0000000..dc8cccf
--- /dev/null
+++ b/src/targets/microsoft/targets/Win32.xs
@@ -0,0 +1,128 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008-2017 Texas Instruments Incorporated
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ *
+ * --/COPYRIGHT--*/
+var utils = xdc.loadCapsule('microsoft/targets/_utils.xs');
+
+/*
+ *  ======== Win32.compile ========
+ */
+function compile(goal) {
+    return (utils.compile(this, goal, false));
+}
+
+
+/*
+ *  ======== Win32.link ========
+ */
+function link(goal) {
+    var result = this.$super.link.$fxn.call(this, goal);
+    if (this.$private._vcVersion == "VC8" && this.cmdPrefix == "") {
+        /* VC8.0 programs require manifests and linker create them as
+         * separate files. Since manifests are always required, and they
+         * have to be in the same directory as programs, we use mt to
+         * embed them into programs. However, it doesn't work for wine for now
+         * because of missing Net Framework.
+         */
+        result.cmds += this.cmdPrefix + "$(rootDir)/VC/bin/mt -nologo -manifest $@.manifest -outputresource:'$@;#1'\n";
+        result.cmds += "-$(RM) $@.manifest\n";
+    }
+    return (result);
+}
+
+/*
+ *  ======== Win32.scompile ========
+ */
+function scompile(goal) {
+    return (utils.compile(this, goal, true));
+}
+
+var addSdkCalled = false;
+
+/*
+ *  ======== Win32.setPath ========
+ */
+function setPath() {
+    if (!addSdkCalled) {
+        _addSDK();
+    }
+    return (this.$super.setPath.$fxn.call(this));
+}
+
+/*
+ *  ======== _addSDK ========
+ */
+function _addSDK()
+{
+    if (addSdkCalled) {
+        return;
+    }
+    addSdkCalled = true;
+    var targ = xdc.module("microsoft.targets.Win32");
+    targ.$unseal();
+    for (var i = 0; i < targ.sdkPath.includePath.length; i++) {
+        var incPath = targ.sdkPath.includePath[i];
+        var sdk = new java.io.File(incPath);
+        var LinuxFound = false;
+        if (Build.hostOSName == "Linux") {
+            var status = {};
+            var attrs = {
+                useEnv: true
+            }
+
+            var res = xdc.exec(targ.cmdPrefix + "cd " + incPath, attrs, status);
+            if (res == 0) {
+                LinuxFound = true;
+            }
+        }
+
+        if (LinuxFound || (Build.hostOSName == "Windows" && sdk.exists())) {
+            targ.includeOpts += " -I" + incPath;
+        }
+        else {
+            print("The Windows SDK include path '" + incPath
+                + "' could not be found. Ensure that the SDK include path is "
+                + "specified correctly in "
+                + java.lang.System.getenv("XDCBUILDCFG"));
+        }
+    }
+    for (i = 0; i < targ.sdkPath.libraryPath.length; i++) {
+        var libPath = targ.sdkPath.libraryPath[i];
+        var sdk = new java.io.File(libPath);
+        var LinuxFound = false;
+        if (Build.hostOSName == "Linux") {
+            var status = {};
+            var attrs = {
+                useEnv: true
+            }
+
+            var res = xdc.exec(targ.cmdPrefix + "cd " + libPath, attrs, status);
+            if (res == 0) {
+                LinuxFound = true;
+            }
+        }
+
+        if (LinuxFound || (Build.hostOSName == "Windows" && sdk.exists())) {
+                targ.lnkOpts.prefix += " -libpath:" + libPath;
+        }
+        else {
+            print("Warning: The Windows SDK library path '" + libPath
+                    + "' could not be found. Ensure that the SDK library path "
+                    + "is specified correctly in "
+                    + java.lang.System.getenv("XDCBUILDCFG"));
+        }
+        if (i == 0) {
+            for (var j = 0; j < targ.profiles.length; j++) {
+                targ.profiles[j].linkOpts += " " + targ.sdkPath.libs;
+            }
+        }
+    }
+    targ.$seal();
+}
diff --git a/src/targets/microsoft/targets/Win64.xdc b/src/targets/microsoft/targets/Win64.xdc
new file mode 100644
index 0000000..f17238d
--- /dev/null
+++ b/src/targets/microsoft/targets/Win64.xdc
@@ -0,0 +1,279 @@
+/* --COPYRIGHT--,EPL
+ * Copyright (c) 2018-2019 Texas Instruments Incorporated - http://www.ti.com
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * --/COPYRIGHT--*/
+/*
+ *  ======== Win64.xdc ========
+ */
+
+/*!
+ *  ======== Win64 ========
+ *  Microsoft Windows 64-bit target using the Visual C/C++ compiler
+ *
+ *  This target can be configured to be used with different versions of
+ *  Microsoft Visual C/C++ and different installations of Platform SDK (or a
+ *  newer equivalent Windows SDK). The optional Platform SDK is needed only
+ *  for building applications that use Windows API.
+ *  The target `Win64` contains default configuration for Visual C/C++
+ *  version 14.0, but in order to support future versions of Visual C/C++ and
+ *  different Windows SDK installations, there is a parameter {@link #sdkPath},
+ *  which users can set in their `config.bld` files to enable usage of this
+ *  target with their installations.
+ */
+metaonly module Win64 inherits microsoft.targets.ITarget {
+
+    override readonly config string name                = "Win64";
+    override readonly config string os                  = "Windows";
+    override readonly config string suffix              = "64W";
+    override readonly config string isa                 = "x64";
+    override readonly config xdc.bld.ITarget.Model model = {
+        endian: "little"
+    };
+
+    override readonly config string rts = "microsoft.targets.rts";
+
+    override config string platform     = "host.platforms.PC";
+    override config string execExt      = ".exe";
+
+    /*!
+     *  ======== path ========
+     *  Path components added during execution of commands
+     */
+    readonly config string path =
+        "$(rootDir)/VC/bin/amd64;$(rootDir)/Common7/IDE";
+
+    /*!
+     *  ======== SDKPath ========
+     *
+     *  A structure type that defines Windows SDK paths to be used for building
+     *  Windows applications with this target.
+     *
+     *  A Windows SDK installation is needed for building programs that use
+     *  Windows API. However, Windows SDK installations can be anywhere on the
+     *  disk and also include SDK version numbers (10.0.10586.0 for example).
+     *  Therefore, these paths can't be derived from the target's rootDir.
+     *
+     *  @field(includePath) Absolute path to the Include directory of a Windows
+     *  SDK installation. Windows SDK is required if the target is used to build
+     *  executables that use Windows API.
+     *
+     *  @field(libraryPath) Absolute path to the Lib directory of a Windows
+     *  SDK installation.
+     *
+     *  @field(libs) List of Windows SDK libraries to be added to the linker
+     * command line.
+     */
+    struct SDKPath {
+        string includePath[];
+        string libraryPath[];
+        string libs;
+    };
+
+    /*!
+     *  ======== sdkPath ========
+     *  Location of the header and library files in a Windows SDK installation
+     *
+     *  This parameter contains paths to the optional Windows SDK.
+     *
+     *  @a(Examples)
+     *  If the content of `sdkPath`, set in `config.bld` is
+     *  @p(code)
+     *      Win64.sdkPath = {
+     *          includePath: "C:/PROGRA~2/WI3CF2~1/10/Include/10.0.10586.0/ucrt",
+     *          libraryPath: "C:/PROGRA~2/WI3CF2~1/10/Lib/10.0.10586.0/um/x64";
+     *          libs: " libucrt.lib setargv.obj oldnames.lib ole32.lib
+     * oleaut32.lib olepro32.lib uuid.lib kernel32.lib user32.lib gdi32.lib
+     * advapi32.lib shell32.lib comctl32.lib mfc70.lib ucrt.lib"
+     *      };
+     *  the contents of `includePath`, `libraryPath` and `libs` are added to
+     *  appropriate command lines.
+     *
+     *  If Windows SDK is not installed or needed, sdkPath's `includePath` and
+     *  `libraryPath` should be empty.
+     *  @p
+     *
+     */
+    config SDKPath sdkPath = {
+        includePath: [],
+        libraryPath: [],
+        libs: "ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib comctl32.lib"
+    };
+
+    /*!
+     *  ======== profiles ========
+     *  Standard options profiles are overwritten because we can't use 'MTs'
+     *  and -D_DEBUG=1. Both of them added the debug version of the C runtime
+     *  library to the manifest.
+     */
+    override config xdc.bld.ITarget.OptionSet profiles[string] = [
+        ["debug", {
+            compileOpts: {
+                copts: "-Z7 -Odi -MTd",
+                defs:  "",
+            },
+            linkOpts: "-debug msvcrtd.lib vcruntimed.lib ucrtd.lib oldnames.lib",
+        }],
+
+        ["release", {
+            compileOpts: {
+                copts: "-O2 -MT",
+                defs:  "",
+            },
+            linkOpts: "msvcrt.lib vcruntime.lib ucrt.lib oldnames.lib",
+        }],
+    ];
+
+    /*!
+     *  ======== ar ========
+     *  The archiver command and all required options
+     *  @p(dlist)
+     *      -`-nologo`
+     *          don't display archiver copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command ar = {
+        cmd: "$(rootDir)/VC/bin/amd64/lib.exe -nologo",
+        opts: ""
+    };
+
+    /*!
+     *  ======== cc ========
+     *  The compile command and all required options
+     *  @p(dlist)
+     *      -`-W3`
+     *          enable all warnings recommended for production purposes.
+     *      -`-c`
+     *          don't link
+     *      -`-nologo`
+     *          don't display compiler copyright
+     *      -`-Zp1`
+     *          Packs structure members on 1-byte boundry
+     */
+    override readonly config xdc.bld.ITarget2.Command cc = {
+        cmd: "$(rootDir)/VC/bin/amd64/cl.exe -nologo -c",
+        opts: '-Zp1 -W3 -D_DLL -DWINVER=_WIN32_WINNT_WIN7 -D_WIN32_WINNT=_WIN32_WINNT_WIN7 -DWIN64 -DEXPORT=""'
+    };
+
+    /*!
+     *  ======== asm ========
+     *  The assemble command and all required options
+     *  @p(dlist)
+     *      -`-c`
+     *          don't link
+     *      -`-nologo`
+     *          don't display macro assembler copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command asm = {
+        cmd: "$(rootDir)/VC/bin/amd64/ml64 -c",
+        opts: "-nologo"
+    };
+
+    /*!
+     *  ======== lnk ========
+     *  The linker command and all required options
+     *  @p(dlist)
+     *      -`-nologo`
+     *          Don't display linker copyright
+     */
+    override readonly config xdc.bld.ITarget2.Command lnk = {
+        cmd: "$(rootDir)/VC/bin/amd64/link",
+        opts: "-nologo"
+    };
+
+    /*!
+     *  ======== ccOpts ========
+     *  User modifiable default options.
+     *  @p(dlist)
+     *      -`-Ob1`
+     *          Expand only functions marked as inline or, in a C++
+     *          member function, defined within a class declaration
+     *      -`-Gs`
+     *          Probe stack to automatically grow stack as necessary
+     */
+    override config xdc.bld.ITarget2.Options ccOpts = {
+        prefix: "-Ob1 -Gs",
+        suffix: "-Dfar= "
+    };
+
+    /*!
+     *  ======== lnkOpts ========
+     *  User modifiable linker options
+     *  @p(dlist)
+     *      -`-libpath`
+     *              directories to search for toolchain specific libraries
+     *      -`-nodefaultlib`
+     *              don't search for default libraries when linking; all
+     *              libraries used must be explicitly named
+     *      -`-incremental:no`
+     *              link for execution (no subsequent link will occur)
+     *      -`-machine:ix64`
+     *              link for the 64-bit architecture
+     *      -`-map:$(XDCCFGDIR)/$@.map`
+     *              output any link map information to the specified file
+     *              ($(XDCCFGDIR) is usually package/cfg)
+     *      -`-pdb:$(XDCCFGDIR)/$@.pdb`
+     *              output any program debug information to the specified file
+     *              ($(XDCCFGDIR) is usually package/cfg)
+     */
+    override config xdc.bld.ITarget2.Options lnkOpts = {
+        prefix: "-libpath:$(rootDir)/VC/lib/amd64 -libpath:$(rootDir)/VC/atlmfc/lib/amd64",
+        suffix: "-map:$(XDCCFGDIR)/$@.map -pdb:$(XDCCFGDIR)/$@.pdb -machine:x64 -nodefaultlib -incremental:no"
+    };
+
+    /*!
+     *  ======== includeOpts ========
+     *  User modifiable include paths
+     *  @p(dlist)
+     *      -`-I$(rootDir)/$(compilerDir)/include`
+     *          include compiler specific headers
+     */
+    override config string includeOpts = "-I$(rootDir)/VC/include -I$(rootDir)/VC/atlmfc/include";
+
+    /*!
+     *  ======== stdTypes ========
+     */
+    override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
+        t_IArg          : { size: 8, align: 1 },
+        t_Char          : { size: 1, align: 1 },
+        t_Double        : { size: 8, align: 1 },
+        t_Float         : { size: 4, align: 1 },
+        t_Fxn           : { size: 8, align: 1 },
+        t_Int           : { size: 4, align: 1 },
+        t_Int8          : { size: 1, align: 1 },
+        t_Int16         : { size: 2, align: 1 },
+        t_Int32         : { size: 4, align: 1 },
+        t_Int64         : { size: 8, align: 1 },
+        t_Long          : { size: 4, align: 1 },
+        t_LLong         : { size: 8, align: 1 },
+        t_LDouble       : { size: 8, align: 1 },
+        t_Ptr           : { size: 8, align: 1 },
+        t_Short         : { size: 2, align: 1 },
+        t_Size          : { size: 8, align: 1 },
+    };
+}
diff --git a/src/targets/microsoft/targets/Win64.xs b/src/targets/microsoft/targets/Win64.xs
new file mode 100644
index 0000000..1ae131d
--- /dev/null
+++ b/src/targets/microsoft/targets/Win64.xs
@@ -0,0 +1,139 @@
+/* --COPYRIGHT--,EPL
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * --/COPYRIGHT--*/
+
+var utils = xdc.loadCapsule('microsoft/targets/_utils.xs');
+
+/*
+ *  ======== Win64.compile ========
+ */
+function compile(goal) {
+    return (utils.compile(this, goal, false));
+}
+
+
+/*
+ *  ======== Win64.link ========
+ */
+function link(goal) {
+    var result = this.$super.link.$fxn.call(this, goal);
+    return (result);
+}
+
+/*
+ *  ======== Win64.scompile ========
+ */
+function scompile(goal) {
+    return (utils.compile(this, goal, true));
+}
+
+var addSdkCalled = false;
+
+/*
+ *  ======== Win64.setPath ========
+ */
+function setPath() {
+    if (!addSdkCalled) {
+        _addSDK();
+    }
+    return (this.$super.setPath.$fxn.call(this));
+}
+
+/*
+ *  ======== _addSDK ========
+ */
+function _addSDK()
+{
+    if (addSdkCalled) {
+        return;
+    }
+    addSdkCalled = true;
+    var targ = xdc.module("microsoft.targets.Win64");
+    targ.$unseal();
+    for (var i = 0; i < targ.sdkPath.includePath.length; i++) {
+        var incPath = targ.sdkPath.includePath[i];
+        var sdk = new java.io.File(incPath);
+        var LinuxFound = false;
+        if (Build.hostOSName == "Linux") {
+            var status = {};
+            var attrs = {
+                useEnv: true
+            }
+
+            var res = xdc.exec(targ.cmdPrefix + "cd " + incPath, attrs, status);
+            if (res == 0) {
+                LinuxFound = true;
+            }
+        }
+
+        if (LinuxFound || (Build.hostOSName == "Windows" && sdk.exists())) {
+            targ.includeOpts += " -I" + incPath;
+        }
+        else {
+            print("The Windows SDK include path '" + incPath
+                + "' could not be found. Ensure that the SDK include path is "
+                + "specified correctly in "
+                + java.lang.System.getenv("XDCBUILDCFG"));
+        }
+    }
+    for (i = 0; i < targ.sdkPath.libraryPath.length; i++) {
+        var libPath = targ.sdkPath.libraryPath[i];
+        var sdk = new java.io.File(libPath);
+        var LinuxFound = false;
+        if (Build.hostOSName == "Linux") {
+            var status = {};
+            var attrs = {
+                useEnv: true
+            }
+
+            var res = xdc.exec(targ.cmdPrefix + "cd " + libPath, attrs, status);
+            if (res == 0) {
+                LinuxFound = true;
+            }
+        }
+
+        if (LinuxFound || (Build.hostOSName == "Windows" && sdk.exists())) {
+                targ.lnkOpts.prefix += " -libpath:" + libPath;
+        }
+        else {
+            print("Warning: The Windows SDK library path '" + libPath
+                    + "' could not be found. Ensure that the SDK library path "
+                    + "is specified correctly in "
+                    + java.lang.System.getenv("XDCBUILDCFG"));
+        }
+        if (i == 0) {
+            for (var j = 0; j < targ.profiles.length; j++) {
+                targ.profiles[j].linkOpts += " " + targ.sdkPath.libs;
+            }
+        }
+    }
+    targ.$seal();
+}
diff --git a/src/targets/microsoft/targets/_utils.xs b/src/targets/microsoft/targets/_utils.xs
new file mode 100644
index 0000000..8ae9049
--- /dev/null
+++ b/src/targets/microsoft/targets/_utils.xs
@@ -0,0 +1,184 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+/*
+ *  ======== targetCmds ========
+ *  Hash table of commands (indexed by target.suffix).  Commands are
+ *  themselves hashtables (indexed by file type: "asm", "c", ...) that
+ *  define the commands for cc, asm , etc.
+ */
+var targetCmds = null;
+
+/*
+ *  ======== targetPath ========
+ *  Path environment variable settings required for the compile/link/archive
+ *  commands.
+ */
+var targetPath = null;
+
+var _bldUtils = xdc.module('xdc.bld.Utils');
+
+/*
+ *  ======== compile ========
+ */
+function compile(target, goal, asm)
+{
+    var result = null;
+
+    this.initTabs();
+    
+    var tool2cmd = this.targetCmds[target.suffix];  /* get tool to template map */
+    
+    if (tool2cmd != null) {
+        var ext = target.extensions[goal.srcSuffix];
+        if (ext != null) {
+            if (asm == true && ext.typ == "asm") {
+                return (null);
+            }
+
+            var result = new xdc.om['xdc.bld.ITarget'].CommandSet;
+            result.msg = (ext.typ == "c" ? "cl" : ext.typ)
+                            + target.suffix
+                            + (asm == true ? " -S $< ..." : " $< ...");
+    
+            var dstDir = goal.dstPrefix + goal.base;
+            dstDir = dstDir.replace(/[^\/\\]*$/, "");
+    
+            this.setEnv(target, result);
+                
+            result.cmds = _bldUtils.expandString(tool2cmd[ext.typ], {
+                COPTS_P:    target.ccOpts.prefix,
+                COPTS_S:    target.ccOpts.suffix,
+                AOPTS_P:    target.asmOpts.prefix,
+                AOPTS_S:    target.asmOpts.suffix,
+                ASMONLY:    asm ? "/Fa$@" : "",
+                dstDir:     dstDir,
+                srcExt:     goal.srcSuffix,
+		copts:	    goal.configOpts ? goal.opts.cfgcopts : 
+		                              goal.opts.copts,
+                aopts:      goal.opts.aopts,
+                defs:       goal.opts.defs,
+                incs:       goal.opts.incs,
+            });
+        }
+    }
+    
+    return (result);
+}
+
+/*
+ *  ======== initTabs ========
+ */
+function initTabs()
+{
+    var thisPkg = xdc.om["microsoft.targets"];
+
+    if (targetCmds == null) {
+        targetCmds = {};
+        targetPath = {};
+
+	/*
+	 * Loop over all packages in case another package has a module
+	 * that wants to extend this package's ITarget interface.
+	 */
+	var pa = xdc.om.$packages;
+	for (var j = 0; j < pa.length; j++) {
+            var ma = pa[j].$modules;
+            for (var i = 0; i < ma.length; i++) {
+                if (ma[i] instanceof thisPkg.ITarget.Module) {
+                    var targ = thisPkg.ITarget.Module(ma[i]);
+                    targ.$orig.setPath();
+                    mkCmds(targ);
+                    mkEnvs(targ);
+                }
+            }
+        }
+    }
+}
+
+/*
+ *  ======== mkCmds ========
+ */
+function mkCmds(target)
+{
+    target = target.$orig;
+    var tmp, cmd, cmdOpts;
+    var tool2cmd = {};
+    var prefix = target.cmdPrefix;
+    if ("remoteInitScript" in target && target.remoteInitScript != undefined) {
+        prefix += target.remoteInitScript + " \\& ";
+    }
+    
+    /* define assemble command template */
+    cmdOpts = " $(AOPTS_P) " + target.asm.opts
+                + " $(AOPTS_S) $(defs) $(aopts) $(incs) $(XDCINCS) "
+                + target.includeOpts + " /Fo$@ $<";
+    cmd  = prefix + target.asm.cmd + cmdOpts;
+    cmd += "\n$(RM) $@.dep\n$(MKDEP) -a $@.dep -p $(dstDir) -s o"
+            + target.suffix + " $< -C " + cmdOpts;
+
+    tool2cmd["asm"] = cmd;
+    
+    /* define generic C/C++ options */
+    var zaFlag = target.strictANSI ? " -Za" : "";
+    cmdOpts = " $(COPTS_P) "
+                + target.cc.opts
+                + " $(COPTS_S) $(defs) $(copts) $(incs) $(XDCINCS) "
+                + target.includeOpts;
+
+    mkdep = "$(RM) $@.dep\n$(MKDEP) -a $@.dep -p $(dstDir) -s o"
+            + target.suffix + " $< -C " + cmdOpts; 
+
+    /* define the C compile command template */
+    cmd = prefix + target.cc.cmd + zaFlag + cmdOpts + " /TC /Fo$@ $(ASMONLY) $<\n";
+    cmd += mkdep;
+    tool2cmd["c"] = cmd;
+
+    /* define the C++ compile command template */
+    cmd = prefix + target.cc.cmd + zaFlag + cmdOpts + " /TP /Fo$@ $(ASMONLY) $<\n";
+    cmd += mkdep;
+    tool2cmd["cpp"] = cmd;
+
+    /* define the link command template */
+    cmd = "$(RM) $(XDCCFGDIR)$@.map\n" + prefix + target.lnk.cmd
+              + " $(LOPTS_P) $(lopts) -out:$@ $(files) " + target.lnk.opts
+              + " $(LOPTS_S)\n";
+    tool2cmd["link"] = cmd;
+
+    /* define the ar command template */
+    cmd  = prefix + target.ar.cmd
+                + " $(AROPTS_P) " + target.ar.opts
+                + " -out:$@ $(AROPTS_S) $(aropts) $(files)";
+    tool2cmd["ar"] = cmd;
+
+    /* add set of command templates to targetCmds */
+    targetCmds[target.suffix] = tool2cmd;
+}
+
+/*
+ *  ======== mkEnvs ========
+ */
+function mkEnvs(target)
+{
+    var path = ".;" + target.$orig.setPath() + ";$(PATH)";
+    targetPath[target.suffix] = path.split(";");
+}
+
+/*
+ *  ======== setEnv ========
+ */
+function setEnv(target, result)
+{
+    result.envs = ["INCLUDE=", "LIB="];
+    result.path = targetPath[target.suffix];
+}
+
+
diff --git a/src/targets/microsoft/targets/cl.js b/src/targets/microsoft/targets/cl.js
new file mode 100644
index 0000000..2de2d89
--- /dev/null
+++ b/src/targets/microsoft/targets/cl.js
@@ -0,0 +1,79 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+/*
+ *  ======== exec ========
+ */
+function exec(cmd, path)
+{
+    function readOutput(oExec)
+    {
+	if (!oExec.StdOut.AtEndOfStream) {
+	    return oExec.StdOut.ReadAll();
+	}
+    
+	if (!oExec.StdErr.AtEndOfStream) {
+	    return oExec.StdErr.ReadAll();
+	}
+    
+	return -1;
+    }
+
+    var shell = WScript.CreateObject("WScript.Shell");
+    var env = shell.Environment("PROCESS");
+    var envTab = ["INCLUDE", "LIB", "LINK", "CL"];
+    for (i = 0; i < envTab.length; i++) {
+	var val = env(envTab[i]);
+	if (val != null && val.length != 0) {
+	    env.Remove(envTab[i]);
+	}
+    }
+    if (path != null) {
+	env("PATH") = path;
+    }
+
+    var oExec = shell.Exec(cmd);
+    var result = "";
+    
+    var tryCount = 0;
+    while (true) {
+	var input = readOutput(oExec);
+	if (-1 == input) {
+	    if (tryCount++ > 10 && oExec.Status == 1) {
+		break;
+	    }
+	}
+	else {
+	    result += input;
+	    tryCount = 0;
+	}
+    }
+    
+    WScript.Echo(result);
+    return (oExec.ExitCode);
+}
+
+var args = WScript.Arguments;
+var cmd = "";
+var quote = "";
+for (var i = 0; i < args.length; i++) {
+    cmd += quote + args(i) + quote + " ";
+    quote = '"';
+}
+
+var msdev = "c:/users/dr/cg/msvc32";
+
+WScript.Quit(
+    exec(cmd, "%WINDIR%;%WINDIR%/system32;"
+		+ msdev + "/vc98/bin;"
+		+ msdev + "/common/msdev98/bin"
+    )
+);
diff --git a/src/targets/microsoft/targets/cl.sh b/src/targets/microsoft/targets/cl.sh
new file mode 100644
index 0000000..679d520
--- /dev/null
+++ b/src/targets/microsoft/targets/cl.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+unset INCLUDE
+unset LIB
+unset CL
+
+dir=${1%/*}
+cmdbin=/cygdrive/${dir%%:*}${dir#?:}
+export PATH=$cmdbin:$cmdbin/../../common/msdev98/bin
+
+"$@"
diff --git a/src/targets/microsoft/targets/config.bld b/src/targets/microsoft/targets/config.bld
new file mode 100644
index 0000000..160603e
--- /dev/null
+++ b/src/targets/microsoft/targets/config.bld
@@ -0,0 +1 @@
+Build.useTargets = null;    /* force the set of build targets to be empty */
diff --git a/src/targets/microsoft/targets/link b/src/targets/microsoft/targets/link
new file mode 100644
index 0000000..8f60a62
--- /dev/null
+++ b/src/targets/microsoft/targets/link
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+#  Link a program using the linker command file generated by XDC
+#
+unset LIB
+unset INCLUDE
+unset LINK
+unset CL
+
+link="$1"
+shift
+suffix=""
+prefix=""
+cmdFile=""
+for c in $*; do
+    case $c in
+        *.xdl ) prefix=$suffix; suffix=""; cmdFile=$c ;;
+        *     ) suffix=$suffix"$c " ;;
+    esac
+done
+$link  $prefix @$cmdFile $suffix
+
diff --git a/src/targets/microsoft/targets/linkcmd.xdt b/src/targets/microsoft/targets/linkcmd.xdt
new file mode 100644
index 0000000..a5e8745
--- /dev/null
+++ b/src/targets/microsoft/targets/linkcmd.xdt
@@ -0,0 +1,120 @@
+%%{
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+
+/* Linker templates are passed the following arguments:
+ *      $out        - an open file stream for the generated linker
+ *                    command file
+ *      $args[]     - array of zero or more libraries that should be linked
+ *                    with (in the order they appear in the argument list)
+ *
+ *  We add "'s around names to allow these names to contain embedded spaces
+ */
+
+/*
+ *  ======== map ========
+ *  map unix file names to Windows file names (with drive letters) for wine
+ *  support
+ */
+function map(name)
+{
+    /* map /db/?tree/ files */
+    var tokens = name.match(/(^\/[^\/]+\/)([a-z])(tree\/)(.*)/);
+    if (tokens != null && tokens.length == 5) {
+        var drive = tokens[2];
+        if (drive == "a") {
+            drive = "i";
+        }
+        return (drive + ":/" + tokens[4]);
+    }
+
+    /* map /db/toolsrc files */
+    tokens = name.match(/(^\/[^\/]+\/toolsrc\/)(.*)/);
+    if (tokens != null && tokens.length == 3) {
+        return ("t:/" + tokens[2]);
+    }
+
+    /* map /db/builds files */
+    tokens = name.match(/(^\/[^\/]+\/builds\/)(.*)/);
+    if (tokens != null && tokens.length == 3) {
+        return ("b:/" + tokens[2]);
+    }
+
+    /* map /sim/sanb_builds files */
+    tokens = name.match(/(^\/[^\/]+\/sanb_builds\/)(.*)/);
+    if (tokens != null && tokens.length == 3) {
+        return ("b:/" + tokens[2]);
+    }
+
+    /* otherwise give up */
+    return (name);
+}
+%%}
+
+%if (Program.$$isasm) {
+    %var instNames={ Handle__label:'', Object__count:'', Object__create:'',
+        %Object__delete:'', Object__destruct:'', Object__get:'',
+        %Object__heap:'', Object__sizeof:'', Params__init:''};
+    %var proxyNames={ Proxy__abstract:'', Proxy__delegate:'' };
+%
+    %for each (var _name in xdc.om.$$bindings()) {
+        %var name = _name+'';
+        %var o= xdc.om[name];
+        %/* keep only the bindings that are Externs */
+        %if (!o || (typeof(o)!='object') || !('$category' in o) ||
+                %o.$category!='Extern') {
+            %continue;
+        %}
+%
+        %/* separate the module and decl names */
+        %var modName = name.replace(/\.[^.]*$/,'');
+        %var declName = name.substring(modName.length+1);
+%
+        %/* keep only the names from used target modules */
+        %var m = xdc.om[modName];
+        %if (!m.$used || m.$$scope != 1 || m.$hostonly) {
+            %continue;
+        %}
+%
+        %/* reject if an instance decl on a non-instance module */
+        %if ((declName in instNames) & !m.$$instflag) {
+            %continue;
+        %}
+%
+        %/* reject if a proxy decl on a non-proxy module */
+        %if ((declName in proxyNames) & !m.$spec.isProxy()) {
+            %continue;
+        %}
+%
+        %/* output the export */
+            |-                                          |-export:`o.$name`
+    %}
+%}
+
+%for (var i = 0; i < Program.$$asmvec.length; i++) {
+    |-                                                  |"`prog.$$asmvec[i]`"
+%}
+
+%for (var i = 0; i < $args.length; i++) {
+%    var lib = $args[i];
+%    /* this is a hack to support wine builds using this target; when building
+%     * on a unix host, library paths begin with '/' (because they are
+%     * absolute paths) but the microsoft linker sees the '/' as the option
+%     * character and aborts because it does not recognize the option(!)
+%     */
+%    if (lib[0] != '/') {
+        |-                                              |"`lib`"
+%    }
+%    else {
+        |-                                              |"`map(lib)`"
+%    }
+%}
diff --git a/src/targets/microsoft/targets/linkcmd.xdt.save b/src/targets/microsoft/targets/linkcmd.xdt.save
new file mode 100644
index 0000000..871a9b2
--- /dev/null
+++ b/src/targets/microsoft/targets/linkcmd.xdt.save
@@ -0,0 +1,78 @@
+%%{
+/* Linker templates are passed the following arguments:
+ *      $out	    - an open file stream for the generated linker
+ *		      command file
+ *	$args[]     - array of zero or more libraries that should be linked
+ *		      with (in the order they appear in the argument list)
+ *
+ *  We add "'s around names to allow these names to contain embedded spaces
+ */
+
+/*
+ *  ======== map ========
+ *  map unix file names to Windows file names (with drive letters) for wine
+ *  support
+ */
+function map(name)
+{
+    /* map /db/?tree/ files */
+    var tokens = name.match(/(^\/[^\/]+\/)([a-z])(tree\/)(.*)/);
+    if (tokens != null && tokens.length == 5) {
+        var drive = tokens[2];
+        if (drive == "a") {
+            drive = "i";
+        }
+        return (drive + ":/" + tokens[4]);
+    }
+
+    /* map /db/toolsrc files */
+    tokens = name.match(/(^\/[^\/]+\/toolsrc\/)(.*)/);
+    if (tokens != null && tokens.length == 3) {
+        return ("t:/" + tokens[2]);
+    }
+
+    /* otherwise give up */
+    return (name);
+}
+%%}
+
+%if (Program.$$isasm) {
+    %for (var i = 0; i < xdc.om.$modules.length; i++) {
+	%var m = xdc.om.$modules[i];
+	%if (!m.$used || m.$$scope != 1 || m.$hostonly) {
+	    %continue;
+	%}
+	%for (var j = 0; j < m.$$fxntab.length; j++) {
+	    %var f = m.$$fxntab[j];
+	    |-						|-export:`f`
+	%}
+	%if (!m.$$instflag) {
+	    %continue;
+	%}
+	%if (m.memoryPolicy$ > 0) {
+	    |-						|-export:`m.$name.replace(/\./g, '_')`_create__Object
+	%}
+	%if (m.memoryPolicy$ > 1) {
+	    |-						|-export:`m.$name.replace(/\./g, '_')`_delete
+	%}
+    %}
+%}
+
+%for (var i = 0; i < Program.$$asmvec.length; i++) {
+    |-							|"`prog.$$asmvec[i]`"
+%}
+
+%for (var i = 0; i < $args.length; i++) {
+%    var lib = $args[i];
+%    /* this is a hack to support wine builds using this target; when building
+%     * on a unix host, library paths begin with '/' (because they are
+%     * absolute paths) but the microsoft linker sees the '/' as the option
+%     * character and aborts because it does not recognize the option(!)
+%     */
+%    if (lib[0] != '/') {
+        |-						|"`lib`"
+%    }
+%    else {
+        |-						|"`map(lib)`"
+%    }
+%}
diff --git a/src/targets/microsoft/targets/package.bld b/src/targets/microsoft/targets/package.bld
new file mode 100644
index 0000000..3002c18
--- /dev/null
+++ b/src/targets/microsoft/targets/package.bld
@@ -0,0 +1,4 @@
+Pkg.otherFiles = [
+    "vc_exec.xdt", "std.h", "link", "linkcmd.xdt", "_utils.xs"
+];
+Pkg.otherSrcs = Pkg.otherFiles;
diff --git a/src/targets/microsoft/targets/package.xdc b/src/targets/microsoft/targets/package.xdc
new file mode 100644
index 0000000..52dea3e
--- /dev/null
+++ b/src/targets/microsoft/targets/package.xdc
@@ -0,0 +1,41 @@
+/* --COPYRIGHT--,EPL
+ * Copyright (c) 2018-2019 Texas Instruments Incorporated - http://www.ti.com
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * --/COPYRIGHT--*/
+
+/*!
+ *  ======== microsoft.targets ========
+ *  Targets that wrap Microsoft code generation tools.
+ */
+package microsoft.targets [1,0,2,0] {
+    module Win32, Win64;
+    module Net32;
+    interface ITarget;
+}
diff --git a/src/targets/microsoft/targets/package.xs b/src/targets/microsoft/targets/package.xs
new file mode 100644
index 0000000..9d3db82
--- /dev/null
+++ b/src/targets/microsoft/targets/package.xs
@@ -0,0 +1,48 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+var debug;
+if (debug == null) {
+    debug = function (msg) {};
+}
+
+/*
+ *  ======== init ========
+ *  Initialize this package.
+ *
+ *  This is called after all modules in this package are defined and
+ *  initialized.
+ */
+function init()
+{
+    debug(this.$name + "$init() ...");
+
+    /* initialize module configuration params that are computed */
+    var ma = this.$modules;
+    for (var i = 0; i < ma.length; i++) {
+	if (ma[i] instanceof this.ITarget.Module) {
+	    var targ = this.ITarget.Module(ma[i]);
+	    var ext = ".s" + targ.suffix;
+	    targ.extensions[ext] = new xdc.om['xdc.bld.ITarget'].Extension({
+		suf: ext,   typ: "asm"
+	    });
+	}
+    }
+}
+
+/*
+ *  ======== Package.getLibs ========
+ *  This package's implementation of xdc.IPackage.getLibs.
+ */
+function getLibs()
+{
+    return (null);    /* no library required for this package */
+}
diff --git a/src/targets/microsoft/targets/rts/boot.c b/src/targets/microsoft/targets/rts/boot.c
new file mode 100644
index 0000000..9cc0870
--- /dev/null
+++ b/src/targets/microsoft/targets/rts/boot.c
@@ -0,0 +1,12 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+enum { __DUMMY = 0 };
diff --git a/src/targets/microsoft/targets/rts/package.bld b/src/targets/microsoft/targets/rts/package.bld
new file mode 100644
index 0000000..fe850e5
--- /dev/null
+++ b/src/targets/microsoft/targets/rts/package.bld
@@ -0,0 +1,16 @@
+var RtsBuild = xdc.loadCapsule('xdc/runtime/build.xs');
+var KnlBuild = xdc.loadCapsule('xdc/runtime/knl/build.xs');
+
+Pkg.makePrologue = RtsBuild.makePrologue;
+Pkg.otherFiles = ["package.bld", "boot.c"];
+Pkg.otherSrcs = Pkg.otherFiles;
+
+var cobjs = RtsBuild.objs.concat(KnlBuild.c_objs);
+for (var i = 0; i < Build.targets.length; i++) {
+    var targ = Build.targets[i];
+    if (targ.rts == Pkg.name) {
+	var lib = Pkg.addLibrary("lib/" + Pkg.name, targ);
+	lib.addObjects(cobjs);
+    }
+}
+
diff --git a/src/targets/microsoft/targets/rts/package.xdc b/src/targets/microsoft/targets/rts/package.xdc
new file mode 100644
index 0000000..6f1a1d3
--- /dev/null
+++ b/src/targets/microsoft/targets/rts/package.xdc
@@ -0,0 +1,26 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+requires xdc.runtime;
+
+/*!
+ *  ======== microsoft.targets.rts ========
+ *  Runtime support package for the x86 targets for use with Microsoft tools.
+ *
+ *  This package builds a library of standard XDC system support functions.
+ *  In particular, it builds several implementations of the 
+ *  xdc.runtime.ISystemProvider interface.  Moreover, this package uses sources
+ *  that are part of the xdc.runtime package (to avoid having multiple copies
+ *  of the same source in different runtime support packages for different
+ *  ISAs.
+ */
+package microsoft.targets.rts [1,0,0] {
+}
diff --git a/src/targets/microsoft/targets/run.sh b/src/targets/microsoft/targets/run.sh
new file mode 100644
index 0000000..679d520
--- /dev/null
+++ b/src/targets/microsoft/targets/run.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+unset INCLUDE
+unset LIB
+unset CL
+
+dir=${1%/*}
+cmdbin=/cygdrive/${dir%%:*}${dir#?:}
+export PATH=$cmdbin:$cmdbin/../../common/msdev98/bin
+
+"$@"
diff --git a/src/targets/microsoft/targets/std.h b/src/targets/microsoft/targets/std.h
new file mode 100644
index 0000000..472ebee
--- /dev/null
+++ b/src/targets/microsoft/targets/std.h
@@ -0,0 +1,91 @@
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008-2019 Texas Instruments Incorporated - http://www.ti.com
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * --/COPYRIGHT--*/
+
+/*
+ *  ======== microsoft/targets/std.h ========
+ */
+
+#ifndef microsoft_targets_STD_
+#define microsoft_targets_STD_
+
+/* include target-specific "portable" macros */
+#if defined(xdc_target_name__) & !defined(xdc_target_macros_include__)
+#include xdc__local_include(xdc_target_name__)
+#endif
+
+#define inline __inline
+
+/*
+ * xdc__LONGLONG__ indicates if compiler supports 'long long' type
+ * xdc__BITS<n> __ indicates if compiler supports 'uint<n>_t' type
+ */
+#undef xdc__LONGLONG__
+#define xdc__BITS8__
+#define xdc__BITS16__
+#define xdc__BITS32__
+#define xdc__BITS64__
+#define xdc__INT64__
+
+/*
+ *  ======== [U]Int<n> ========
+ */
+typedef signed char	xdc_Int8;
+typedef unsigned char	xdc_UInt8;
+typedef short		xdc_Int16;
+typedef unsigned short	xdc_UInt16;
+typedef long		xdc_Int32;
+typedef unsigned long	xdc_UInt32;
+
+typedef __int64          xdc_Int64;
+typedef unsigned __int64 xdc_UInt64;
+typedef __int64          xdc_LLong;
+typedef unsigned __int64 xdc_ULLong;
+
+/*
+ *  ======== Bits<n> ========
+ */
+typedef unsigned char	xdc_Bits8;
+typedef unsigned short	xdc_Bits16;
+typedef unsigned int	xdc_Bits32;
+
+typedef unsigned __int64 xdc_Bits64;
+
+/*
+ *  ======== Arg ========
+ */
+typedef intptr_t  xdc_IArg;
+typedef uintptr_t xdc_UArg;
+
+#define xdc__ARG__
+typedef xdc_IArg xdc_Arg;	/* deprecated, but compatible with BIOS 5.x */
+
+#endif /* microsoft_targets_STD_ */
diff --git a/src/targets/microsoft/targets/vc_exec.xdt b/src/targets/microsoft/targets/vc_exec.xdt
new file mode 100644
index 0000000..dddad53
--- /dev/null
+++ b/src/targets/microsoft/targets/vc_exec.xdt
@@ -0,0 +1,73 @@
+%%{
+/* --COPYRIGHT--,EPL
+ *  Copyright (c) 2008 Texas Instruments and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      Texas Instruments - initial implementation
+ * 
+ * --/COPYRIGHT--*/
+
+    /*
+     *  ======== vc_exec.xdt ========
+     *  This template is used to generate a project file that can be
+     *  used with MS VStudio to debug executables produced via XDC tools.
+     *
+     *  This template is evaluated in the config domain (after the config
+     *  script completes and before linking the executable).
+     *
+     *  Preconditions:
+     *	    this	- the configured program object (xdc.Program)
+     *	    $args	- array of arguments passed to the template:
+     *			    $args[0] - the name of the executable being
+     *				       produced for this configuration
+     *
+     */
+    var exec = $args[0];
+    var prog = this;
+    var xdc = environment["xdc.root"] + "/xdc.exe";
+%%}
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="`prog.name`"
+	Keyword="MakeFileProj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="0">
+			<Tool
+				Name="VCNMakeTool"
+				BuildCommandLine="`xdc` `exec`"
+				ReBuildCommandLine="`xdc` `exec`"
+				CleanCommandLine="`xdc` clean,86W"
+				Output="`exec`"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>