Alessandro Angelino / mbed-tools

Fork of mbed-tools by Morpheus

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers paths.py Source File

paths.py

00001 """
00002 mbed SDK
00003 Copyright (c) 2011-2013 ARM Limited
00004 
00005 Licensed under the Apache License, Version 2.0 (the "License");
00006 you may not use this file except in compliance with the License.
00007 You may obtain a copy of the License at
00008 
00009     http://www.apache.org/licenses/LICENSE-2.0
00010 
00011 Unless required by applicable law or agreed to in writing, software
00012 distributed under the License is distributed on an "AS IS" BASIS,
00013 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 See the License for the specific language governing permissions and
00015 limitations under the License.
00016 """
00017 from os.path import join
00018 from os import getenv
00019 
00020 # Conventions about the directory structure
00021 from settings import ROOT, BUILD_DIR
00022 
00023 # Allow overriding some of the build parameters using environment variables
00024 BUILD_DIR = getenv("MBED_BUILD_DIR") or BUILD_DIR
00025 
00026 # Embedded Libraries Sources
00027 LIB_DIR = join(ROOT, "libraries")
00028 
00029 TOOLS = join(ROOT, "tools")
00030 TOOLS_DATA = join(TOOLS, "data")
00031 TOOLS_BOOTLOADERS = join(TOOLS, "bootloaders")
00032 
00033 # mbed libraries
00034 MBED_BASE = join(ROOT, "sdk")
00035 
00036 MBED_API = join(MBED_BASE, "api")
00037 MBED_COMMON = join(MBED_BASE, "common")
00038 MBED_HAL = join(MBED_BASE, "hal")
00039 MBED_TARGETS_PATH = join(MBED_BASE, "targets")
00040 
00041 MBED_LIBRARIES = join(BUILD_DIR, "mbed")
00042 
00043 # Tests
00044 TEST_DIR = join(LIB_DIR, "tests")
00045 HOST_TESTS = join(ROOT, "tools", "host_tests")
00046 
00047 # mbed RPC
00048 MBED_RPC = join(LIB_DIR, "rpc")
00049 
00050 RPC_LIBRARY = join(BUILD_DIR, "rpc")
00051 
00052 # mbed RTOS
00053 RTOS = join(LIB_DIR, "rtos")
00054 MBED_RTX = join(RTOS, "rtx")
00055 RTOS_ABSTRACTION = join(RTOS, "rtos")
00056 
00057 RTOS_LIBRARIES = join(BUILD_DIR, "rtos")
00058 
00059 # TCP/IP
00060 NET = join(LIB_DIR, "net")
00061 
00062 ETH_SOURCES = join(NET, "eth")
00063 LWIP_SOURCES = join(NET, "lwip")
00064 VODAFONE_SOURCES = join(NET, "VodafoneUSBModem")
00065 CELLULAR_SOURCES = join(NET, "cellular", "CellularModem")
00066 CELLULAR_USB_SOURCES = join(NET, "cellular", "CellularUSBModem")
00067 UBLOX_SOURCES = join(NET, "cellular", "UbloxUSBModem")
00068 
00069 NET_LIBRARIES = join(BUILD_DIR, "net")
00070 ETH_LIBRARY = join(NET_LIBRARIES, "eth")
00071 VODAFONE_LIBRARY = join(NET_LIBRARIES, "VodafoneUSBModem")
00072 UBLOX_LIBRARY = join(NET_LIBRARIES, "UbloxUSBModem")
00073 
00074 # FS
00075 FS_PATH = join(LIB_DIR, "fs")
00076 FAT_FS = join(FS_PATH, "fat")
00077 SD_FS = join(FS_PATH, "sd")
00078 FS_LIBRARY = join(BUILD_DIR, "fat")
00079 
00080 # DSP
00081 DSP = join(LIB_DIR, "dsp")
00082 DSP_CMSIS = join(DSP, "cmsis_dsp")
00083 DSP_ABSTRACTION = join(DSP, "dsp")
00084 DSP_LIBRARIES = join(BUILD_DIR, "dsp")
00085 
00086 # USB Device
00087 USB = join(LIB_DIR, "USBDevice")
00088 USB_LIBRARIES = join(BUILD_DIR, "usb")
00089 
00090 # USB Host
00091 USB_HOST = join(LIB_DIR, "USBHost")
00092 USB_HOST_LIBRARIES = join(BUILD_DIR, "usb_host")
00093 
00094 # Export
00095 EXPORT_DIR = join(BUILD_DIR, "export")
00096 EXPORT_WORKSPACE = join(EXPORT_DIR, "workspace")
00097 EXPORT_TMP = join(EXPORT_DIR, ".temp")
00098 
00099 # CppUtest library
00100 CPPUTEST_DIR = join(ROOT, "..")
00101 CPPUTEST_SRC = join(CPPUTEST_DIR, "cpputest", "src", "CppUTest")
00102 CPPUTEST_INC = join(CPPUTEST_DIR, "cpputest", "include")
00103 CPPUTEST_INC_EXT = join(CPPUTEST_DIR, "cpputest", "include", "CppUTest")
00104 # Platform dependant code is here (for armcc compiler)
00105 CPPUTEST_PLATFORM_SRC = join(CPPUTEST_DIR, "cpputest", "src", "Platforms", "armcc")
00106 CPPUTEST_PLATFORM_INC = join(CPPUTEST_DIR, "cpputest", "include", "Platforms", "armcc")
00107 # Function 'main' used to run all compiled UTs
00108 CPPUTEST_TESTRUNNER_SCR = join(TEST_DIR, "utest", "testrunner")
00109 CPPUTEST_TESTRUNNER_INC = join(TEST_DIR, "utest", "testrunner")
00110 
00111 CPPUTEST_LIBRARY = join(BUILD_DIR, "cpputest")