Clone of official tools

Committer:
screamer
Date:
Mon Aug 29 11:18:36 2016 +0100
Revision:
29:1210849dba19
Parent:
13:ab47a20b66f0
Child:
31:8ea194f6145b
Port the latest tools patches from https://github.com/ARMmbed/mbed-os

Who changed what in which revision?

UserRevisionLine numberNew contents of line
screamer 0:66f3b5499f7f 1 """
screamer 0:66f3b5499f7f 2 mbed SDK
screamer 0:66f3b5499f7f 3 Copyright (c) 2011-2013 ARM Limited
screamer 0:66f3b5499f7f 4
screamer 0:66f3b5499f7f 5 Licensed under the Apache License, Version 2.0 (the "License");
screamer 0:66f3b5499f7f 6 you may not use this file except in compliance with the License.
screamer 0:66f3b5499f7f 7 You may obtain a copy of the License at
screamer 0:66f3b5499f7f 8
screamer 0:66f3b5499f7f 9 http://www.apache.org/licenses/LICENSE-2.0
screamer 0:66f3b5499f7f 10
screamer 0:66f3b5499f7f 11 Unless required by applicable law or agreed to in writing, software
screamer 0:66f3b5499f7f 12 distributed under the License is distributed on an "AS IS" BASIS,
screamer 0:66f3b5499f7f 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
screamer 0:66f3b5499f7f 14 See the License for the specific language governing permissions and
screamer 0:66f3b5499f7f 15 limitations under the License.
screamer 0:66f3b5499f7f 16 """
screamer 0:66f3b5499f7f 17 from os.path import join
screamer 0:66f3b5499f7f 18 from os import getenv
screamer 0:66f3b5499f7f 19
screamer 0:66f3b5499f7f 20 # Conventions about the directory structure
screamer 29:1210849dba19 21 from tools.settings import ROOT, BUILD_DIR
screamer 0:66f3b5499f7f 22
screamer 0:66f3b5499f7f 23 # Allow overriding some of the build parameters using environment variables
screamer 0:66f3b5499f7f 24 BUILD_DIR = getenv("MBED_BUILD_DIR") or BUILD_DIR
screamer 0:66f3b5499f7f 25
screamer 0:66f3b5499f7f 26 # Embedded Libraries Sources
screamer 0:66f3b5499f7f 27 LIB_DIR = join(ROOT, "libraries")
screamer 0:66f3b5499f7f 28
screamer 0:66f3b5499f7f 29 TOOLS = join(ROOT, "tools")
screamer 0:66f3b5499f7f 30 TOOLS_DATA = join(TOOLS, "data")
screamer 0:66f3b5499f7f 31 TOOLS_BOOTLOADERS = join(TOOLS, "bootloaders")
screamer 0:66f3b5499f7f 32
screamer 0:66f3b5499f7f 33 # mbed libraries
screamer 13:ab47a20b66f0 34 MBED_BASE = join(ROOT, "hal")
screamer 0:66f3b5499f7f 35
screamer 0:66f3b5499f7f 36 MBED_API = join(MBED_BASE, "api")
screamer 0:66f3b5499f7f 37 MBED_COMMON = join(MBED_BASE, "common")
screamer 0:66f3b5499f7f 38 MBED_HAL = join(MBED_BASE, "hal")
screamer 0:66f3b5499f7f 39 MBED_TARGETS_PATH = join(MBED_BASE, "targets")
screamer 0:66f3b5499f7f 40
screamer 0:66f3b5499f7f 41 MBED_LIBRARIES = join(BUILD_DIR, "mbed")
screamer 0:66f3b5499f7f 42
screamer 29:1210849dba19 43 MBED_CONFIG_FILE = join(ROOT, "mbed_lib.json")
screamer 29:1210849dba19 44
screamer 0:66f3b5499f7f 45 # Tests
screamer 0:66f3b5499f7f 46 TEST_DIR = join(LIB_DIR, "tests")
screamer 0:66f3b5499f7f 47 HOST_TESTS = join(ROOT, "tools", "host_tests")
screamer 0:66f3b5499f7f 48
screamer 0:66f3b5499f7f 49 # mbed RPC
screamer 0:66f3b5499f7f 50 MBED_RPC = join(LIB_DIR, "rpc")
screamer 0:66f3b5499f7f 51
screamer 0:66f3b5499f7f 52 RPC_LIBRARY = join(BUILD_DIR, "rpc")
screamer 0:66f3b5499f7f 53
screamer 0:66f3b5499f7f 54 # mbed RTOS
screamer 13:ab47a20b66f0 55 RTOS = join(ROOT, "rtos")
screamer 0:66f3b5499f7f 56 MBED_RTX = join(RTOS, "rtx")
screamer 0:66f3b5499f7f 57 RTOS_ABSTRACTION = join(RTOS, "rtos")
screamer 0:66f3b5499f7f 58
screamer 0:66f3b5499f7f 59 RTOS_LIBRARIES = join(BUILD_DIR, "rtos")
screamer 0:66f3b5499f7f 60
screamer 0:66f3b5499f7f 61 # TCP/IP
screamer 0:66f3b5499f7f 62 NET = join(LIB_DIR, "net")
screamer 0:66f3b5499f7f 63
screamer 0:66f3b5499f7f 64 ETH_SOURCES = join(NET, "eth")
screamer 0:66f3b5499f7f 65 LWIP_SOURCES = join(NET, "lwip")
screamer 0:66f3b5499f7f 66 VODAFONE_SOURCES = join(NET, "VodafoneUSBModem")
screamer 0:66f3b5499f7f 67 CELLULAR_SOURCES = join(NET, "cellular", "CellularModem")
screamer 0:66f3b5499f7f 68 CELLULAR_USB_SOURCES = join(NET, "cellular", "CellularUSBModem")
screamer 0:66f3b5499f7f 69 UBLOX_SOURCES = join(NET, "cellular", "UbloxUSBModem")
screamer 0:66f3b5499f7f 70
screamer 0:66f3b5499f7f 71 NET_LIBRARIES = join(BUILD_DIR, "net")
screamer 0:66f3b5499f7f 72 ETH_LIBRARY = join(NET_LIBRARIES, "eth")
screamer 0:66f3b5499f7f 73 VODAFONE_LIBRARY = join(NET_LIBRARIES, "VodafoneUSBModem")
screamer 0:66f3b5499f7f 74 UBLOX_LIBRARY = join(NET_LIBRARIES, "UbloxUSBModem")
screamer 0:66f3b5499f7f 75
screamer 0:66f3b5499f7f 76 # FS
screamer 0:66f3b5499f7f 77 FS_PATH = join(LIB_DIR, "fs")
screamer 0:66f3b5499f7f 78 FAT_FS = join(FS_PATH, "fat")
screamer 0:66f3b5499f7f 79 SD_FS = join(FS_PATH, "sd")
screamer 0:66f3b5499f7f 80 FS_LIBRARY = join(BUILD_DIR, "fat")
screamer 0:66f3b5499f7f 81
screamer 0:66f3b5499f7f 82 # DSP
screamer 0:66f3b5499f7f 83 DSP = join(LIB_DIR, "dsp")
screamer 0:66f3b5499f7f 84 DSP_CMSIS = join(DSP, "cmsis_dsp")
screamer 0:66f3b5499f7f 85 DSP_ABSTRACTION = join(DSP, "dsp")
screamer 0:66f3b5499f7f 86 DSP_LIBRARIES = join(BUILD_DIR, "dsp")
screamer 0:66f3b5499f7f 87
screamer 0:66f3b5499f7f 88 # USB Device
screamer 0:66f3b5499f7f 89 USB = join(LIB_DIR, "USBDevice")
screamer 0:66f3b5499f7f 90 USB_LIBRARIES = join(BUILD_DIR, "usb")
screamer 0:66f3b5499f7f 91
screamer 0:66f3b5499f7f 92 # USB Host
screamer 0:66f3b5499f7f 93 USB_HOST = join(LIB_DIR, "USBHost")
screamer 0:66f3b5499f7f 94 USB_HOST_LIBRARIES = join(BUILD_DIR, "usb_host")
screamer 0:66f3b5499f7f 95
screamer 0:66f3b5499f7f 96 # Export
screamer 0:66f3b5499f7f 97 EXPORT_DIR = join(BUILD_DIR, "export")
screamer 0:66f3b5499f7f 98 EXPORT_WORKSPACE = join(EXPORT_DIR, "workspace")
screamer 0:66f3b5499f7f 99 EXPORT_TMP = join(EXPORT_DIR, ".temp")
screamer 0:66f3b5499f7f 100
screamer 0:66f3b5499f7f 101 # CppUtest library
screamer 0:66f3b5499f7f 102 CPPUTEST_DIR = join(ROOT, "..")
screamer 0:66f3b5499f7f 103 CPPUTEST_SRC = join(CPPUTEST_DIR, "cpputest", "src", "CppUTest")
screamer 0:66f3b5499f7f 104 CPPUTEST_INC = join(CPPUTEST_DIR, "cpputest", "include")
screamer 0:66f3b5499f7f 105 CPPUTEST_INC_EXT = join(CPPUTEST_DIR, "cpputest", "include", "CppUTest")
screamer 0:66f3b5499f7f 106 # Platform dependant code is here (for armcc compiler)
screamer 29:1210849dba19 107 CPPUTEST_PLATFORM_SRC = join(CPPUTEST_DIR, "cpputest", "src", "Platforms",
screamer 29:1210849dba19 108 "armcc")
screamer 29:1210849dba19 109 CPPUTEST_PLATFORM_INC = join(CPPUTEST_DIR, "cpputest", "include", "Platforms",
screamer 29:1210849dba19 110 "armcc")
screamer 0:66f3b5499f7f 111 # Function 'main' used to run all compiled UTs
screamer 0:66f3b5499f7f 112 CPPUTEST_TESTRUNNER_SCR = join(TEST_DIR, "utest", "testrunner")
screamer 0:66f3b5499f7f 113 CPPUTEST_TESTRUNNER_INC = join(TEST_DIR, "utest", "testrunner")
screamer 0:66f3b5499f7f 114
screamer 0:66f3b5499f7f 115 CPPUTEST_LIBRARY = join(BUILD_DIR, "cpputest")