3 Copyright (c) 2011-2013 ARM Limited
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
17 from os.path import join
20 # Conventions about the directory structure
21 from settings import ROOT, BUILD_DIR
23 # Allow overriding some of the build parameters using environment variables
24 BUILD_DIR = getenv("MBED_BUILD_DIR") or BUILD_DIR
26 # Embedded Libraries Sources
27 LIB_DIR = join(ROOT, "libraries")
29 TOOLS = join(ROOT, "workspace_tools")
30 TOOLS_DATA = join(TOOLS, "data")
31 TOOLS_BOOTLOADERS = join(TOOLS, "bootloaders")
34 MBED_BASE = join(LIB_DIR, "mbed")
36 MBED_API = join(MBED_BASE, "api")
37 MBED_COMMON = join(MBED_BASE, "common")
38 MBED_HAL = join(MBED_BASE, "hal")
39 MBED_TARGETS_PATH = join(MBED_BASE, "targets")
41 MBED_LIBRARIES = join(BUILD_DIR, "mbed")
44 TEST_DIR = join(LIB_DIR, "tests")
45 HOST_TESTS = join(ROOT, "workspace_tools", "host_tests")
48 MBED_RPC = join(LIB_DIR, "rpc")
51 RTOS = join(LIB_DIR, "rtos")
52 MBED_RTX = join(RTOS, "rtx")
53 RTOS_ABSTRACTION = join(RTOS, "rtos")
55 RTOS_LIBRARIES = join(BUILD_DIR, "rtos")
58 NET = join(LIB_DIR, "net")
60 ETH_SOURCES = join(NET, "eth")
61 LWIP_SOURCES = join(NET, "lwip")
62 VODAFONE_SOURCES = join(NET, "VodafoneUSBModem")
63 CELLULAR_SOURCES = join(NET, "cellular", "CellularModem")
64 CELLULAR_USB_SOURCES = join(NET, "cellular", "CellularUSBModem")
65 UBLOX_SOURCES = join(NET, "cellular", "UbloxUSBModem")
67 NET_LIBRARIES = join(BUILD_DIR, "net")
68 ETH_LIBRARY = join(NET_LIBRARIES, "eth")
69 VODAFONE_LIBRARY = join(NET_LIBRARIES, "VodafoneUSBModem")
70 UBLOX_LIBRARY = join(NET_LIBRARIES, "UbloxUSBModem")
73 FS_PATH = join(LIB_DIR, "fs")
74 FAT_FS = join(FS_PATH, "fat")
75 SD_FS = join(FS_PATH, "sd")
76 FS_LIBRARY = join(BUILD_DIR, "fat")
79 DSP = join(LIB_DIR, "dsp")
80 DSP_CMSIS = join(DSP, "cmsis_dsp")
81 DSP_ABSTRACTION = join(DSP, "dsp")
82 DSP_LIBRARIES = join(BUILD_DIR, "dsp")
85 USB = join(LIB_DIR, "USBDevice")
86 USB_LIBRARIES = join(BUILD_DIR, "usb")
89 USB_HOST = join(LIB_DIR, "USBHost")
90 USB_HOST_LIBRARIES = join(BUILD_DIR, "usb_host")
93 EXPORT_DIR = join(BUILD_DIR, "export")
94 EXPORT_WORKSPACE = join(EXPORT_DIR, "workspace")
95 EXPORT_TMP = join(EXPORT_DIR, ".temp")
98 CPPUTEST_DIR = join(ROOT, "..")
99 CPPUTEST_SRC = join(CPPUTEST_DIR, "cpputest", "src", "CppUTest")
100 CPPUTEST_INC = join(CPPUTEST_DIR, "cpputest", "include")
101 CPPUTEST_INC_EXT = join(CPPUTEST_DIR, "cpputest", "include", "CppUTest")
102 # Platform dependant code is here (for armcc compiler)
103 CPPUTEST_PLATFORM_SRC = join(CPPUTEST_DIR, "cpputest", "src", "Platforms", "armcc")
104 CPPUTEST_PLATFORM_INC = join(CPPUTEST_DIR, "cpputest", "include", "Platforms", "armcc")
105 # Function 'main' used to run all compiled UTs
106 CPPUTEST_TESTRUNNER_SCR = join(TEST_DIR, "utest", "testrunner")
107 CPPUTEST_TESTRUNNER_INC = join(TEST_DIR, "utest", "testrunner")
109 CPPUTEST_LIBRARY = join(BUILD_DIR, "cpputest")